-
Notifications
You must be signed in to change notification settings - Fork 13
/
categories_types.go
46 lines (41 loc) · 1.8 KB
/
categories_types.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
36
37
38
39
40
41
42
43
44
45
46
package magento2
type Category struct {
ID int `json:"id,omitempty"`
ParentID int `json:"parent_id,omitempty"`
Name string `json:"name,omitempty"`
IsActive bool `json:"is_active,omitempty"`
Position int `json:"position,omitempty"`
Level int `json:"level,omitempty"`
Children string `json:"children,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
Path string `json:"path,omitempty"`
AvailableSortBy []string `json:"available_sort_by,omitempty"`
IncludeInMenu bool `json:"include_in_menu,omitempty"`
ExtensionAttributes interface{} `json:"extension_attributes,omitempty"`
CustomAttributes []CustomAttributes `json:"custom_attributes,omitempty"`
}
type ProductLink struct {
Sku string `json:"sku"`
Position int `json:"position"`
CategoryID string `json:"category_id"`
ExtensionAttributes map[string]interface{} `json:"extension_attributes,omitempty"`
}
type createCategoryPayload struct {
Category Category `json:"category"`
}
type assignProductPayload struct {
ProductLink ProductLink `json:"productLink"`
}
type categorySearchQueryResponse struct {
Categories []Category `json:"items"`
SearchCriteria struct {
FilterGroups []struct {
Filters []struct {
Field string `json:"field"`
Value string `json:"value"`
ConditionType string `json:"condition_type"`
} `json:"filters"`
} `json:"filter_groups"`
} `json:"search_criteria"`
}