-
Notifications
You must be signed in to change notification settings - Fork 12
/
TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest.go
129 lines (110 loc) · 5.87 KB
/
TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest.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
package tmallsc
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest 新增网点容量 API请求
// tmall.servicecenter.servicestore.createservicestorecapacity
//
// 新增网点容量,唯一性校验:服务商淘宝账号+网点编码+biz_type
// 前提是网点要存在,
// 如果需要新增的网点容量已存在,会新增失败。
// 网点容量包含了业务类型(比如电器预约安装)、天猫服务的servicecode列表、类目区域和容量
type TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest struct {
model.Params
// 业务类型
_bizType string
// json格式,在某个业务类型(biz_type)下,类目所覆盖区域对应的容量。一个网点承接了空调和热水器的安装, 空调覆盖的区域是杭州市上城区和下城区,容量是10; 热水器覆盖的区域是杭州市下城区和江干区,容量是18;洗衣机和冰箱覆盖区域一样都是杭州市上城区和西湖区,合并计算容量30
_categoryIdsAndAreaCodesAndCapacity string
// serviceCodes列表,|分隔
_serviceCodes string
// 网点编码
_serviceStoreCode string
}
// NewTmallServicecenterServicestoreCreateservicestorecapacityRequest 初始化TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest对象
func NewTmallServicecenterServicestoreCreateservicestorecapacityRequest() *TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest {
return &TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest{
Params: model.NewParams(4),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) Reset() {
r._bizType = ""
r._categoryIdsAndAreaCodesAndCapacity = ""
r._serviceCodes = ""
r._serviceStoreCode = ""
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) GetApiMethodName() string {
return "tmall.servicecenter.servicestore.createservicestorecapacity"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetBizType is BizType Setter
// 业务类型
func (r *TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) SetBizType(_bizType string) error {
r._bizType = _bizType
r.Set("biz_type", _bizType)
return nil
}
// GetBizType BizType Getter
func (r TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) GetBizType() string {
return r._bizType
}
// SetCategoryIdsAndAreaCodesAndCapacity is CategoryIdsAndAreaCodesAndCapacity Setter
// json格式,在某个业务类型(biz_type)下,类目所覆盖区域对应的容量。一个网点承接了空调和热水器的安装, 空调覆盖的区域是杭州市上城区和下城区,容量是10; 热水器覆盖的区域是杭州市下城区和江干区,容量是18;洗衣机和冰箱覆盖区域一样都是杭州市上城区和西湖区,合并计算容量30
func (r *TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) SetCategoryIdsAndAreaCodesAndCapacity(_categoryIdsAndAreaCodesAndCapacity string) error {
r._categoryIdsAndAreaCodesAndCapacity = _categoryIdsAndAreaCodesAndCapacity
r.Set("category_ids_and_area_codes_and_capacity", _categoryIdsAndAreaCodesAndCapacity)
return nil
}
// GetCategoryIdsAndAreaCodesAndCapacity CategoryIdsAndAreaCodesAndCapacity Getter
func (r TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) GetCategoryIdsAndAreaCodesAndCapacity() string {
return r._categoryIdsAndAreaCodesAndCapacity
}
// SetServiceCodes is ServiceCodes Setter
// serviceCodes列表,|分隔
func (r *TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) SetServiceCodes(_serviceCodes string) error {
r._serviceCodes = _serviceCodes
r.Set("service_codes", _serviceCodes)
return nil
}
// GetServiceCodes ServiceCodes Getter
func (r TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) GetServiceCodes() string {
return r._serviceCodes
}
// SetServiceStoreCode is ServiceStoreCode Setter
// 网点编码
func (r *TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) SetServiceStoreCode(_serviceStoreCode string) error {
r._serviceStoreCode = _serviceStoreCode
r.Set("service_store_code", _serviceStoreCode)
return nil
}
// GetServiceStoreCode ServiceStoreCode Getter
func (r TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) GetServiceStoreCode() string {
return r._serviceStoreCode
}
var poolTmallServicecenterServicestoreCreateservicestorecapacityAPIRequest = sync.Pool{
New: func() any {
return NewTmallServicecenterServicestoreCreateservicestorecapacityRequest()
},
}
// GetTmallServicecenterServicestoreCreateservicestorecapacityRequest 从 sync.Pool 获取 TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest
func GetTmallServicecenterServicestoreCreateservicestorecapacityAPIRequest() *TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest {
return poolTmallServicecenterServicestoreCreateservicestorecapacityAPIRequest.Get().(*TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest)
}
// ReleaseTmallServicecenterServicestoreCreateservicestorecapacityAPIRequest 将 TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest 放入 sync.Pool
func ReleaseTmallServicecenterServicestoreCreateservicestorecapacityAPIRequest(v *TmallServicecenterServicestoreCreateservicestorecapacityAPIRequest) {
v.Reset()
poolTmallServicecenterServicestoreCreateservicestorecapacityAPIRequest.Put(v)
}