PddTrainCreateOtcbookRequest.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <?php
  2. namespace Com\Pdd\Pop\Sdk\Api\Request;
  3. use Com\Pdd\Pop\Sdk\PopBaseHttpRequest;
  4. use Com\Pdd\Pop\Sdk\PopBaseJsonEntity;
  5. class PddTrainCreateOtcbookRequest extends PopBaseHttpRequest
  6. {
  7. public function __construct()
  8. {
  9. }
  10. /**
  11. * @JsonProperty(String, "depart_station")
  12. */
  13. private $departStation;
  14. /**
  15. * @JsonProperty(String, "arrive_station")
  16. */
  17. private $arriveStation;
  18. /**
  19. * @JsonProperty(String, "train_date")
  20. */
  21. private $trainDate;
  22. /**
  23. * @JsonProperty(String, "train_no")
  24. */
  25. private $trainNo;
  26. /**
  27. * @JsonProperty(String, "depart_time")
  28. */
  29. private $departTime;
  30. /**
  31. * @JsonProperty(String, "arrive_time")
  32. */
  33. private $arriveTime;
  34. /**
  35. * @JsonProperty(Integer, "accept_other_seat")
  36. */
  37. private $acceptOtherSeat;
  38. /**
  39. * @JsonProperty(Integer, "accept_stand_seat")
  40. */
  41. private $acceptStandSeat;
  42. /**
  43. * @JsonProperty(String, "pdd_order_id")
  44. */
  45. private $pddOrderId;
  46. /**
  47. * @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddTrainCreateOtcbookRequest_OtcChooseSeatItem>, "otc_choose_seat")
  48. */
  49. private $otcChooseSeat;
  50. /**
  51. * @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddTrainCreateOtcbookRequest_PassengerInfosItem>, "passenger_infos")
  52. */
  53. private $passengerInfos;
  54. /**
  55. * @JsonProperty(String, "request_id")
  56. */
  57. private $requestId;
  58. /**
  59. * @JsonProperty(String, "comment")
  60. */
  61. private $comment;
  62. protected function setUserParams(&$params)
  63. {
  64. $this->setUserParam($params, "depart_station", $this->departStation);
  65. $this->setUserParam($params, "arrive_station", $this->arriveStation);
  66. $this->setUserParam($params, "train_date", $this->trainDate);
  67. $this->setUserParam($params, "train_no", $this->trainNo);
  68. $this->setUserParam($params, "depart_time", $this->departTime);
  69. $this->setUserParam($params, "arrive_time", $this->arriveTime);
  70. $this->setUserParam($params, "accept_other_seat", $this->acceptOtherSeat);
  71. $this->setUserParam($params, "accept_stand_seat", $this->acceptStandSeat);
  72. $this->setUserParam($params, "pdd_order_id", $this->pddOrderId);
  73. $this->setUserParam($params, "otc_choose_seat", $this->otcChooseSeat);
  74. $this->setUserParam($params, "passenger_infos", $this->passengerInfos);
  75. $this->setUserParam($params, "request_id", $this->requestId);
  76. $this->setUserParam($params, "comment", $this->comment);
  77. }
  78. public function getVersion()
  79. {
  80. return "V1";
  81. }
  82. public function getDataType()
  83. {
  84. return "JSON";
  85. }
  86. public function getType()
  87. {
  88. return "pdd.train.create.otcbook";
  89. }
  90. public function setDepartStation($departStation)
  91. {
  92. $this->departStation = $departStation;
  93. }
  94. public function setArriveStation($arriveStation)
  95. {
  96. $this->arriveStation = $arriveStation;
  97. }
  98. public function setTrainDate($trainDate)
  99. {
  100. $this->trainDate = $trainDate;
  101. }
  102. public function setTrainNo($trainNo)
  103. {
  104. $this->trainNo = $trainNo;
  105. }
  106. public function setDepartTime($departTime)
  107. {
  108. $this->departTime = $departTime;
  109. }
  110. public function setArriveTime($arriveTime)
  111. {
  112. $this->arriveTime = $arriveTime;
  113. }
  114. public function setAcceptOtherSeat($acceptOtherSeat)
  115. {
  116. $this->acceptOtherSeat = $acceptOtherSeat;
  117. }
  118. public function setAcceptStandSeat($acceptStandSeat)
  119. {
  120. $this->acceptStandSeat = $acceptStandSeat;
  121. }
  122. public function setPddOrderId($pddOrderId)
  123. {
  124. $this->pddOrderId = $pddOrderId;
  125. }
  126. public function setOtcChooseSeat($otcChooseSeat)
  127. {
  128. $this->otcChooseSeat = $otcChooseSeat;
  129. }
  130. public function setPassengerInfos($passengerInfos)
  131. {
  132. $this->passengerInfos = $passengerInfos;
  133. }
  134. public function setRequestId($requestId)
  135. {
  136. $this->requestId = $requestId;
  137. }
  138. public function setComment($comment)
  139. {
  140. $this->comment = $comment;
  141. }
  142. }
  143. class PddTrainCreateOtcbookRequest_OtcChooseSeatItem extends PopBaseJsonEntity
  144. {
  145. public function __construct()
  146. {
  147. }
  148. /**
  149. * @JsonProperty(Integer, "otc_choose_seat_type")
  150. */
  151. private $otcChooseSeatType;
  152. /**
  153. * @JsonProperty(Integer, "count")
  154. */
  155. private $count;
  156. public function setOtcChooseSeatType($otcChooseSeatType)
  157. {
  158. $this->otcChooseSeatType = $otcChooseSeatType;
  159. }
  160. public function setCount($count)
  161. {
  162. $this->count = $count;
  163. }
  164. }
  165. class PddTrainCreateOtcbookRequest_PassengerInfosItem extends PopBaseJsonEntity
  166. {
  167. public function __construct()
  168. {
  169. }
  170. /**
  171. * @JsonProperty(String, "card_type")
  172. */
  173. private $cardType;
  174. /**
  175. * @JsonProperty(String, "card_no")
  176. */
  177. private $cardNo;
  178. /**
  179. * @JsonProperty(String, "name")
  180. */
  181. private $name;
  182. /**
  183. * @JsonProperty(Integer, "ticket_type")
  184. */
  185. private $ticketType;
  186. /**
  187. * @JsonProperty(Integer, "seat_type")
  188. */
  189. private $seatType;
  190. /**
  191. * @JsonProperty(Long, "ticket_price")
  192. */
  193. private $ticketPrice;
  194. /**
  195. * @JsonProperty(String, "sub_pdd_order_id")
  196. */
  197. private $subPddOrderId;
  198. /**
  199. * @JsonProperty(String, "birthday")
  200. */
  201. private $birthday;
  202. /**
  203. * @JsonProperty(String, "effective_date")
  204. */
  205. private $effectiveDate;
  206. /**
  207. * @JsonProperty(String, "mobile")
  208. */
  209. private $mobile;
  210. /**
  211. * @JsonProperty(String, "sex")
  212. */
  213. private $sex;
  214. /**
  215. * @JsonProperty(String, "country")
  216. */
  217. private $country;
  218. /**
  219. * @JsonProperty(String, "email")
  220. */
  221. private $email;
  222. /**
  223. * @JsonProperty(String, "comment")
  224. */
  225. private $comment;
  226. public function setCardType($cardType)
  227. {
  228. $this->cardType = $cardType;
  229. }
  230. public function setCardNo($cardNo)
  231. {
  232. $this->cardNo = $cardNo;
  233. }
  234. public function setName($name)
  235. {
  236. $this->name = $name;
  237. }
  238. public function setTicketType($ticketType)
  239. {
  240. $this->ticketType = $ticketType;
  241. }
  242. public function setSeatType($seatType)
  243. {
  244. $this->seatType = $seatType;
  245. }
  246. public function setTicketPrice($ticketPrice)
  247. {
  248. $this->ticketPrice = $ticketPrice;
  249. }
  250. public function setSubPddOrderId($subPddOrderId)
  251. {
  252. $this->subPddOrderId = $subPddOrderId;
  253. }
  254. public function setBirthday($birthday)
  255. {
  256. $this->birthday = $birthday;
  257. }
  258. public function setEffectiveDate($effectiveDate)
  259. {
  260. $this->effectiveDate = $effectiveDate;
  261. }
  262. public function setMobile($mobile)
  263. {
  264. $this->mobile = $mobile;
  265. }
  266. public function setSex($sex)
  267. {
  268. $this->sex = $sex;
  269. }
  270. public function setCountry($country)
  271. {
  272. $this->country = $country;
  273. }
  274. public function setEmail($email)
  275. {
  276. $this->email = $email;
  277. }
  278. public function setComment($comment)
  279. {
  280. $this->comment = $comment;
  281. }
  282. }