1
|
|
|
<?php |
2
|
|
|
namespace Com\Pdd\Pop\Sdk\Api\Request; |
3
|
|
|
|
4
|
|
|
use Com\Pdd\Pop\Sdk\PopBaseHttpRequest; |
5
|
|
|
use Com\Pdd\Pop\Sdk\PopBaseJsonEntity; |
6
|
|
|
|
7
|
|
|
class PddTrainGrabCreateRequest extends PopBaseHttpRequest |
8
|
|
|
{ |
9
|
|
|
public function __construct() |
10
|
|
|
{ |
11
|
|
|
|
12
|
|
|
} |
13
|
|
|
/** |
14
|
|
|
* @JsonProperty(String, "pdd_order_id") |
15
|
|
|
*/ |
16
|
|
|
private $pddOrderId; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @JsonProperty(String, "end_time") |
20
|
|
|
*/ |
21
|
|
|
private $endTime; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @JsonProperty(List<String>, "depart_dates") |
25
|
|
|
*/ |
26
|
|
|
private $departDates; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @JsonProperty(String, "have_account") |
30
|
|
|
*/ |
31
|
|
|
private $haveAccount; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @JsonProperty(String, "crh_account") |
35
|
|
|
*/ |
36
|
|
|
private $crhAccount; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @JsonProperty(String, "crh_password") |
40
|
|
|
*/ |
41
|
|
|
private $crhPassword; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @JsonProperty(String, "sum_ticket_price") |
45
|
|
|
*/ |
46
|
|
|
private $sumTicketPrice; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @JsonProperty(List<Integer>, "seat_types") |
50
|
|
|
*/ |
51
|
|
|
private $seatTypes; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddTrainGrabCreateRequest_TravelInfosItem>, "travel_infos") |
55
|
|
|
*/ |
56
|
|
|
private $travelInfos; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddTrainGrabCreateRequest_PassengerInfosItem>, "passenger_infos") |
60
|
|
|
*/ |
61
|
|
|
private $passengerInfos; |
62
|
|
|
|
63
|
|
|
protected function setUserParams(&$params) |
64
|
|
|
{ |
65
|
|
|
$this->setUserParam($params, "pdd_order_id", $this->pddOrderId); |
66
|
|
|
$this->setUserParam($params, "end_time", $this->endTime); |
67
|
|
|
$this->setUserParam($params, "depart_dates", $this->departDates); |
68
|
|
|
$this->setUserParam($params, "have_account", $this->haveAccount); |
69
|
|
|
$this->setUserParam($params, "crh_account", $this->crhAccount); |
70
|
|
|
$this->setUserParam($params, "crh_password", $this->crhPassword); |
71
|
|
|
$this->setUserParam($params, "sum_ticket_price", $this->sumTicketPrice); |
72
|
|
|
$this->setUserParam($params, "seat_types", $this->seatTypes); |
73
|
|
|
$this->setUserParam($params, "travel_infos", $this->travelInfos); |
74
|
|
|
$this->setUserParam($params, "passenger_infos", $this->passengerInfos); |
75
|
|
|
|
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
public function getVersion() |
79
|
|
|
{ |
80
|
|
|
return "V1"; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
public function getDataType() |
84
|
|
|
{ |
85
|
|
|
return "JSON"; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
public function getType() |
89
|
|
|
{ |
90
|
|
|
return "pdd.train.grab.create"; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
public function setPddOrderId($pddOrderId) |
94
|
|
|
{ |
95
|
|
|
$this->pddOrderId = $pddOrderId; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
public function setEndTime($endTime) |
99
|
|
|
{ |
100
|
|
|
$this->endTime = $endTime; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
public function setDepartDates($departDates) |
104
|
|
|
{ |
105
|
|
|
$this->departDates = $departDates; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
public function setHaveAccount($haveAccount) |
109
|
|
|
{ |
110
|
|
|
$this->haveAccount = $haveAccount; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
public function setCrhAccount($crhAccount) |
114
|
|
|
{ |
115
|
|
|
$this->crhAccount = $crhAccount; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
public function setCrhPassword($crhPassword) |
119
|
|
|
{ |
120
|
|
|
$this->crhPassword = $crhPassword; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
public function setSumTicketPrice($sumTicketPrice) |
124
|
|
|
{ |
125
|
|
|
$this->sumTicketPrice = $sumTicketPrice; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
public function setSeatTypes($seatTypes) |
129
|
|
|
{ |
130
|
|
|
$this->seatTypes = $seatTypes; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
public function setTravelInfos($travelInfos) |
134
|
|
|
{ |
135
|
|
|
$this->travelInfos = $travelInfos; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
public function setPassengerInfos($passengerInfos) |
139
|
|
|
{ |
140
|
|
|
$this->passengerInfos = $passengerInfos; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
class PddTrainGrabCreateRequest_TravelInfosItem extends PopBaseJsonEntity |
146
|
|
|
{ |
147
|
|
|
|
148
|
|
|
public function __construct() |
149
|
|
|
{ |
150
|
|
|
|
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @JsonProperty(String, "train_no") |
155
|
|
|
*/ |
156
|
|
|
private $trainNo; |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @JsonProperty(String, "depart_station") |
160
|
|
|
*/ |
161
|
|
|
private $departStation; |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @JsonProperty(String, "arrive_station") |
165
|
|
|
*/ |
166
|
|
|
private $arriveStation; |
167
|
|
|
|
168
|
|
|
public function setTrainNo($trainNo) |
169
|
|
|
{ |
170
|
|
|
$this->trainNo = $trainNo; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
public function setDepartStation($departStation) |
174
|
|
|
{ |
175
|
|
|
$this->departStation = $departStation; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
public function setArriveStation($arriveStation) |
179
|
|
|
{ |
180
|
|
|
$this->arriveStation = $arriveStation; |
181
|
|
|
} |
182
|
|
|
|
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
class PddTrainGrabCreateRequest_PassengerInfosItem extends PopBaseJsonEntity |
186
|
|
|
{ |
187
|
|
|
|
188
|
|
|
public function __construct() |
189
|
|
|
{ |
190
|
|
|
|
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* @JsonProperty(String, "name") |
195
|
|
|
*/ |
196
|
|
|
private $name; |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* @JsonProperty(String, "card_no") |
200
|
|
|
*/ |
201
|
|
|
private $cardNo; |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @JsonProperty(String, "card_type") |
205
|
|
|
*/ |
206
|
|
|
private $cardType; |
207
|
|
|
|
208
|
|
|
/** |
209
|
|
|
* @JsonProperty(Integer, "ticket_type") |
210
|
|
|
*/ |
211
|
|
|
private $ticketType; |
212
|
|
|
|
213
|
|
|
/** |
214
|
|
|
* @JsonProperty(String, "sub_pdd_order_id") |
215
|
|
|
*/ |
216
|
|
|
private $subPddOrderId; |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* @JsonProperty(String, "effective_date") |
220
|
|
|
*/ |
221
|
|
|
private $effectiveDate; |
222
|
|
|
|
223
|
|
|
/** |
224
|
|
|
* @JsonProperty(String, "sex") |
225
|
|
|
*/ |
226
|
|
|
private $sex; |
227
|
|
|
|
228
|
|
|
/** |
229
|
|
|
* @JsonProperty(String, "country") |
230
|
|
|
*/ |
231
|
|
|
private $country; |
232
|
|
|
|
233
|
|
|
/** |
234
|
|
|
* @JsonProperty(String, "birthday") |
235
|
|
|
*/ |
236
|
|
|
private $birthday; |
237
|
|
|
|
238
|
|
|
/** |
239
|
|
|
* @JsonProperty(String, "order_sn") |
240
|
|
|
*/ |
241
|
|
|
private $orderSn; |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* @JsonProperty(String, "mobile") |
245
|
|
|
*/ |
246
|
|
|
private $mobile; |
247
|
|
|
|
248
|
|
|
/** |
249
|
|
|
* @JsonProperty(String, "email") |
250
|
|
|
*/ |
251
|
|
|
private $email; |
252
|
|
|
|
253
|
|
|
public function setName($name) |
254
|
|
|
{ |
255
|
|
|
$this->name = $name; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
public function setCardNo($cardNo) |
259
|
|
|
{ |
260
|
|
|
$this->cardNo = $cardNo; |
261
|
|
|
} |
262
|
|
|
|
263
|
|
|
public function setCardType($cardType) |
264
|
|
|
{ |
265
|
|
|
$this->cardType = $cardType; |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
public function setTicketType($ticketType) |
269
|
|
|
{ |
270
|
|
|
$this->ticketType = $ticketType; |
271
|
|
|
} |
272
|
|
|
|
273
|
|
|
public function setSubPddOrderId($subPddOrderId) |
274
|
|
|
{ |
275
|
|
|
$this->subPddOrderId = $subPddOrderId; |
276
|
|
|
} |
277
|
|
|
|
278
|
|
|
public function setEffectiveDate($effectiveDate) |
279
|
|
|
{ |
280
|
|
|
$this->effectiveDate = $effectiveDate; |
281
|
|
|
} |
282
|
|
|
|
283
|
|
|
public function setSex($sex) |
284
|
|
|
{ |
285
|
|
|
$this->sex = $sex; |
286
|
|
|
} |
287
|
|
|
|
288
|
|
|
public function setCountry($country) |
289
|
|
|
{ |
290
|
|
|
$this->country = $country; |
291
|
|
|
} |
292
|
|
|
|
293
|
|
|
public function setBirthday($birthday) |
294
|
|
|
{ |
295
|
|
|
$this->birthday = $birthday; |
296
|
|
|
} |
297
|
|
|
|
298
|
|
|
public function setOrderSn($orderSn) |
299
|
|
|
{ |
300
|
|
|
$this->orderSn = $orderSn; |
301
|
|
|
} |
302
|
|
|
|
303
|
|
|
public function setMobile($mobile) |
304
|
|
|
{ |
305
|
|
|
$this->mobile = $mobile; |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
public function setEmail($email) |
309
|
|
|
{ |
310
|
|
|
$this->email = $email; |
311
|
|
|
} |
312
|
|
|
|
313
|
|
|
} |
314
|
|
|
|