Compare commits

...

5 Commits

Author SHA1 Message Date
Bastian de Byl
d7c5fd3b74 updated helpers for Get request fix 2023-09-13 13:48:50 -04:00
Bastian de Byl
b586a3184c added TotalTaxes to Order 2023-08-11 11:29:15 -04:00
Bastian de Byl
805491571c added missing Completed field for completion date of order 2023-07-29 17:34:01 -04:00
Bastian de Byl
10a9427598 corrected CustomField.Options field to string from []string 2023-07-27 13:48:13 -04:00
Bastian de Byl
3816c67b95 added more data types to CustomField struct 2023-07-27 13:44:06 -04:00
3 changed files with 8 additions and 3 deletions

2
go.mod
View File

@@ -3,7 +3,7 @@ module github.com/debyltech/go-snipcart
go 1.19 go 1.19
require ( require (
github.com/debyltech/go-helpers v1.1.0 github.com/debyltech/go-helpers v1.1.1
github.com/debyltech/go-shippr v0.1.0 github.com/debyltech/go-shippr v0.1.0
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
) )

View File

@@ -39,4 +39,7 @@ type Client struct {
type CustomField struct { type CustomField struct {
Name string `json:"name"` Name string `json:"name"`
Value string `json:"value"` Value string `json:"value"`
Type string `json:"type,omitempty"`
Options string `json:"options,omitempty"`
Required bool `json:"required"`
} }

View File

@@ -37,11 +37,13 @@ type Order struct {
Token string `json:"token"` Token string `json:"token"`
Created time.Time `json:"creationDate"` Created time.Time `json:"creationDate"`
Modified time.Time `json:"modificationDate"` Modified time.Time `json:"modificationDate"`
Completed time.Time `json:"completionDate"`
Invoice string `json:"invoiceNumber"` Invoice string `json:"invoiceNumber"`
Subtotal float64 `json:"subtotal,omitempty"` Subtotal float64 `json:"subtotal,omitempty"`
Currency string `json:"currency,omitempty"` Currency string `json:"currency,omitempty"`
Total float64 `json:"grandTotal,omitempty"` Total float64 `json:"grandTotal,omitempty"`
TotalTaxable float64 `json:"taxableTotal,omitempty"` TotalTaxable float64 `json:"taxableTotal,omitempty"`
TotalTaxes float64 `json:"taxesTotal,omitempty"`
Status string `json:"status"` Status string `json:"status"`
TotalWeight float64 `json:"totalWeight"` TotalWeight float64 `json:"totalWeight"`
ShippingAddress Address `json:"shippingAddress,omitempty"` ShippingAddress Address `json:"shippingAddress,omitempty"`