AlibabaLogisticsRouteQueryRequest.php
5.63 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
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
<?php
/**
* TOP API: alibaba.logistics.route.query request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class AlibabaLogisticsRouteQueryRequest
{
/**
* 是否是空运的条件
**/
private $airTransport;
/**
* 过滤线路的公司塞选条件
**/
private $corpList;
/**
* 目的地id,可以是市和区
**/
private $endAreaId;
/**
* 是否合并线路
**/
private $mergeRoute;
/**
* 当前第几页
**/
private $pageIndex;
/**
* 每页显示的线路数
**/
private $pageSize;
/**
* 线路是否具有代收货款服务
**/
private $showCods;
/**
* 线路是否显示保障服务
**/
private $showSpecials;
/**
* 是否在线路中显示评价和网点信息
**/
private $showStatisticsInfo;
/**
* 线路排序方式。具体值如下,precise:精确匹配,corp:公司,wpa:重物价格升序,wpd:重物价格降序,vpa:体积价格升序,vpd:体积价格降序,trtid:运输时效降序,trtia:运输时效升序,corpLevel:公司级别,品牌>集市,evalScore:评价分数,routeTop:线路是否置顶,orderCount:下单量多少排序,special:保障服务优先排序。
**/
private $sortType;
/**
* 数据来源,默认开放部分物流公司。
**/
private $source;
/**
* 起始地id,可以是市和区
**/
private $startAreaId;
/**
* 是否查询总的查询条件的公司数目
**/
private $summaryTotalCorps;
/**
* 是否统计对应公司的线路数
**/
private $summeryByCorp;
/**
* 如果查找不到指定地区的线路,是否对地址进行上翻。如杭州市滨江区的地址呗翻转为杭州市。
**/
private $turnLevel;
private $apiParas = array();
public function setAirTransport($airTransport)
{
$this->airTransport = $airTransport;
$this->apiParas["air_transport"] = $airTransport;
}
public function getAirTransport()
{
return $this->airTransport;
}
public function setCorpList($corpList)
{
$this->corpList = $corpList;
$this->apiParas["corp_list"] = $corpList;
}
public function getCorpList()
{
return $this->corpList;
}
public function setEndAreaId($endAreaId)
{
$this->endAreaId = $endAreaId;
$this->apiParas["end_area_id"] = $endAreaId;
}
public function getEndAreaId()
{
return $this->endAreaId;
}
public function setMergeRoute($mergeRoute)
{
$this->mergeRoute = $mergeRoute;
$this->apiParas["merge_route"] = $mergeRoute;
}
public function getMergeRoute()
{
return $this->mergeRoute;
}
public function setPageIndex($pageIndex)
{
$this->pageIndex = $pageIndex;
$this->apiParas["page_index"] = $pageIndex;
}
public function getPageIndex()
{
return $this->pageIndex;
}
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
$this->apiParas["page_size"] = $pageSize;
}
public function getPageSize()
{
return $this->pageSize;
}
public function setShowCods($showCods)
{
$this->showCods = $showCods;
$this->apiParas["show_cods"] = $showCods;
}
public function getShowCods()
{
return $this->showCods;
}
public function setShowSpecials($showSpecials)
{
$this->showSpecials = $showSpecials;
$this->apiParas["show_specials"] = $showSpecials;
}
public function getShowSpecials()
{
return $this->showSpecials;
}
public function setShowStatisticsInfo($showStatisticsInfo)
{
$this->showStatisticsInfo = $showStatisticsInfo;
$this->apiParas["show_statistics_info"] = $showStatisticsInfo;
}
public function getShowStatisticsInfo()
{
return $this->showStatisticsInfo;
}
public function setSortType($sortType)
{
$this->sortType = $sortType;
$this->apiParas["sort_type"] = $sortType;
}
public function getSortType()
{
return $this->sortType;
}
public function setSource($source)
{
$this->source = $source;
$this->apiParas["source"] = $source;
}
public function getSource()
{
return $this->source;
}
public function setStartAreaId($startAreaId)
{
$this->startAreaId = $startAreaId;
$this->apiParas["start_area_id"] = $startAreaId;
}
public function getStartAreaId()
{
return $this->startAreaId;
}
public function setSummaryTotalCorps($summaryTotalCorps)
{
$this->summaryTotalCorps = $summaryTotalCorps;
$this->apiParas["summary_total_corps"] = $summaryTotalCorps;
}
public function getSummaryTotalCorps()
{
return $this->summaryTotalCorps;
}
public function setSummeryByCorp($summeryByCorp)
{
$this->summeryByCorp = $summeryByCorp;
$this->apiParas["summery_by_corp"] = $summeryByCorp;
}
public function getSummeryByCorp()
{
return $this->summeryByCorp;
}
public function setTurnLevel($turnLevel)
{
$this->turnLevel = $turnLevel;
$this->apiParas["turn_level"] = $turnLevel;
}
public function getTurnLevel()
{
return $this->turnLevel;
}
public function getApiMethodName()
{
return "alibaba.logistics.route.query";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkMaxListSize($this->corpList,15,"corpList");
RequestCheckUtil::checkNotNull($this->endAreaId,"endAreaId");
RequestCheckUtil::checkNotNull($this->pageIndex,"pageIndex");
RequestCheckUtil::checkMaxValue($this->pageIndex,100000,"pageIndex");
RequestCheckUtil::checkMinValue($this->pageIndex,1,"pageIndex");
RequestCheckUtil::checkNotNull($this->pageSize,"pageSize");
RequestCheckUtil::checkMaxValue($this->pageSize,100,"pageSize");
RequestCheckUtil::checkMinValue($this->pageSize,1,"pageSize");
RequestCheckUtil::checkNotNull($this->startAreaId,"startAreaId");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}