PddTrainCreateReserveRequest.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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 PddTrainCreateReserveRequest extends PopBaseHttpRequest
  6. {
  7. public function __construct()
  8. {
  9. }
  10. /**
  11. * @JsonProperty(String, "pdd_order_id")
  12. */
  13. private $pddOrderId;
  14. /**
  15. * @JsonProperty(String, "depart_station")
  16. */
  17. private $departStation;
  18. /**
  19. * @JsonProperty(String, "arrive_station")
  20. */
  21. private $arriveStation;
  22. /**
  23. * @JsonProperty(String, "train_date")
  24. */
  25. private $trainDate;
  26. /**
  27. * @JsonProperty(String, "train_no")
  28. */
  29. private $trainNo;
  30. /**
  31. * @JsonProperty(String, "depart_time")
  32. */
  33. private $departTime;
  34. /**
  35. * @JsonProperty(String, "arrive_time")
  36. */
  37. private $arriveTime;
  38. /**
  39. * @JsonProperty(Integer, "no_seat")
  40. */
  41. private $noSeat;
  42. /**
  43. * @JsonProperty(String, "choose_seat")
  44. */
  45. private $chooseSeat;
  46. /**
  47. * @JsonProperty(String, "crh_account")
  48. */
  49. private $crhAccount;
  50. /**
  51. * @JsonProperty(String, "crh_password")
  52. */
  53. private $crhPassword;
  54. /**
  55. * @JsonProperty(Integer, "switch_account")
  56. */
  57. private $switchAccount;
  58. /**
  59. * @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddTrainCreateReserveRequest_PassengerInfosItem>, "passenger_infos")
  60. */
  61. private $passengerInfos;
  62. protected function setUserParams(&$params)
  63. {
  64. $this->setUserParam($params, "pdd_order_id", $this->pddOrderId);
  65. $this->setUserParam($params, "depart_station", $this->departStation);
  66. $this->setUserParam($params, "arrive_station", $this->arriveStation);
  67. $this->setUserParam($params, "train_date", $this->trainDate);
  68. $this->setUserParam($params, "train_no", $this->trainNo);
  69. $this->setUserParam($params, "depart_time", $this->departTime);
  70. $this->setUserParam($params, "arrive_time", $this->arriveTime);
  71. $this->setUserParam($params, "no_seat", $this->noSeat);
  72. $this->setUserParam($params, "choose_seat", $this->chooseSeat);
  73. $this->setUserParam($params, "crh_account", $this->crhAccount);
  74. $this->setUserParam($params, "crh_password", $this->crhPassword);
  75. $this->setUserParam($params, "switch_account", $this->switchAccount);
  76. $this->setUserParam($params, "passenger_infos", $this->passengerInfos);
  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.reserve";
  89. }
  90. public function setPddOrderId($pddOrderId)
  91. {
  92. $this->pddOrderId = $pddOrderId;
  93. }
  94. public function setDepartStation($departStation)
  95. {
  96. $this->departStation = $departStation;
  97. }
  98. public function setArriveStation($arriveStation)
  99. {
  100. $this->arriveStation = $arriveStation;
  101. }
  102. public function setTrainDate($trainDate)
  103. {
  104. $this->trainDate = $trainDate;
  105. }
  106. public function setTrainNo($trainNo)
  107. {
  108. $this->trainNo = $trainNo;
  109. }
  110. public function setDepartTime($departTime)
  111. {
  112. $this->departTime = $departTime;
  113. }
  114. public function setArriveTime($arriveTime)
  115. {
  116. $this->arriveTime = $arriveTime;
  117. }
  118. public function setNoSeat($noSeat)
  119. {
  120. $this->noSeat = $noSeat;
  121. }
  122. public function setChooseSeat($chooseSeat)
  123. {
  124. $this->chooseSeat = $chooseSeat;
  125. }
  126. public function setCrhAccount($crhAccount)
  127. {
  128. $this->crhAccount = $crhAccount;
  129. }
  130. public function setCrhPassword($crhPassword)
  131. {
  132. $this->crhPassword = $crhPassword;
  133. }
  134. public function setSwitchAccount($switchAccount)
  135. {
  136. $this->switchAccount = $switchAccount;
  137. }
  138. public function setPassengerInfos($passengerInfos)
  139. {
  140. $this->passengerInfos = $passengerInfos;
  141. }
  142. }
  143. class PddTrainCreateReserveRequest_PassengerInfosItem extends PopBaseJsonEntity
  144. {
  145. public function __construct()
  146. {
  147. }
  148. /**
  149. * @JsonProperty(String, "card_type")
  150. */
  151. private $cardType;
  152. /**
  153. * @JsonProperty(String, "card_no")
  154. */
  155. private $cardNo;
  156. /**
  157. * @JsonProperty(String, "name")
  158. */
  159. private $name;
  160. /**
  161. * @JsonProperty(Integer, "ticket_type")
  162. */
  163. private $ticketType;
  164. /**
  165. * @JsonProperty(Integer, "seat_type")
  166. */
  167. private $seatType;
  168. /**
  169. * @JsonProperty(Long, "ticket_price")
  170. */
  171. private $ticketPrice;
  172. /**
  173. * @JsonProperty(String, "sub_pdd_order_id")
  174. */
  175. private $subPddOrderId;
  176. /**
  177. * @JsonProperty(String, "birthday")
  178. */
  179. private $birthday;
  180. /**
  181. * @JsonProperty(String, "effective_Date")
  182. */
  183. private $effectiveDate;
  184. /**
  185. * @JsonProperty(String, "sex")
  186. */
  187. private $sex;
  188. /**
  189. * @JsonProperty(String, "country")
  190. */
  191. private $country;
  192. /**
  193. * @JsonProperty(String, "mobile")
  194. */
  195. private $mobile;
  196. /**
  197. * @JsonProperty(String, "email")
  198. */
  199. private $email;
  200. public function setCardType($cardType)
  201. {
  202. $this->cardType = $cardType;
  203. }
  204. public function setCardNo($cardNo)
  205. {
  206. $this->cardNo = $cardNo;
  207. }
  208. public function setName($name)
  209. {
  210. $this->name = $name;
  211. }
  212. public function setTicketType($ticketType)
  213. {
  214. $this->ticketType = $ticketType;
  215. }
  216. public function setSeatType($seatType)
  217. {
  218. $this->seatType = $seatType;
  219. }
  220. public function setTicketPrice($ticketPrice)
  221. {
  222. $this->ticketPrice = $ticketPrice;
  223. }
  224. public function setSubPddOrderId($subPddOrderId)
  225. {
  226. $this->subPddOrderId = $subPddOrderId;
  227. }
  228. public function setBirthday($birthday)
  229. {
  230. $this->birthday = $birthday;
  231. }
  232. public function setEffectiveDate($effectiveDate)
  233. {
  234. $this->effectiveDate = $effectiveDate;
  235. }
  236. public function setSex($sex)
  237. {
  238. $this->sex = $sex;
  239. }
  240. public function setCountry($country)
  241. {
  242. $this->country = $country;
  243. }
  244. public function setMobile($mobile)
  245. {
  246. $this->mobile = $mobile;
  247. }
  248. public function setEmail($email)
  249. {
  250. $this->email = $email;
  251. }
  252. }