Passed
Push — v6 ( fe03e1...0ec70f )
by 光春
04:11
created

PddTrainCreateOtcbookRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
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 PddTrainCreateOtcbookRequest extends PopBaseHttpRequest
8
{
9
    public function __construct()
10
	{
11
12
	}
13
	/**
14
	* @JsonProperty(String, "depart_station")
15
	*/
16
	private $departStation;
17
18
	/**
19
	* @JsonProperty(String, "arrive_station")
20
	*/
21
	private $arriveStation;
22
23
	/**
24
	* @JsonProperty(String, "train_date")
25
	*/
26
	private $trainDate;
27
28
	/**
29
	* @JsonProperty(String, "train_no")
30
	*/
31
	private $trainNo;
32
33
	/**
34
	* @JsonProperty(String, "depart_time")
35
	*/
36
	private $departTime;
37
38
	/**
39
	* @JsonProperty(String, "arrive_time")
40
	*/
41
	private $arriveTime;
42
43
	/**
44
	* @JsonProperty(Integer, "accept_other_seat")
45
	*/
46
	private $acceptOtherSeat;
47
48
	/**
49
	* @JsonProperty(Integer, "accept_stand_seat")
50
	*/
51
	private $acceptStandSeat;
52
53
	/**
54
	* @JsonProperty(String, "pdd_order_id")
55
	*/
56
	private $pddOrderId;
57
58
	/**
59
	* @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddTrainCreateOtcbookRequest_OtcChooseSeatItem>, "otc_choose_seat")
60
	*/
61
	private $otcChooseSeat;
62
63
	/**
64
	* @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddTrainCreateOtcbookRequest_PassengerInfosItem>, "passenger_infos")
65
	*/
66
	private $passengerInfos;
67
68
	/**
69
	* @JsonProperty(String, "request_id")
70
	*/
71
	private $requestId;
72
73
	/**
74
	* @JsonProperty(String, "comment")
75
	*/
76
	private $comment;
77
78
	protected function setUserParams(&$params)
79
	{
80
		$this->setUserParam($params, "depart_station", $this->departStation);
81
		$this->setUserParam($params, "arrive_station", $this->arriveStation);
82
		$this->setUserParam($params, "train_date", $this->trainDate);
83
		$this->setUserParam($params, "train_no", $this->trainNo);
84
		$this->setUserParam($params, "depart_time", $this->departTime);
85
		$this->setUserParam($params, "arrive_time", $this->arriveTime);
86
		$this->setUserParam($params, "accept_other_seat", $this->acceptOtherSeat);
87
		$this->setUserParam($params, "accept_stand_seat", $this->acceptStandSeat);
88
		$this->setUserParam($params, "pdd_order_id", $this->pddOrderId);
89
		$this->setUserParam($params, "otc_choose_seat", $this->otcChooseSeat);
90
		$this->setUserParam($params, "passenger_infos", $this->passengerInfos);
91
		$this->setUserParam($params, "request_id", $this->requestId);
92
		$this->setUserParam($params, "comment", $this->comment);
93
94
	}
95
96
	public function getVersion()
97
	{
98
		return "V1";
99
	}
100
101
	public function getDataType()
102
	{
103
		return "JSON";
104
	}
105
106
	public function getType()
107
	{
108
		return "pdd.train.create.otcbook";
109
	}
110
111
	public function setDepartStation($departStation)
112
	{
113
		$this->departStation = $departStation;
114
	}
115
116
	public function setArriveStation($arriveStation)
117
	{
118
		$this->arriveStation = $arriveStation;
119
	}
120
121
	public function setTrainDate($trainDate)
122
	{
123
		$this->trainDate = $trainDate;
124
	}
125
126
	public function setTrainNo($trainNo)
127
	{
128
		$this->trainNo = $trainNo;
129
	}
130
131
	public function setDepartTime($departTime)
132
	{
133
		$this->departTime = $departTime;
134
	}
135
136
	public function setArriveTime($arriveTime)
137
	{
138
		$this->arriveTime = $arriveTime;
139
	}
140
141
	public function setAcceptOtherSeat($acceptOtherSeat)
142
	{
143
		$this->acceptOtherSeat = $acceptOtherSeat;
144
	}
145
146
	public function setAcceptStandSeat($acceptStandSeat)
147
	{
148
		$this->acceptStandSeat = $acceptStandSeat;
149
	}
150
151
	public function setPddOrderId($pddOrderId)
152
	{
153
		$this->pddOrderId = $pddOrderId;
154
	}
155
156
	public function setOtcChooseSeat($otcChooseSeat)
157
	{
158
		$this->otcChooseSeat = $otcChooseSeat;
159
	}
160
161
	public function setPassengerInfos($passengerInfos)
162
	{
163
		$this->passengerInfos = $passengerInfos;
164
	}
165
166
	public function setRequestId($requestId)
167
	{
168
		$this->requestId = $requestId;
169
	}
170
171
	public function setComment($comment)
172
	{
173
		$this->comment = $comment;
174
	}
175
176
}
177
178
class PddTrainCreateOtcbookRequest_OtcChooseSeatItem extends PopBaseJsonEntity
179
{
180
181
	public function __construct()
182
	{
183
184
	}
185
186
	/**
187
	* @JsonProperty(Integer, "otc_choose_seat_type")
188
	*/
189
	private $otcChooseSeatType;
190
191
	/**
192
	* @JsonProperty(Integer, "count")
193
	*/
194
	private $count;
195
196
	public function setOtcChooseSeatType($otcChooseSeatType)
197
	{
198
		$this->otcChooseSeatType = $otcChooseSeatType;
199
	}
200
201
	public function setCount($count)
202
	{
203
		$this->count = $count;
204
	}
205
206
}
207
208
class PddTrainCreateOtcbookRequest_PassengerInfosItem extends PopBaseJsonEntity
209
{
210
211
	public function __construct()
212
	{
213
214
	}
215
216
	/**
217
	* @JsonProperty(String, "card_type")
218
	*/
219
	private $cardType;
220
221
	/**
222
	* @JsonProperty(String, "card_no")
223
	*/
224
	private $cardNo;
225
226
	/**
227
	* @JsonProperty(String, "name")
228
	*/
229
	private $name;
230
231
	/**
232
	* @JsonProperty(Integer, "ticket_type")
233
	*/
234
	private $ticketType;
235
236
	/**
237
	* @JsonProperty(Integer, "seat_type")
238
	*/
239
	private $seatType;
240
241
	/**
242
	* @JsonProperty(Long, "ticket_price")
243
	*/
244
	private $ticketPrice;
245
246
	/**
247
	* @JsonProperty(String, "sub_pdd_order_id")
248
	*/
249
	private $subPddOrderId;
250
251
	/**
252
	* @JsonProperty(String, "birthday")
253
	*/
254
	private $birthday;
255
256
	/**
257
	* @JsonProperty(String, "effective_date")
258
	*/
259
	private $effectiveDate;
260
261
	/**
262
	* @JsonProperty(String, "mobile")
263
	*/
264
	private $mobile;
265
266
	/**
267
	* @JsonProperty(String, "sex")
268
	*/
269
	private $sex;
270
271
	/**
272
	* @JsonProperty(String, "country")
273
	*/
274
	private $country;
275
276
	/**
277
	* @JsonProperty(String, "email")
278
	*/
279
	private $email;
280
281
	/**
282
	* @JsonProperty(String, "comment")
283
	*/
284
	private $comment;
285
286
	public function setCardType($cardType)
287
	{
288
		$this->cardType = $cardType;
289
	}
290
291
	public function setCardNo($cardNo)
292
	{
293
		$this->cardNo = $cardNo;
294
	}
295
296
	public function setName($name)
297
	{
298
		$this->name = $name;
299
	}
300
301
	public function setTicketType($ticketType)
302
	{
303
		$this->ticketType = $ticketType;
304
	}
305
306
	public function setSeatType($seatType)
307
	{
308
		$this->seatType = $seatType;
309
	}
310
311
	public function setTicketPrice($ticketPrice)
312
	{
313
		$this->ticketPrice = $ticketPrice;
314
	}
315
316
	public function setSubPddOrderId($subPddOrderId)
317
	{
318
		$this->subPddOrderId = $subPddOrderId;
319
	}
320
321
	public function setBirthday($birthday)
322
	{
323
		$this->birthday = $birthday;
324
	}
325
326
	public function setEffectiveDate($effectiveDate)
327
	{
328
		$this->effectiveDate = $effectiveDate;
329
	}
330
331
	public function setMobile($mobile)
332
	{
333
		$this->mobile = $mobile;
334
	}
335
336
	public function setSex($sex)
337
	{
338
		$this->sex = $sex;
339
	}
340
341
	public function setCountry($country)
342
	{
343
		$this->country = $country;
344
	}
345
346
	public function setEmail($email)
347
	{
348
		$this->email = $email;
349
	}
350
351
	public function setComment($comment)
352
	{
353
		$this->comment = $comment;
354
	}
355
356
}
357