/
customs.go
38 lines (33 loc) · 1.6 KB
/
customs.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
package shippinglabel
type ExportTypeCode string
const (
ExportTypeOther ExportTypeCode = "OTHER"
ExportTypePresent ExportTypeCode = "PRESENT"
ExportTypeSample ExportTypeCode = "SAMPLE"
ExportTypeDocument ExportTypeCode = "DOCUMENT"
ExportTypeReturnOfGoods ExportTypeCode = "RETURN_OF_GOODS"
ExportTypeCommercialGoods ExportTypeCode = "COMMERCIAL_GOODS"
)
type Customs struct {
ExportType ExportTypeCode `json:"exportType,omitempty"`
ExportDescription string `json:"exportDescription,omitempty"`
ShippingCosts *Amount `json:"shippingCosts,omitempty"`
InvoiceNumber string `json:"invoiceNumber,omitempty"`
InvoiceDate string `json:"invoiceDate,omitempty"`
SenderCustomsReference string `json:"senderCustomsReference,omitempty"`
ReceiverCustomsReference string `json:"receiverCustomsReference,omitempty"`
HasElectronicExportNotification bool `json:"hasElectronicExportNotification,omitempty"`
Items []*CustomsItem `json:"items,omitempty"`
}
type CustomsItem struct {
Description string `json:"description,omitempty"`
Quantity int `json:"quantity,omitempty"`
HsCode string `json:"hsCode,omitempty"`
OriginCountry string `json:"originCountry,omitempty"`
UnitValue *Amount `json:"unitValue,omitempty"`
Weight float64 `json:"weight,omitempty"`
}
type Amount struct {
Value float64 `json:"value,omitempty"`
Currency string `json:"currency,omitempty"`
}