-
Notifications
You must be signed in to change notification settings - Fork 10
/
TaobaoOmniitemCategoryGetAPIRequest.go
54 lines (45 loc) · 1.58 KB
/
TaobaoOmniitemCategoryGetAPIRequest.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
package omniorder
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
// TaobaoOmniitemCategoryGetAPIRequest 全渠道商品轻发布类目信息 API请求
// taobao.omniitem.category.get
//
// 全渠道商品轻发布类目信息
type TaobaoOmniitemCategoryGetAPIRequest struct {
model.Params
// 全渠道商品类目ID,不填表示获取所有全渠道商品类目信息
_categoryId int64
}
// NewTaobaoOmniitemCategoryGetRequest 初始化TaobaoOmniitemCategoryGetAPIRequest对象
func NewTaobaoOmniitemCategoryGetRequest() *TaobaoOmniitemCategoryGetAPIRequest {
return &TaobaoOmniitemCategoryGetAPIRequest{
Params: model.NewParams(),
}
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoOmniitemCategoryGetAPIRequest) GetApiMethodName() string {
return "taobao.omniitem.category.get"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoOmniitemCategoryGetAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoOmniitemCategoryGetAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetCategoryId is CategoryId Setter
// 全渠道商品类目ID,不填表示获取所有全渠道商品类目信息
func (r *TaobaoOmniitemCategoryGetAPIRequest) SetCategoryId(_categoryId int64) error {
r._categoryId = _categoryId
r.Set("category_id", _categoryId)
return nil
}
// GetCategoryId CategoryId Getter
func (r TaobaoOmniitemCategoryGetAPIRequest) GetCategoryId() int64 {
return r._categoryId
}