This repository has been archived by the owner on May 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
model-category.go
163 lines (149 loc) Β· 7.89 KB
/
model-category.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
package shopeego
type AddShopCategoryRequest struct {
// ShopCategory's name.
Name string `json:"name,omitempty"`
// ShopCategory's sort weight.
SortWeight int `json:"sort_weight,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type AddShopCategoryResponse struct {
// ShopCategory's unique identifier.
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// The identifier for an API request for error tracking.
RequestID string `json:"request_id,omitempty"`
}
type GetShopCategoriesRequest struct {
// Specifies the starting entry of data to return in the current call. Default is 0. if data is more than one page, the offset can be some entry to start next call.
PaginationOffset int `json:"pagination_offset,omitempty"`
// If many items are available to retrieve, you may need to call GetItemsList multiple times to retrieve all the data. Each result set is returned as a page of entries. Use the Pagination filters to control the maximum number of entries (<= 100) to retrieve per page (i.e., per call), the offset number to start next call. This integer value is usUed to specify the maximum number of entries to return in a single ""page"" of data.
PaginationEntriesPerPage int `json:"pagination_entries_per_page,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type GetShopCategoriesResponse struct {
//
ShopCategorys []GetShopCategoriesResponseCategory `json:"shop_categorys,omitempty"`
// This is to indicate whether the shop categorys list is more than one page. If this value is true, you may want to continue to check next page to retrieve the rest of shop categorys.
More bool `json:"more,omitempty"`
// The identifier for an API request for error tracking
RequestID string `json:"request_id,omitempty"`
}
type DeleteShopCategoryRequest struct {
// ShopCategory's unique identifier.
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type DeleteShopCategoryResponse struct {
// ShopCategory's unique identifier.
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
//
Msg string `json:"msg,omitempty"`
// The identifier for an API request for error tracking
RequestID string `json:"request_id,omitempty"`
}
type UpdateShopCategoryRequest struct {
// ShopCategory's unique identifier.
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// ShopCategory's name.
Name string `json:"name,omitempty"`
// ShopCategory's sort weight.
SortWeight int `json:"sort_weight,omitempty"`
// ShopCategory's status. Applicable values: NORMAL, INACTIVE, DELETED.
Status string `json:"status,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type UpdateShopCategoryResponse struct {
// ShopCategory's unique identifier.
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// ShopCategory's name.
Name string `json:"name,omitempty"`
// ShopCategory's sort weight.
SortWeight int `json:"sort_weight,omitempty"`
// ShopCategory's status. Applicable values: NORMAL, INACTIVE, DELETED.
Status string `json:"status,omitempty"`
// The identifier for an API request for error tracking.
RequestID string `json:"request_id,omitempty"`
}
type AddItemsRequest struct {
// ShopCategory's unique identifier.
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// Shopee's unique identifiers list for an item.
Items []int `json:"items,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type AddItemsResponse struct {
// List of invalid item ids.
InvalidItemID []int `json:"invalid_item_id,omitempty"`
// ShopCategory's unique identifier.
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// Number of items in the shop category.
Count int `json:"count,omitempty"`
// The identifier for an API request for error tracking.
Request string `json:"request,omitempty"`
}
type GetItemsRequest struct {
// ShopCategory's unique identifier.
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
// Specifies the starting entry of data to return in the current call. Default is 0. if data is more than one page, the offset can be some entry to start next call.
PaginationOffset int `json:"pagination_offset,omitempty"`
// If many items are available to retrieve, you may need to call GetItems multiple times to retrieve all the data. Each result set is returned as a page of entries. Use the Pagination filters to control the maximum number of entries (<= 1000) to retrieve per page (i.e., per call), the offset number to start next call. This integer value is used to specify the maximum number of entries to return in a single "page" of data. And the default will be 1000 as well.
PaginationEntriesPerPage int `json:"pagination_entries_per_page,omitempty"`
}
type GetItemsResponse struct {
//
Items []GetItemsResponseItem `json:"items,omitempty"`
// The identifier for an API request for error tracking.
RequestID string `json:"request_id,omitempty"`
}
type DeleteItemsRequest struct {
// The id of the shop category
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// The list of items need to be deleted
Items []int `json:"items,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type DeleteItemsResponse struct {
// The id of the shop category
ShopCategoryID int64 `json:"shop_category_id,omitempty"`
// The list of item ids which are invalid
InvalidItemID []int `json:"invalid_item_id,omitempty"`
// count of items under this shop category after deletion
Count int `json:"count,omitempty"`
// The identifier of the API request for error tracking
RequestID string `json:"request_id,omitempty"`
}