LogisticsOrdersGetRequest.php
4.13 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
<?php
/**
* TOP API: taobao.logistics.orders.get request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class LogisticsOrdersGetRequest
{
/**
* 买家昵称
**/
private $buyerNick;
/**
* 创建时间结束
**/
private $endCreated;
/**
* 需返回的字段列表.可选值:Shipping 物流数据结构中的以下字段: <br>
tid,order_code,seller_nick,buyer_nick,delivery_start, delivery_end,out_sid,item_title,receiver_name, created,modified,status,type,freight_payer,seller_confirm,company_name;<br>多个字段之间用","分隔。如tid,seller_nick,buyer_nick,delivery_start。
**/
private $fields;
/**
* 谁承担运费.可选值:buyer(买家),seller(卖家).如:buyer
**/
private $freightPayer;
/**
* 页码.该字段没传 或 值<1 ,则默认page_no为1
**/
private $pageNo;
/**
* 每页条数.该字段没传 或 值<1 ,则默认page_size为40
**/
private $pageSize;
/**
* 收货人姓名
**/
private $receiverName;
/**
* 卖家是否发货.可选值:yes(是),no(否).如:yes
**/
private $sellerConfirm;
/**
* 创建时间开始
**/
private $startCreated;
/**
* 物流状态.查看数据结构 Shipping 中的status字段.
**/
private $status;
/**
* 交易ID.如果加入tid参数的话,不用传其他的参数,但是仅会返回一条物流订单信息.
**/
private $tid;
/**
* 物流方式.可选值:post(平邮),express(快递),ems(EMS).如:post
**/
private $type;
private $apiParas = array();
public function setBuyerNick($buyerNick)
{
$this->buyerNick = $buyerNick;
$this->apiParas["buyer_nick"] = $buyerNick;
}
public function getBuyerNick()
{
return $this->buyerNick;
}
public function setEndCreated($endCreated)
{
$this->endCreated = $endCreated;
$this->apiParas["end_created"] = $endCreated;
}
public function getEndCreated()
{
return $this->endCreated;
}
public function setFields($fields)
{
$this->fields = $fields;
$this->apiParas["fields"] = $fields;
}
public function getFields()
{
return $this->fields;
}
public function setFreightPayer($freightPayer)
{
$this->freightPayer = $freightPayer;
$this->apiParas["freight_payer"] = $freightPayer;
}
public function getFreightPayer()
{
return $this->freightPayer;
}
public function setPageNo($pageNo)
{
$this->pageNo = $pageNo;
$this->apiParas["page_no"] = $pageNo;
}
public function getPageNo()
{
return $this->pageNo;
}
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
$this->apiParas["page_size"] = $pageSize;
}
public function getPageSize()
{
return $this->pageSize;
}
public function setReceiverName($receiverName)
{
$this->receiverName = $receiverName;
$this->apiParas["receiver_name"] = $receiverName;
}
public function getReceiverName()
{
return $this->receiverName;
}
public function setSellerConfirm($sellerConfirm)
{
$this->sellerConfirm = $sellerConfirm;
$this->apiParas["seller_confirm"] = $sellerConfirm;
}
public function getSellerConfirm()
{
return $this->sellerConfirm;
}
public function setStartCreated($startCreated)
{
$this->startCreated = $startCreated;
$this->apiParas["start_created"] = $startCreated;
}
public function getStartCreated()
{
return $this->startCreated;
}
public function setStatus($status)
{
$this->status = $status;
$this->apiParas["status"] = $status;
}
public function getStatus()
{
return $this->status;
}
public function setTid($tid)
{
$this->tid = $tid;
$this->apiParas["tid"] = $tid;
}
public function getTid()
{
return $this->tid;
}
public function setType($type)
{
$this->type = $type;
$this->apiParas["type"] = $type;
}
public function getType()
{
return $this->type;
}
public function getApiMethodName()
{
return "taobao.logistics.orders.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkNotNull($this->fields,"fields");
RequestCheckUtil::checkMaxValue($this->pageSize,100,"pageSize");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}