mirror of
https://github.com/retailcrm/api-client-go.git
synced 2024-11-22 04:46:03 +03:00
add services support
This commit is contained in:
parent
c2a33378b8
commit
a72a57fbe1
@ -1 +0,0 @@
|
|||||||
Subproject commit 5c6d2ebead217f5916767a9a542117fa496c677b
|
|
33
types.go
33
types.go
@ -1057,24 +1057,33 @@ type ProductGroup struct {
|
|||||||
|
|
||||||
// BaseProduct type.
|
// BaseProduct type.
|
||||||
type BaseProduct struct {
|
type BaseProduct struct {
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
URL string `json:"url,omitempty"`
|
Type ProductType `json:"type,omitempty"`
|
||||||
Article string `json:"article,omitempty"`
|
URL string `json:"url,omitempty"`
|
||||||
ExternalID string `json:"externalId,omitempty"`
|
Article string `json:"article,omitempty"`
|
||||||
Manufacturer string `json:"manufacturer,omitempty"`
|
ExternalID string `json:"externalId,omitempty"`
|
||||||
Description string `json:"description,omitempty"`
|
Manufacturer string `json:"manufacturer,omitempty"`
|
||||||
Popular bool `json:"popular,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
Stock bool `json:"stock,omitempty"`
|
Popular bool `json:"popular,omitempty"`
|
||||||
Novelty bool `json:"novelty,omitempty"`
|
Stock bool `json:"stock,omitempty"`
|
||||||
Recommended bool `json:"recommended,omitempty"`
|
Novelty bool `json:"novelty,omitempty"`
|
||||||
Active bool `json:"active,omitempty"`
|
Recommended bool `json:"recommended,omitempty"`
|
||||||
Markable bool `json:"markable,omitempty"`
|
Active bool `json:"active,omitempty"`
|
||||||
|
Markable bool `json:"markable,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ProductType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
RegularProduct ProductType = "product"
|
||||||
|
ServiceProduct ProductType = "service"
|
||||||
|
)
|
||||||
|
|
||||||
// Product type.
|
// Product type.
|
||||||
type Product struct {
|
type Product struct {
|
||||||
BaseProduct
|
BaseProduct
|
||||||
ID int `json:"id,omitempty"`
|
ID int `json:"id,omitempty"`
|
||||||
|
Type ProductType `json:"type"`
|
||||||
MaxPrice float32 `json:"maxPrice,omitempty"`
|
MaxPrice float32 `json:"maxPrice,omitempty"`
|
||||||
MinPrice float32 `json:"minPrice,omitempty"`
|
MinPrice float32 `json:"minPrice,omitempty"`
|
||||||
ImageURL string `json:"imageUrl,omitempty"`
|
ImageURL string `json:"imageUrl,omitempty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user