Skip to content

Commit

Permalink
Change type for attributes to map[string]interface{}
Browse files Browse the repository at this point in the history
  • Loading branch information
gowizzard committed May 11, 2021
1 parent 88c1d2b commit fb8a44c
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions products.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type ReadProductsResults struct {
InsertId interface{} `json:"insert_id"`
ProductGroup interface{} `json:"product_group"`
Supplier ReadProductsResultsSupplier `json:"supplier"`
Attributes interface{} `json:"attributes"`
Attributes map[string]interface{} `json:"attributes"`
Barcode interface{} `json:"barcode"`
Prices ReadProductsResultsPrices `json:"prices"`
Sku string `json:"sku"`
Expand Down Expand Up @@ -135,12 +135,12 @@ type ReadProductsResults struct {
}

type ReadProductsResultsChildren struct {
Id string `json:"id"`
Name string `json:"name"`
CustomId string `json:"custom_id"`
Attributes interface{} `json:"attributes"`
Locations interface{} `json:"locations"`
Images interface{} `json:"images"`
Id string `json:"id"`
Name string `json:"name"`
CustomId string `json:"custom_id"`
Attributes map[string]interface{} `json:"attributes"`
Locations interface{} `json:"locations"`
Images interface{} `json:"images"`
}

type ReadProductsResultsCreatedAt struct {
Expand Down Expand Up @@ -207,11 +207,12 @@ type ReadProductsResultsConfigurationPricing struct {
type CreateProductBody struct {
Active bool `json:"active"`
Type string `json:"type"`
Parent string `json:"parent"`
Name string `json:"name"`
Account string `json:"account"`
Tax string `json:"tax"`
CustomId string `json:"custom_id"`
Attributes CreateProductBodyAttributes `json:"attributes"`
Attributes map[string]interface{} `json:"attributes"`
Codes []CreateProductBodyCodes `json:"codes"`
Barcode interface{} `json:"barcode"`
ProductGroup interface{} `json:"product_group"`
Expand Down Expand Up @@ -241,9 +242,6 @@ type CreateProductBody struct {
ShippingRequired interface{} `json:"shipping_required"`
}

type CreateProductBodyAttributes struct {
}

type CreateProductBodyCodes struct {
}

Expand Down Expand Up @@ -348,7 +346,7 @@ type CreateProductReturnResults struct {
InsertId interface{} `json:"insert_id"`
ProductGroup interface{} `json:"product_group"`
Supplier CreateProductReturnResultsSupplier `json:"supplier"`
Attributes interface{} `json:"attributes"`
Attributes map[string]interface{} `json:"attributes"`
Barcode interface{} `json:"barcode"`
Prices CreateProductReturnResultsPrices `json:"prices"`
Sku interface{} `json:"sku"`
Expand Down Expand Up @@ -498,7 +496,7 @@ type UpdateProductReturnResults struct {
Revisions interface{} `json:"revisions"`
Stockable bool `json:"stockable"`
VatClass interface{} `json:"vat_class"`
Attributes interface{} `json:"attributes"`
Attributes map[string]interface{} `json:"attributes"`
Categories interface{} `json:"categories"`
CreatedAt UpdateProductReturnResultsCreatedAt `json:"created_at"`
Delegatable bool `json:"delegatable"`
Expand Down

0 comments on commit fb8a44c

Please sign in to comment.