mirror of
https://github.com/retailcrm/api-client-go.git
synced 2024-11-21 20:36:03 +03:00
add services support
This commit is contained in:
parent
c2a33378b8
commit
a72a57fbe1
@ -1 +0,0 @@
|
||||
Subproject commit 5c6d2ebead217f5916767a9a542117fa496c677b
|
9
types.go
9
types.go
@ -1058,6 +1058,7 @@ type ProductGroup struct {
|
||||
// BaseProduct type.
|
||||
type BaseProduct struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Type ProductType `json:"type,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
Article string `json:"article,omitempty"`
|
||||
ExternalID string `json:"externalId,omitempty"`
|
||||
@ -1071,10 +1072,18 @@ type BaseProduct struct {
|
||||
Markable bool `json:"markable,omitempty"`
|
||||
}
|
||||
|
||||
type ProductType string
|
||||
|
||||
const (
|
||||
RegularProduct ProductType = "product"
|
||||
ServiceProduct ProductType = "service"
|
||||
)
|
||||
|
||||
// Product type.
|
||||
type Product struct {
|
||||
BaseProduct
|
||||
ID int `json:"id,omitempty"`
|
||||
Type ProductType `json:"type"`
|
||||
MaxPrice float32 `json:"maxPrice,omitempty"`
|
||||
MinPrice float32 `json:"minPrice,omitempty"`
|
||||
ImageURL string `json:"imageUrl,omitempty"`
|
||||
|
Loading…
Reference in New Issue
Block a user