PddTrainGrabCreateRequest.php 5.2 KB

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