-
Notifications
You must be signed in to change notification settings - Fork 9
/
CainiaoGlobalHandoverUpdateAPIRequest.go
192 lines (174 loc) · 5.3 KB
/
CainiaoGlobalHandoverUpdateAPIRequest.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
package cainiaohandover
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
/*
修改交接单 API请求
cainiao.global.handover.update
提供给ISV通过该接口修改交接单
*/
type CainiaoGlobalHandoverUpdateAPIRequest struct {
model.Params
// 用户信息
_userInfo *UserInfoDto
// 重量单位,克:g, 千克:kg,默认g
_weightUnit string
// 大包重量
_weight int64
// 交接单id
_handoverOrderId int64
// 大包备注
_remark string
// 退件信息
_returnInfo *ReturnerDto
// 揽收信息
_pickupInfo *PickupDto
// 交接单类型,菜鸟揽收(cainiao_pickup)或自寄(self_post),默认菜鸟揽收
_type string
// ISV名称,ISV:ISV-ISV英文或拼音名称、商家ERP:SELLER-商家英文或拼音名称
_client string
// 要创建交接单的小包编码集合,数量上限200
_orderCodeList []string
// 多语言
_locale string
}
// 初始化CainiaoGlobalHandoverUpdateAPIRequest对象
func NewCainiaoGlobalHandoverUpdateRequest() *CainiaoGlobalHandoverUpdateAPIRequest{
return &CainiaoGlobalHandoverUpdateAPIRequest{
Params: model.NewParams(),
}
}
// IRequest interface 方法, 获取Api method
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetApiMethodName() string {
return "cainiao.global.handover.update"
}
// IRequest interface 方法, 获取API参数
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetApiParams() url.Values {
params := url.Values{}
for k, v := range r.GetRawParams() {
params.Set(k, v.String())
}
return params
}
// UserInfo Setter
// 用户信息
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetUserInfo(_userInfo *UserInfoDto) error {
r._userInfo = _userInfo
r.Set("user_info", _userInfo)
return nil
}
// UserInfo Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetUserInfo() *UserInfoDto {
return r._userInfo
}
// WeightUnit Setter
// 重量单位,克:g, 千克:kg,默认g
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetWeightUnit(_weightUnit string) error {
r._weightUnit = _weightUnit
r.Set("weight_unit", _weightUnit)
return nil
}
// WeightUnit Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetWeightUnit() string {
return r._weightUnit
}
// Weight Setter
// 大包重量
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetWeight(_weight int64) error {
r._weight = _weight
r.Set("weight", _weight)
return nil
}
// Weight Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetWeight() int64 {
return r._weight
}
// HandoverOrderId Setter
// 交接单id
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetHandoverOrderId(_handoverOrderId int64) error {
r._handoverOrderId = _handoverOrderId
r.Set("handover_order_id", _handoverOrderId)
return nil
}
// HandoverOrderId Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetHandoverOrderId() int64 {
return r._handoverOrderId
}
// Remark Setter
// 大包备注
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetRemark(_remark string) error {
r._remark = _remark
r.Set("remark", _remark)
return nil
}
// Remark Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetRemark() string {
return r._remark
}
// ReturnInfo Setter
// 退件信息
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetReturnInfo(_returnInfo *ReturnerDto) error {
r._returnInfo = _returnInfo
r.Set("return_info", _returnInfo)
return nil
}
// ReturnInfo Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetReturnInfo() *ReturnerDto {
return r._returnInfo
}
// PickupInfo Setter
// 揽收信息
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetPickupInfo(_pickupInfo *PickupDto) error {
r._pickupInfo = _pickupInfo
r.Set("pickup_info", _pickupInfo)
return nil
}
// PickupInfo Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetPickupInfo() *PickupDto {
return r._pickupInfo
}
// Type Setter
// 交接单类型,菜鸟揽收(cainiao_pickup)或自寄(self_post),默认菜鸟揽收
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetType(_type string) error {
r._type = _type
r.Set("type", _type)
return nil
}
// Type Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetType() string {
return r._type
}
// Client Setter
// ISV名称,ISV:ISV-ISV英文或拼音名称、商家ERP:SELLER-商家英文或拼音名称
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetClient(_client string) error {
r._client = _client
r.Set("client", _client)
return nil
}
// Client Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetClient() string {
return r._client
}
// OrderCodeList Setter
// 要创建交接单的小包编码集合,数量上限200
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetOrderCodeList(_orderCodeList []string) error {
r._orderCodeList = _orderCodeList
r.Set("order_code_list", _orderCodeList)
return nil
}
// OrderCodeList Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetOrderCodeList() []string {
return r._orderCodeList
}
// Locale Setter
// 多语言
func (r *CainiaoGlobalHandoverUpdateAPIRequest) SetLocale(_locale string) error {
r._locale = _locale
r.Set("locale", _locale)
return nil
}
// Locale Getter
func (r CainiaoGlobalHandoverUpdateAPIRequest) GetLocale() string {
return r._locale
}