main added CustomFields to snipcart product
This commit is contained in:
@@ -127,6 +127,18 @@ type SnipcartProductVariant struct {
|
||||
AllowBackorder bool `json:"allowOutOfStockPurchases"`
|
||||
}
|
||||
|
||||
type SnipcartProductCustomField struct {
|
||||
Name string `json:"name"`
|
||||
Placeholder string `json:"placeholder"`
|
||||
DisplayValue string `json:"displayValue"`
|
||||
Type string `json:"type"`
|
||||
Options string `json:"options"`
|
||||
Required bool `json:"required"`
|
||||
Value string `json:"value"`
|
||||
Operation int `json:"operation"`
|
||||
OptionsArray []string `json:"optionsArray"`
|
||||
}
|
||||
|
||||
type SnipcartProduct struct {
|
||||
Token string `json:"id"`
|
||||
Id string `json:"userDefinedId"`
|
||||
@@ -134,6 +146,7 @@ type SnipcartProduct struct {
|
||||
Stock int `json:"stock"`
|
||||
TotalStock int `json:"totalStock"`
|
||||
AllowBackorder bool `json:"allowOutOfStockPurchases"`
|
||||
CustomFields []SnipcartProductCustomField `json:"customFields"`
|
||||
Variants []SnipcartProductVariant `json:"variants"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user