-
Notifications
You must be signed in to change notification settings - Fork 0
/
product.go
35 lines (31 loc) · 1.05 KB
/
product.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package servicewoo
type Category struct {
ID int `json:"id"`
Name string `json:"name"`
}
type Image struct {
Source string `json:"src"`
}
type ProductAttribute struct {
ID int `json:"id"`
Name string `json:"name"`
Position int `json:"position"`
Variation bool `json:"variation"`
Visible bool `json:"visible"`
Options []string `json:"options"`
}
type Product struct {
ID int `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Status string `json:"status"`
SKU string `json:"sku"`
Price string `json:"price"`
RegularPrice string `json:"regular_price"`
SalePrice string `json:"sale_price"`
TaxClass string `json:"tax_class"`
Categories []Category `json:"categories"`
Images []Image `json:"images"`
Attributes []ProductAttribute `json:"attributes"`
Variations []int `json:"variations"`
}