-
Notifications
You must be signed in to change notification settings - Fork 0
/
structs.go
34 lines (30 loc) · 928 Bytes
/
structs.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
package main
type Receipt struct {
TransactionID string `json:"transaction_id"`
ExternalID string `json:"external_id"`
Total int64 `json:"total"`
Currency string `json:"currency"`
Items []Item `json:"items"`
Taxes []Tax `json:"taxes"`
}
type Item struct {
Description string `json:"description"`
Quantity int `json:"quantity"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
SubItems []SubItem `json:"sub_items"`
}
type SubItem struct {
Description string `json:"description"`
Quantity int `json:"quantity"`
Unit string `json:"unit"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
Taxes int `json:"tax"`
}
type Tax struct {
Description string `json:"description"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
TaxNumber string `json:"tax_number"`
}