diff --git a/examples/example_update_order.go b/examples/example_update_order.go deleted file mode 100644 index 3f2576d..0000000 --- a/examples/example_update_order.go +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "flag" - "log" - - "github.com/debyltech/go-snipcart/snipcart" -) - -func main() { - snipcartApiKey := flag.String("key", "", "Snipcart API Key") - flag.Parse() - - if *snipcartApiKey == "" { - log.Fatal("missing -key flag") - } - - Client := snipcart.NewClient(*snipcartApiKey) - - updateOrder := snipcart.SnipcartOrderUpdate{ - Status: snipcart.Delivered, - } - - response, err := Client.UpdateOrder("b35990df-c0ca-4014-94de-1caa7bd7bb51", &updateOrder) - if err != nil { - log.Fatal(err) - } - - for k, v := range response.Items { - log.Printf("%v: %v\n", k, v) - } -} diff --git a/snipcart/snipcart.go b/snipcart/snipcart.go index 824e052..1996c0a 100644 --- a/snipcart/snipcart.go +++ b/snipcart/snipcart.go @@ -135,7 +135,7 @@ type SnipcartProductCustomField struct { Options string `json:"options"` Required bool `json:"required"` Value string `json:"value"` - Operation int `json:"operation"` + Operation float64 `json:"operation"` OptionsArray []string `json:"optionsArray"` }