From ba5fa76cc3a00b2b839f8a0d282604b655c02d03 Mon Sep 17 00:00:00 2001 From: Zihan Jin Date: Sun, 17 Mar 2024 11:25:47 +1100 Subject: [PATCH 1/2] Fix readme to include map[string]string{} --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ac6d02b..6965edf 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ func main() { // for app development, you need to provide arguments // for CLI and other web apps you can use empty strings client := bigcommerce.NewClient("** my store's hash like '123abcdefg' **", "**my X-Auth-Token generated in BigCommerce admin**") - products, err := client.GetAllProducts() + products, err := client.GetAllProducts(map[string]string{}) if err != nil { log.Fatalf("Error while getting products: %v", err) } From 117f3cf22c4d25de93764243c3591777d4566b97 Mon Sep 17 00:00:00 2001 From: Zihan Jin Date: Sun, 17 Mar 2024 11:26:11 +1100 Subject: [PATCH 2/2] change variants w,h,d to float --- products.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/products.go b/products.go index de0771e..b3f6ed8 100644 --- a/products.go +++ b/products.go @@ -102,9 +102,9 @@ type Product struct { RetailPrice float64 `json:"retail_price,omitempty"` MapPrice float64 `json:"map_price,omitempty"` Weight float64 `json:"weight,omitempty"` - Width int `json:"width,omitempty"` - Height int `json:"height,omitempty"` - Depth int `json:"depth,omitempty"` + Width float64 `json:"width,omitempty"` + Height float64 `json:"height,omitempty"` + Depth float64 `json:"depth,omitempty"` IsFreeShipping bool `json:"is_free_shipping,omitempty"` FixedCostShippingPrice float64 `json:"fixed_cost_shipping_price,omitempty"` CalculatedWeight float64 `json:"calculated_weight,omitempty"`