Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Transaction ¶
type Transaction struct { // Transaction date and time Date time.Time // From account name Src string // From amount SrcVal float32 // From currency SrcCur Currency // To account name Dst string // To amount DstVal float32 // To currency DstCur Currency // Transaction note Note string // Not nil on XML parse error Error string `json:"Error,omitempty"` // XML Transaction. Set only when Error is not nil. Raw *XMLTransaction `json:"Raw,omitempty"` }
func ParseTransaction ¶
func ParseTransaction(xmlTran XMLTransaction) Transaction
Convert transaction object received from the Privat24 API to more convenient, Golang native format.
func (*Transaction) Comission ¶
func (t *Transaction) Comission() float32
Comission returns the value of comission charged.
func (*Transaction) String ¶
func (t *Transaction) String() string
type XMLTransaction ¶
type XMLTransaction struct { Card string `xml:"card,attr"` AppCode string `xml:"appcode,attr"` TranDate string `xml:"trandate,attr"` TranTime string `xml:"trantime,attr"` Amount string `xml:"amount,attr"` CardAmount string `xml:"cardamount,attr"` Rest string `xml:"rest,attr"` Terminal string `xml:"terminal,attr"` Description string `xml:"description,attr"` }
XMLTransaction. This is a part of Privat24 API spec.
Click to show internal directories.
Click to hide internal directories.