LogisticsAddressAddRequest.php
4.31 KB
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
<?php
/**
* TOP API: taobao.logistics.address.add request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class LogisticsAddressAddRequest
{
/**
* 详细街道地址,不需要重复填写省/市/区
**/
private $addr;
/**
* 默认退货地址。<br>
<font color='red'>选择此项(true),将当前地址设为默认退货地址,撤消原默认退货地址</font>
**/
private $cancelDef;
/**
* 所在市
**/
private $city;
/**
* 联系人姓名 <font color='red'>长度不可超过20个字节</font>
**/
private $contactName;
/**
* 区、县
<br><font color='red'>如果所在地区是海外的可以为空,否则为必参</font>
**/
private $country;
/**
* 默认取货地址。<br>
<font color='red'>选择此项(true),将当前地址设为默认取货地址,撤消原默认取货地址</font>
**/
private $getDef;
/**
* 备注,<br><font color='red'>备注不能超过256字节</font>
**/
private $memo;
/**
* 手机号码,手机与电话必需有一个
<br><font color='red'>手机号码不能超过20位</font>
**/
private $mobilePhone;
/**
* 电话号码,手机与电话必需有一个
**/
private $phone;
/**
* 所在省
**/
private $province;
/**
* 公司名称,<br><font color="red">公司名称长能不能超过20字节</font>
**/
private $sellerCompany;
/**
* 地区邮政编码
<br><font color='red'>如果所在地区是海外的可以为空,否则为必参</font>
**/
private $zipCode;
private $apiParas = array();
public function setAddr($addr)
{
$this->addr = $addr;
$this->apiParas["addr"] = $addr;
}
public function getAddr()
{
return $this->addr;
}
public function setCancelDef($cancelDef)
{
$this->cancelDef = $cancelDef;
$this->apiParas["cancel_def"] = $cancelDef;
}
public function getCancelDef()
{
return $this->cancelDef;
}
public function setCity($city)
{
$this->city = $city;
$this->apiParas["city"] = $city;
}
public function getCity()
{
return $this->city;
}
public function setContactName($contactName)
{
$this->contactName = $contactName;
$this->apiParas["contact_name"] = $contactName;
}
public function getContactName()
{
return $this->contactName;
}
public function setCountry($country)
{
$this->country = $country;
$this->apiParas["country"] = $country;
}
public function getCountry()
{
return $this->country;
}
public function setGetDef($getDef)
{
$this->getDef = $getDef;
$this->apiParas["get_def"] = $getDef;
}
public function getGetDef()
{
return $this->getDef;
}
public function setMemo($memo)
{
$this->memo = $memo;
$this->apiParas["memo"] = $memo;
}
public function getMemo()
{
return $this->memo;
}
public function setMobilePhone($mobilePhone)
{
$this->mobilePhone = $mobilePhone;
$this->apiParas["mobile_phone"] = $mobilePhone;
}
public function getMobilePhone()
{
return $this->mobilePhone;
}
public function setPhone($phone)
{
$this->phone = $phone;
$this->apiParas["phone"] = $phone;
}
public function getPhone()
{
return $this->phone;
}
public function setProvince($province)
{
$this->province = $province;
$this->apiParas["province"] = $province;
}
public function getProvince()
{
return $this->province;
}
public function setSellerCompany($sellerCompany)
{
$this->sellerCompany = $sellerCompany;
$this->apiParas["seller_company"] = $sellerCompany;
}
public function getSellerCompany()
{
return $this->sellerCompany;
}
public function setZipCode($zipCode)
{
$this->zipCode = $zipCode;
$this->apiParas["zip_code"] = $zipCode;
}
public function getZipCode()
{
return $this->zipCode;
}
public function getApiMethodName()
{
return "taobao.logistics.address.add";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkNotNull($this->addr,"addr");
RequestCheckUtil::checkNotNull($this->city,"city");
RequestCheckUtil::checkNotNull($this->contactName,"contactName");
RequestCheckUtil::checkMaxLength($this->memo,256,"memo");
RequestCheckUtil::checkNotNull($this->province,"province");
RequestCheckUtil::checkMaxLength($this->sellerCompany,20,"sellerCompany");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}