corrected Taxes to Order (new OrderTax struct)

This commit is contained in:
Bastian de Byl
2023-07-03 13:21:06 -04:00
parent cf4ad9642d
commit 6d85149be8

View File

@@ -26,6 +26,13 @@ type Item struct {
Shippable bool `json:"shippable,omitempty"` Shippable bool `json:"shippable,omitempty"`
} }
type OrderTax struct {
Name string `json:"taxName"`
Rate float64 `json:"taxRate"`
Amount float64 `json:"amount"`
NumberForInvoice string `json:"numberForInvoice"`
}
type Order struct { type Order struct {
Token string `json:"token"` Token string `json:"token"`
Created time.Time `json:"creationDate"` Created time.Time `json:"creationDate"`
@@ -54,7 +61,7 @@ type Order struct {
ShippingMethod string `json:"shippingMethod,omitempty"` ShippingMethod string `json:"shippingMethod,omitempty"`
ShippingRateId string `json:"shippingRateUserDefinedId,omitempty"` ShippingRateId string `json:"shippingRateUserDefinedId,omitempty"`
Items []Item `json:"items"` Items []Item `json:"items"`
Taxes []Tax `json:"taxes,omitempty"` Taxes []OrderTax `json:"taxes,omitempty"`
Metadata any `json:"metadata"` Metadata any `json:"metadata"`
} }