-
Notifications
You must be signed in to change notification settings - Fork 9
/
TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest.go
366 lines (317 loc) · 12.1 KB
/
TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
package tmallservice
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest 物流工单履约状态更新 API请求
// tmall.servicecenter.workcard.logisticsorder.update
//
// 天猫寄送类服务对接外部物流服务商回传物流状态信息
type TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest struct {
model.Params
// 物流子单号
_subExpressCodes []string
// 备注说明
_comment string
// 物流单号(展示给消费者)
_expressCode string
// 物流公司名词(展示给消费者)
_expressCompany string
// 小件员手机号码
_courierMobile string
// 小件员姓名
_courierName string
// 取件码
_gotCode string
// 1、以下状态时必填: 包裹已揽收完成 2、字符串格式为:json 串 例子: [{ "name": "上衣", "count": 1 }, { "name": "裤子", "count": 2 }]
_goodsInfo string
// 物流创建 :create 物流取消 :cancel 分派小件员:assign 已经分派小件员: assigned 包裹上门揽收: pickup_door 包裹已揽收完成: pickup_finished 包裹派送中: dispatching 包裹已签收: signed
_statusCode string
// 预计送达时间 dispatching节点时必填
_deliveryTime string
// 签收时间 signed节点时必填
_signTime string
// 揽收完成时间 pickup_finished节点时必填
_pickupFinishTime string
// 上门揽收时间 pickup_door节点时必填
_pickupDoorTime string
// 扩展属性
_extendInfo string
// 体积 单位 立方毫米
_volume int64
// 重量 单位 克
_weight int64
// 物流订单号
_logisticsOrderId int64
// 金额 单位分
_cost int64
// 是否更新新物流数据
_newLogistics bool
}
// NewTmallServicecenterWorkcardLogisticsorderUpdateRequest 初始化TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest对象
func NewTmallServicecenterWorkcardLogisticsorderUpdateRequest() *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest {
return &TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest{
Params: model.NewParams(19),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) Reset() {
r._subExpressCodes = r._subExpressCodes[:0]
r._comment = ""
r._expressCode = ""
r._expressCompany = ""
r._courierMobile = ""
r._courierName = ""
r._gotCode = ""
r._goodsInfo = ""
r._statusCode = ""
r._deliveryTime = ""
r._signTime = ""
r._pickupFinishTime = ""
r._pickupDoorTime = ""
r._extendInfo = ""
r._volume = 0
r._weight = 0
r._logisticsOrderId = 0
r._cost = 0
r._newLogistics = false
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetApiMethodName() string {
return "tmall.servicecenter.workcard.logisticsorder.update"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetSubExpressCodes is SubExpressCodes Setter
// 物流子单号
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetSubExpressCodes(_subExpressCodes []string) error {
r._subExpressCodes = _subExpressCodes
r.Set("sub_express_codes", _subExpressCodes)
return nil
}
// GetSubExpressCodes SubExpressCodes Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetSubExpressCodes() []string {
return r._subExpressCodes
}
// SetComment is Comment Setter
// 备注说明
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetComment(_comment string) error {
r._comment = _comment
r.Set("comment", _comment)
return nil
}
// GetComment Comment Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetComment() string {
return r._comment
}
// SetExpressCode is ExpressCode Setter
// 物流单号(展示给消费者)
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetExpressCode(_expressCode string) error {
r._expressCode = _expressCode
r.Set("express_code", _expressCode)
return nil
}
// GetExpressCode ExpressCode Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetExpressCode() string {
return r._expressCode
}
// SetExpressCompany is ExpressCompany Setter
// 物流公司名词(展示给消费者)
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetExpressCompany(_expressCompany string) error {
r._expressCompany = _expressCompany
r.Set("express_company", _expressCompany)
return nil
}
// GetExpressCompany ExpressCompany Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetExpressCompany() string {
return r._expressCompany
}
// SetCourierMobile is CourierMobile Setter
// 小件员手机号码
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetCourierMobile(_courierMobile string) error {
r._courierMobile = _courierMobile
r.Set("courier_mobile", _courierMobile)
return nil
}
// GetCourierMobile CourierMobile Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetCourierMobile() string {
return r._courierMobile
}
// SetCourierName is CourierName Setter
// 小件员姓名
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetCourierName(_courierName string) error {
r._courierName = _courierName
r.Set("courier_name", _courierName)
return nil
}
// GetCourierName CourierName Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetCourierName() string {
return r._courierName
}
// SetGotCode is GotCode Setter
// 取件码
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetGotCode(_gotCode string) error {
r._gotCode = _gotCode
r.Set("got_code", _gotCode)
return nil
}
// GetGotCode GotCode Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetGotCode() string {
return r._gotCode
}
// SetGoodsInfo is GoodsInfo Setter
// 1、以下状态时必填: 包裹已揽收完成 2、字符串格式为:json 串 例子: [{ "name": "上衣", "count": 1 }, { "name": "裤子", "count": 2 }]
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetGoodsInfo(_goodsInfo string) error {
r._goodsInfo = _goodsInfo
r.Set("goods_info", _goodsInfo)
return nil
}
// GetGoodsInfo GoodsInfo Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetGoodsInfo() string {
return r._goodsInfo
}
// SetStatusCode is StatusCode Setter
// 物流创建 :create 物流取消 :cancel 分派小件员:assign 已经分派小件员: assigned 包裹上门揽收: pickup_door 包裹已揽收完成: pickup_finished 包裹派送中: dispatching 包裹已签收: signed
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetStatusCode(_statusCode string) error {
r._statusCode = _statusCode
r.Set("status_code", _statusCode)
return nil
}
// GetStatusCode StatusCode Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetStatusCode() string {
return r._statusCode
}
// SetDeliveryTime is DeliveryTime Setter
// 预计送达时间 dispatching节点时必填
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetDeliveryTime(_deliveryTime string) error {
r._deliveryTime = _deliveryTime
r.Set("delivery_time", _deliveryTime)
return nil
}
// GetDeliveryTime DeliveryTime Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetDeliveryTime() string {
return r._deliveryTime
}
// SetSignTime is SignTime Setter
// 签收时间 signed节点时必填
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetSignTime(_signTime string) error {
r._signTime = _signTime
r.Set("sign_time", _signTime)
return nil
}
// GetSignTime SignTime Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetSignTime() string {
return r._signTime
}
// SetPickupFinishTime is PickupFinishTime Setter
// 揽收完成时间 pickup_finished节点时必填
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetPickupFinishTime(_pickupFinishTime string) error {
r._pickupFinishTime = _pickupFinishTime
r.Set("pickup_finish_time", _pickupFinishTime)
return nil
}
// GetPickupFinishTime PickupFinishTime Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetPickupFinishTime() string {
return r._pickupFinishTime
}
// SetPickupDoorTime is PickupDoorTime Setter
// 上门揽收时间 pickup_door节点时必填
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetPickupDoorTime(_pickupDoorTime string) error {
r._pickupDoorTime = _pickupDoorTime
r.Set("pickup_door_time", _pickupDoorTime)
return nil
}
// GetPickupDoorTime PickupDoorTime Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetPickupDoorTime() string {
return r._pickupDoorTime
}
// SetExtendInfo is ExtendInfo Setter
// 扩展属性
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetExtendInfo(_extendInfo string) error {
r._extendInfo = _extendInfo
r.Set("extend_info", _extendInfo)
return nil
}
// GetExtendInfo ExtendInfo Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetExtendInfo() string {
return r._extendInfo
}
// SetVolume is Volume Setter
// 体积 单位 立方毫米
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetVolume(_volume int64) error {
r._volume = _volume
r.Set("volume", _volume)
return nil
}
// GetVolume Volume Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetVolume() int64 {
return r._volume
}
// SetWeight is Weight Setter
// 重量 单位 克
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetWeight(_weight int64) error {
r._weight = _weight
r.Set("weight", _weight)
return nil
}
// GetWeight Weight Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetWeight() int64 {
return r._weight
}
// SetLogisticsOrderId is LogisticsOrderId Setter
// 物流订单号
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetLogisticsOrderId(_logisticsOrderId int64) error {
r._logisticsOrderId = _logisticsOrderId
r.Set("logistics_order_id", _logisticsOrderId)
return nil
}
// GetLogisticsOrderId LogisticsOrderId Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetLogisticsOrderId() int64 {
return r._logisticsOrderId
}
// SetCost is Cost Setter
// 金额 单位分
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetCost(_cost int64) error {
r._cost = _cost
r.Set("cost", _cost)
return nil
}
// GetCost Cost Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetCost() int64 {
return r._cost
}
// SetNewLogistics is NewLogistics Setter
// 是否更新新物流数据
func (r *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) SetNewLogistics(_newLogistics bool) error {
r._newLogistics = _newLogistics
r.Set("new_logistics", _newLogistics)
return nil
}
// GetNewLogistics NewLogistics Getter
func (r TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) GetNewLogistics() bool {
return r._newLogistics
}
var poolTmallServicecenterWorkcardLogisticsorderUpdateAPIRequest = sync.Pool{
New: func() any {
return NewTmallServicecenterWorkcardLogisticsorderUpdateRequest()
},
}
// GetTmallServicecenterWorkcardLogisticsorderUpdateRequest 从 sync.Pool 获取 TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest
func GetTmallServicecenterWorkcardLogisticsorderUpdateAPIRequest() *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest {
return poolTmallServicecenterWorkcardLogisticsorderUpdateAPIRequest.Get().(*TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest)
}
// ReleaseTmallServicecenterWorkcardLogisticsorderUpdateAPIRequest 将 TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest 放入 sync.Pool
func ReleaseTmallServicecenterWorkcardLogisticsorderUpdateAPIRequest(v *TmallServicecenterWorkcardLogisticsorderUpdateAPIRequest) {
v.Reset()
poolTmallServicecenterWorkcardLogisticsorderUpdateAPIRequest.Put(v)
}