Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BankTransaction ¶
type BankTransaction struct {
PostedDate time.Time
InterestDate time.Time
Ref string
DestinationAccount string
TxType string
Memo string
Amount float64
}
func (*BankTransaction) ToOfx ¶
func (btx *BankTransaction) ToOfx() OfxTransaction
ToOfx converts a single bank transaction (BankTransaction) to a single OfxTransaction
type OfxTransaction ¶
type OfxTransaction struct {
XMLName xml.Name `xml:"STMTTRN"`
Type string `xml:"TRNTYPE"`
DatePosted string `xml:"DTPOSTED"`
DateUser string `xml:"DTUSER"`
Amount float64 `xml:"TRNAMT"`
ID string `xml:"FITID"`
Payee string `xml:"NAME"`
Memo string `xml:"MEMO"`
PayeeBank string `xml:"BANKACCTTO>BANKID"`
PayeeAccount string `xml:"BANKACCTTO>ACCTID"`
PayeeAccountType string `xml:"BANKACCTTO>ACCTTYPE"`
}
type OfxTransactionList ¶
type OfxTransactionList struct {
XMLName xml.Name `xml:"OFX"`
CurDef string `xml:"BANKMSGSRSV1>STMTTRNRS>STMTRS>CURDEF"`
PayerBank string `xml:"BANKMSGSRSV1>STMTTRNRS>STMTRS>BANKACCTFROM>BANKID"`
PayerAccount string `xml:"BANKMSGSRSV1>STMTTRNRS>STMTRS>BANKACCTFROM>ACCTID"`
PayerAccountType string `xml:"BANKMSGSRSV1>STMTTRNRS>STMTRS>BANKACCTFROM>ACCTTYPE"`
Transactions []OfxTransaction `xml:"BANKMSGSRSV1>STMTTRNRS>STMTRS>BANKTRANLIST>STMTTRN"`
}
func (*OfxTransactionList) WriteOFX ¶
func (txs *OfxTransactionList) WriteOFX(w io.Writer)
WriteOFX creates an XML document from a OfxTransactionList, and writes it to the Writer passed in as an argument
Click to show internal directories.
Click to hide internal directories.