mt940

package
v0.0.0-...-23aebfe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bank

type Bank interface {
	ParseCsv(csvFile *os.File) *BankData
}

type BankData

type BankData struct {
	AccountNumber string
	BankNumber    string
	Transactions  []Transaction
}

swiftTransactions creates a MT940 statement from given transactions accountNumber and bankNumber are required for the accountLine (:25:)

func (*BankData) ConvertToMT940

func (s *BankData) ConvertToMT940(w io.Writer) error

ConvertToMT940 calls all line creation functions and writes a complete MT940 statement to the given writer

type Converter

type Converter interface {
	ConvertToMT940(writer io.Writer) error
}

Converter converts csv transactions into the MT940 format

type Transaction

type Transaction interface {
	Converter
	Saldo() *money.Money
	Amount() *money.Money
	Date() time.Time
}

Transaction is the interface for each transaction line, it should convert to a valid mt940 string with lines 61 and 86 the methods saldo, amount and date are used for creating the start and end saldo lines

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL