AlipayCommerceCityfacilitatorVoucherConfirmModel.py 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayCommerceCityfacilitatorVoucherConfirmModel(object):
  6. def __init__(self):
  7. self._amount = None
  8. self._biz_info_ext = None
  9. self._biz_request_id = None
  10. self._city_code = None
  11. self._end_station = None
  12. self._exchange_ids = None
  13. self._operate_time = None
  14. self._out_biz_no = None
  15. self._quantity = None
  16. self._seller_id = None
  17. self._start_station = None
  18. self._ticket_no = None
  19. self._ticket_price = None
  20. self._ticket_type = None
  21. self._trade_no = None
  22. @property
  23. def amount(self):
  24. return self._amount
  25. @amount.setter
  26. def amount(self, value):
  27. self._amount = value
  28. @property
  29. def biz_info_ext(self):
  30. return self._biz_info_ext
  31. @biz_info_ext.setter
  32. def biz_info_ext(self, value):
  33. self._biz_info_ext = value
  34. @property
  35. def biz_request_id(self):
  36. return self._biz_request_id
  37. @biz_request_id.setter
  38. def biz_request_id(self, value):
  39. self._biz_request_id = value
  40. @property
  41. def city_code(self):
  42. return self._city_code
  43. @city_code.setter
  44. def city_code(self, value):
  45. self._city_code = value
  46. @property
  47. def end_station(self):
  48. return self._end_station
  49. @end_station.setter
  50. def end_station(self, value):
  51. self._end_station = value
  52. @property
  53. def exchange_ids(self):
  54. return self._exchange_ids
  55. @exchange_ids.setter
  56. def exchange_ids(self, value):
  57. self._exchange_ids = value
  58. @property
  59. def operate_time(self):
  60. return self._operate_time
  61. @operate_time.setter
  62. def operate_time(self, value):
  63. self._operate_time = value
  64. @property
  65. def out_biz_no(self):
  66. return self._out_biz_no
  67. @out_biz_no.setter
  68. def out_biz_no(self, value):
  69. self._out_biz_no = value
  70. @property
  71. def quantity(self):
  72. return self._quantity
  73. @quantity.setter
  74. def quantity(self, value):
  75. self._quantity = value
  76. @property
  77. def seller_id(self):
  78. return self._seller_id
  79. @seller_id.setter
  80. def seller_id(self, value):
  81. self._seller_id = value
  82. @property
  83. def start_station(self):
  84. return self._start_station
  85. @start_station.setter
  86. def start_station(self, value):
  87. self._start_station = value
  88. @property
  89. def ticket_no(self):
  90. return self._ticket_no
  91. @ticket_no.setter
  92. def ticket_no(self, value):
  93. self._ticket_no = value
  94. @property
  95. def ticket_price(self):
  96. return self._ticket_price
  97. @ticket_price.setter
  98. def ticket_price(self, value):
  99. self._ticket_price = value
  100. @property
  101. def ticket_type(self):
  102. return self._ticket_type
  103. @ticket_type.setter
  104. def ticket_type(self, value):
  105. self._ticket_type = value
  106. @property
  107. def trade_no(self):
  108. return self._trade_no
  109. @trade_no.setter
  110. def trade_no(self, value):
  111. self._trade_no = value
  112. def to_alipay_dict(self):
  113. params = dict()
  114. if self.amount:
  115. if hasattr(self.amount, 'to_alipay_dict'):
  116. params['amount'] = self.amount.to_alipay_dict()
  117. else:
  118. params['amount'] = self.amount
  119. if self.biz_info_ext:
  120. if hasattr(self.biz_info_ext, 'to_alipay_dict'):
  121. params['biz_info_ext'] = self.biz_info_ext.to_alipay_dict()
  122. else:
  123. params['biz_info_ext'] = self.biz_info_ext
  124. if self.biz_request_id:
  125. if hasattr(self.biz_request_id, 'to_alipay_dict'):
  126. params['biz_request_id'] = self.biz_request_id.to_alipay_dict()
  127. else:
  128. params['biz_request_id'] = self.biz_request_id
  129. if self.city_code:
  130. if hasattr(self.city_code, 'to_alipay_dict'):
  131. params['city_code'] = self.city_code.to_alipay_dict()
  132. else:
  133. params['city_code'] = self.city_code
  134. if self.end_station:
  135. if hasattr(self.end_station, 'to_alipay_dict'):
  136. params['end_station'] = self.end_station.to_alipay_dict()
  137. else:
  138. params['end_station'] = self.end_station
  139. if self.exchange_ids:
  140. if hasattr(self.exchange_ids, 'to_alipay_dict'):
  141. params['exchange_ids'] = self.exchange_ids.to_alipay_dict()
  142. else:
  143. params['exchange_ids'] = self.exchange_ids
  144. if self.operate_time:
  145. if hasattr(self.operate_time, 'to_alipay_dict'):
  146. params['operate_time'] = self.operate_time.to_alipay_dict()
  147. else:
  148. params['operate_time'] = self.operate_time
  149. if self.out_biz_no:
  150. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  151. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  152. else:
  153. params['out_biz_no'] = self.out_biz_no
  154. if self.quantity:
  155. if hasattr(self.quantity, 'to_alipay_dict'):
  156. params['quantity'] = self.quantity.to_alipay_dict()
  157. else:
  158. params['quantity'] = self.quantity
  159. if self.seller_id:
  160. if hasattr(self.seller_id, 'to_alipay_dict'):
  161. params['seller_id'] = self.seller_id.to_alipay_dict()
  162. else:
  163. params['seller_id'] = self.seller_id
  164. if self.start_station:
  165. if hasattr(self.start_station, 'to_alipay_dict'):
  166. params['start_station'] = self.start_station.to_alipay_dict()
  167. else:
  168. params['start_station'] = self.start_station
  169. if self.ticket_no:
  170. if hasattr(self.ticket_no, 'to_alipay_dict'):
  171. params['ticket_no'] = self.ticket_no.to_alipay_dict()
  172. else:
  173. params['ticket_no'] = self.ticket_no
  174. if self.ticket_price:
  175. if hasattr(self.ticket_price, 'to_alipay_dict'):
  176. params['ticket_price'] = self.ticket_price.to_alipay_dict()
  177. else:
  178. params['ticket_price'] = self.ticket_price
  179. if self.ticket_type:
  180. if hasattr(self.ticket_type, 'to_alipay_dict'):
  181. params['ticket_type'] = self.ticket_type.to_alipay_dict()
  182. else:
  183. params['ticket_type'] = self.ticket_type
  184. if self.trade_no:
  185. if hasattr(self.trade_no, 'to_alipay_dict'):
  186. params['trade_no'] = self.trade_no.to_alipay_dict()
  187. else:
  188. params['trade_no'] = self.trade_no
  189. return params
  190. @staticmethod
  191. def from_alipay_dict(d):
  192. if not d:
  193. return None
  194. o = AlipayCommerceCityfacilitatorVoucherConfirmModel()
  195. if 'amount' in d:
  196. o.amount = d['amount']
  197. if 'biz_info_ext' in d:
  198. o.biz_info_ext = d['biz_info_ext']
  199. if 'biz_request_id' in d:
  200. o.biz_request_id = d['biz_request_id']
  201. if 'city_code' in d:
  202. o.city_code = d['city_code']
  203. if 'end_station' in d:
  204. o.end_station = d['end_station']
  205. if 'exchange_ids' in d:
  206. o.exchange_ids = d['exchange_ids']
  207. if 'operate_time' in d:
  208. o.operate_time = d['operate_time']
  209. if 'out_biz_no' in d:
  210. o.out_biz_no = d['out_biz_no']
  211. if 'quantity' in d:
  212. o.quantity = d['quantity']
  213. if 'seller_id' in d:
  214. o.seller_id = d['seller_id']
  215. if 'start_station' in d:
  216. o.start_station = d['start_station']
  217. if 'ticket_no' in d:
  218. o.ticket_no = d['ticket_no']
  219. if 'ticket_price' in d:
  220. o.ticket_price = d['ticket_price']
  221. if 'ticket_type' in d:
  222. o.ticket_type = d['ticket_type']
  223. if 'trade_no' in d:
  224. o.trade_no = d['trade_no']
  225. return o