-
Notifications
You must be signed in to change notification settings - Fork 1
/
bank-transaction.go
44 lines (40 loc) · 2 KB
/
bank-transaction.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package goxerostructs
import "time"
//BankTransactionResult a bank transaction from xero
type BankTransactionResult struct {
ID string `json:"ID"`
ProviderName string `json:"ProviderName"`
Status string `json:"Status"`
BankTransactions []BankTransaction `json:"BankTransactions"`
DateCreated time.Time `json:"DateCreated,omitempty"`
Params string `json:"Params,omitempty"`
}
//BankTransaction a bank transaction from xero
type BankTransaction struct {
BankTransactionID string `json:"BankTransactionID"`
Type string `json:"Type"`
Reference string `json:"Reference"`
IsReconciled bool `json:"IsReconciled"`
HasAttachments bool `json:"HasAttachments"`
DateString string `json:"DateString"`
Status string `json:"Status"`
LineAmountTypes string `json:"LineAmountTypes"`
SubTotal float64 `json:"SubTotal"`
Total float64 `json:"Total"`
TotalTax float64 `json:"TotalTax"`
CurrencyCode string `json:"CurrencyCode"`
Lineitems []LineItem `json:"Lineitems"`
Contact Contact `json:"Contact"`
}
//LineItem is a line item of a bank transaction
type LineItem struct {
Description string `json:"Description,omitempty" xml:"Description,omitempty"`
AccountCode string `json:"AccountCode,omitempty" xml:"AccountCode,omitempty"`
TaxType string `json:"TaxType,omitempty" xml:"TaxType,omitempty"`
TaxAmount float64 `json:"TaxAmount,omitempty" xml:"TaxAmount,omitempty"`
UnitAmount float64 `json:"UnitAmount,omitempty" xml:"UnitAmount,omitempty"`
Quantity float64 `json:"Quantity,omitempty" xml:"Quantity,omitempty"`
LineAmount float64 `json:"LineAmount,omitempty" xml:"LineAmount,omitempty"`
LineItemID string `json:"LineItemID,omitempty" xml:"LineItemID,omitempty"`
Tracking []Tracking `json:"Tracking,omitempty" xml:"Tracking,omitempty"`
}