Documentation ¶
Overview ¶
Package importer maintains the transaction importer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category int
Category represents categories of a transaction. Only supported by the N26Account.
type ForeignTransaction ¶
type ForeignTransaction interface { Transaction // The amount and the currency of the transaction that is not in the // local account currency. ForeignAmount() decimal.Decimal ForeignCurrency() string }
ForeignTransaction adds a foreign amount and currency.
type MultilineTransaction ¶
type MultilineTransaction interface { Transaction RemoteNames() []string Purposes() []string }
MultilineTransaction is a transaction where names and purposes can have multiple lines.
type Transaction ¶
type Transaction interface { // An identifier describing the description, to filter out duplicates. // // If the bank does not provide identifiers, use hashTransaction() when // implementing a new transaction parser. ID() string // Category of the transaction Category() Category // Time when the transaction occured. For the difference between date // and valuta date search the internet, I can't explain it. Date() time.Time ValutaDate() time.Time // IBAN or other ID of the local account. For credit card transactions, the // local account describes some sort of card id. // // For LBB, this is the master card id or a related number indicating // incoming transactions. // // For N26, this is a UUID or something like that. LocalAccount() string // Information about the remote account (name and IBAN), and the content // of the transaction. For a SEPA transaction, all of these will likely // be set, for a credit card transaction, RemoteName() might be the only one. // // When matching keywords in transactions for categorizing, both remote // name and the reference text should be checked; in a canonical case, // and with and without spaces removed, as sometimes formatting fails in // a transaction and spaces go missing. RemoteName() string RemoteAccount() string ReferenceText() string // The amount and the currency of the transaction. The amount has a two // digit precision, and the currency is expected to be a multi-letter // currency code, like EUR. // // The LBB provider understands a code 'A' which means Amazon credits. Amount() decimal.Decimal Currency() string }
Transaction describes a generic incoming transaction.
func HBCIParseFile ¶
func HBCIParseFile(path string, parseNoted bool) ([]Transaction, error)
HBCIParseFile parses a CSV file generated by acqbanking-cli listtrans.
func LBBParseFile ¶
func LBBParseFile(path string) ([]Transaction, error)
LBBParseFile parses a CSV file generated by the Landesbank Berlin for their Amazon credit cards.
func N26ParseFile ¶
func N26ParseFile(path string) ([]Transaction, error)
N26ParseFile parses a N26 JSON file into a slice of transactions.
Click to show internal directories.
Click to hide internal directories.