AlipayOverseasTaxOrderPayModel.py 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOverseasTaxOrderPayModel(object):
  6. def __init__(self):
  7. self._available_day = None
  8. self._biz_mode = None
  9. self._company_name = None
  10. self._confirm_date = None
  11. self._country_code = None
  12. self._departure_point = None
  13. self._doc_expire_date = None
  14. self._doc_id = None
  15. self._extend_param = None
  16. self._identify_account_no = None
  17. self._identify_account_type = None
  18. self._nationality = None
  19. self._out_order_no = None
  20. self._passport_name = None
  21. self._passport_no = None
  22. self._sales_amount = None
  23. self._sales_currency = None
  24. self._sales_date = None
  25. self._tax_refund_amount = None
  26. self._tax_refund_currency = None
  27. self._tax_refund_print_date = None
  28. self._tax_refund_scene_type = None
  29. self._user_received_amount = None
  30. self._user_received_currency = None
  31. @property
  32. def available_day(self):
  33. return self._available_day
  34. @available_day.setter
  35. def available_day(self, value):
  36. self._available_day = value
  37. @property
  38. def biz_mode(self):
  39. return self._biz_mode
  40. @biz_mode.setter
  41. def biz_mode(self, value):
  42. self._biz_mode = value
  43. @property
  44. def company_name(self):
  45. return self._company_name
  46. @company_name.setter
  47. def company_name(self, value):
  48. self._company_name = value
  49. @property
  50. def confirm_date(self):
  51. return self._confirm_date
  52. @confirm_date.setter
  53. def confirm_date(self, value):
  54. self._confirm_date = value
  55. @property
  56. def country_code(self):
  57. return self._country_code
  58. @country_code.setter
  59. def country_code(self, value):
  60. self._country_code = value
  61. @property
  62. def departure_point(self):
  63. return self._departure_point
  64. @departure_point.setter
  65. def departure_point(self, value):
  66. self._departure_point = value
  67. @property
  68. def doc_expire_date(self):
  69. return self._doc_expire_date
  70. @doc_expire_date.setter
  71. def doc_expire_date(self, value):
  72. self._doc_expire_date = value
  73. @property
  74. def doc_id(self):
  75. return self._doc_id
  76. @doc_id.setter
  77. def doc_id(self, value):
  78. self._doc_id = value
  79. @property
  80. def extend_param(self):
  81. return self._extend_param
  82. @extend_param.setter
  83. def extend_param(self, value):
  84. self._extend_param = value
  85. @property
  86. def identify_account_no(self):
  87. return self._identify_account_no
  88. @identify_account_no.setter
  89. def identify_account_no(self, value):
  90. self._identify_account_no = value
  91. @property
  92. def identify_account_type(self):
  93. return self._identify_account_type
  94. @identify_account_type.setter
  95. def identify_account_type(self, value):
  96. self._identify_account_type = value
  97. @property
  98. def nationality(self):
  99. return self._nationality
  100. @nationality.setter
  101. def nationality(self, value):
  102. self._nationality = value
  103. @property
  104. def out_order_no(self):
  105. return self._out_order_no
  106. @out_order_no.setter
  107. def out_order_no(self, value):
  108. self._out_order_no = value
  109. @property
  110. def passport_name(self):
  111. return self._passport_name
  112. @passport_name.setter
  113. def passport_name(self, value):
  114. self._passport_name = value
  115. @property
  116. def passport_no(self):
  117. return self._passport_no
  118. @passport_no.setter
  119. def passport_no(self, value):
  120. self._passport_no = value
  121. @property
  122. def sales_amount(self):
  123. return self._sales_amount
  124. @sales_amount.setter
  125. def sales_amount(self, value):
  126. self._sales_amount = value
  127. @property
  128. def sales_currency(self):
  129. return self._sales_currency
  130. @sales_currency.setter
  131. def sales_currency(self, value):
  132. self._sales_currency = value
  133. @property
  134. def sales_date(self):
  135. return self._sales_date
  136. @sales_date.setter
  137. def sales_date(self, value):
  138. self._sales_date = value
  139. @property
  140. def tax_refund_amount(self):
  141. return self._tax_refund_amount
  142. @tax_refund_amount.setter
  143. def tax_refund_amount(self, value):
  144. self._tax_refund_amount = value
  145. @property
  146. def tax_refund_currency(self):
  147. return self._tax_refund_currency
  148. @tax_refund_currency.setter
  149. def tax_refund_currency(self, value):
  150. self._tax_refund_currency = value
  151. @property
  152. def tax_refund_print_date(self):
  153. return self._tax_refund_print_date
  154. @tax_refund_print_date.setter
  155. def tax_refund_print_date(self, value):
  156. self._tax_refund_print_date = value
  157. @property
  158. def tax_refund_scene_type(self):
  159. return self._tax_refund_scene_type
  160. @tax_refund_scene_type.setter
  161. def tax_refund_scene_type(self, value):
  162. self._tax_refund_scene_type = value
  163. @property
  164. def user_received_amount(self):
  165. return self._user_received_amount
  166. @user_received_amount.setter
  167. def user_received_amount(self, value):
  168. self._user_received_amount = value
  169. @property
  170. def user_received_currency(self):
  171. return self._user_received_currency
  172. @user_received_currency.setter
  173. def user_received_currency(self, value):
  174. self._user_received_currency = value
  175. def to_alipay_dict(self):
  176. params = dict()
  177. if self.available_day:
  178. if hasattr(self.available_day, 'to_alipay_dict'):
  179. params['available_day'] = self.available_day.to_alipay_dict()
  180. else:
  181. params['available_day'] = self.available_day
  182. if self.biz_mode:
  183. if hasattr(self.biz_mode, 'to_alipay_dict'):
  184. params['biz_mode'] = self.biz_mode.to_alipay_dict()
  185. else:
  186. params['biz_mode'] = self.biz_mode
  187. if self.company_name:
  188. if hasattr(self.company_name, 'to_alipay_dict'):
  189. params['company_name'] = self.company_name.to_alipay_dict()
  190. else:
  191. params['company_name'] = self.company_name
  192. if self.confirm_date:
  193. if hasattr(self.confirm_date, 'to_alipay_dict'):
  194. params['confirm_date'] = self.confirm_date.to_alipay_dict()
  195. else:
  196. params['confirm_date'] = self.confirm_date
  197. if self.country_code:
  198. if hasattr(self.country_code, 'to_alipay_dict'):
  199. params['country_code'] = self.country_code.to_alipay_dict()
  200. else:
  201. params['country_code'] = self.country_code
  202. if self.departure_point:
  203. if hasattr(self.departure_point, 'to_alipay_dict'):
  204. params['departure_point'] = self.departure_point.to_alipay_dict()
  205. else:
  206. params['departure_point'] = self.departure_point
  207. if self.doc_expire_date:
  208. if hasattr(self.doc_expire_date, 'to_alipay_dict'):
  209. params['doc_expire_date'] = self.doc_expire_date.to_alipay_dict()
  210. else:
  211. params['doc_expire_date'] = self.doc_expire_date
  212. if self.doc_id:
  213. if hasattr(self.doc_id, 'to_alipay_dict'):
  214. params['doc_id'] = self.doc_id.to_alipay_dict()
  215. else:
  216. params['doc_id'] = self.doc_id
  217. if self.extend_param:
  218. if hasattr(self.extend_param, 'to_alipay_dict'):
  219. params['extend_param'] = self.extend_param.to_alipay_dict()
  220. else:
  221. params['extend_param'] = self.extend_param
  222. if self.identify_account_no:
  223. if hasattr(self.identify_account_no, 'to_alipay_dict'):
  224. params['identify_account_no'] = self.identify_account_no.to_alipay_dict()
  225. else:
  226. params['identify_account_no'] = self.identify_account_no
  227. if self.identify_account_type:
  228. if hasattr(self.identify_account_type, 'to_alipay_dict'):
  229. params['identify_account_type'] = self.identify_account_type.to_alipay_dict()
  230. else:
  231. params['identify_account_type'] = self.identify_account_type
  232. if self.nationality:
  233. if hasattr(self.nationality, 'to_alipay_dict'):
  234. params['nationality'] = self.nationality.to_alipay_dict()
  235. else:
  236. params['nationality'] = self.nationality
  237. if self.out_order_no:
  238. if hasattr(self.out_order_no, 'to_alipay_dict'):
  239. params['out_order_no'] = self.out_order_no.to_alipay_dict()
  240. else:
  241. params['out_order_no'] = self.out_order_no
  242. if self.passport_name:
  243. if hasattr(self.passport_name, 'to_alipay_dict'):
  244. params['passport_name'] = self.passport_name.to_alipay_dict()
  245. else:
  246. params['passport_name'] = self.passport_name
  247. if self.passport_no:
  248. if hasattr(self.passport_no, 'to_alipay_dict'):
  249. params['passport_no'] = self.passport_no.to_alipay_dict()
  250. else:
  251. params['passport_no'] = self.passport_no
  252. if self.sales_amount:
  253. if hasattr(self.sales_amount, 'to_alipay_dict'):
  254. params['sales_amount'] = self.sales_amount.to_alipay_dict()
  255. else:
  256. params['sales_amount'] = self.sales_amount
  257. if self.sales_currency:
  258. if hasattr(self.sales_currency, 'to_alipay_dict'):
  259. params['sales_currency'] = self.sales_currency.to_alipay_dict()
  260. else:
  261. params['sales_currency'] = self.sales_currency
  262. if self.sales_date:
  263. if hasattr(self.sales_date, 'to_alipay_dict'):
  264. params['sales_date'] = self.sales_date.to_alipay_dict()
  265. else:
  266. params['sales_date'] = self.sales_date
  267. if self.tax_refund_amount:
  268. if hasattr(self.tax_refund_amount, 'to_alipay_dict'):
  269. params['tax_refund_amount'] = self.tax_refund_amount.to_alipay_dict()
  270. else:
  271. params['tax_refund_amount'] = self.tax_refund_amount
  272. if self.tax_refund_currency:
  273. if hasattr(self.tax_refund_currency, 'to_alipay_dict'):
  274. params['tax_refund_currency'] = self.tax_refund_currency.to_alipay_dict()
  275. else:
  276. params['tax_refund_currency'] = self.tax_refund_currency
  277. if self.tax_refund_print_date:
  278. if hasattr(self.tax_refund_print_date, 'to_alipay_dict'):
  279. params['tax_refund_print_date'] = self.tax_refund_print_date.to_alipay_dict()
  280. else:
  281. params['tax_refund_print_date'] = self.tax_refund_print_date
  282. if self.tax_refund_scene_type:
  283. if hasattr(self.tax_refund_scene_type, 'to_alipay_dict'):
  284. params['tax_refund_scene_type'] = self.tax_refund_scene_type.to_alipay_dict()
  285. else:
  286. params['tax_refund_scene_type'] = self.tax_refund_scene_type
  287. if self.user_received_amount:
  288. if hasattr(self.user_received_amount, 'to_alipay_dict'):
  289. params['user_received_amount'] = self.user_received_amount.to_alipay_dict()
  290. else:
  291. params['user_received_amount'] = self.user_received_amount
  292. if self.user_received_currency:
  293. if hasattr(self.user_received_currency, 'to_alipay_dict'):
  294. params['user_received_currency'] = self.user_received_currency.to_alipay_dict()
  295. else:
  296. params['user_received_currency'] = self.user_received_currency
  297. return params
  298. @staticmethod
  299. def from_alipay_dict(d):
  300. if not d:
  301. return None
  302. o = AlipayOverseasTaxOrderPayModel()
  303. if 'available_day' in d:
  304. o.available_day = d['available_day']
  305. if 'biz_mode' in d:
  306. o.biz_mode = d['biz_mode']
  307. if 'company_name' in d:
  308. o.company_name = d['company_name']
  309. if 'confirm_date' in d:
  310. o.confirm_date = d['confirm_date']
  311. if 'country_code' in d:
  312. o.country_code = d['country_code']
  313. if 'departure_point' in d:
  314. o.departure_point = d['departure_point']
  315. if 'doc_expire_date' in d:
  316. o.doc_expire_date = d['doc_expire_date']
  317. if 'doc_id' in d:
  318. o.doc_id = d['doc_id']
  319. if 'extend_param' in d:
  320. o.extend_param = d['extend_param']
  321. if 'identify_account_no' in d:
  322. o.identify_account_no = d['identify_account_no']
  323. if 'identify_account_type' in d:
  324. o.identify_account_type = d['identify_account_type']
  325. if 'nationality' in d:
  326. o.nationality = d['nationality']
  327. if 'out_order_no' in d:
  328. o.out_order_no = d['out_order_no']
  329. if 'passport_name' in d:
  330. o.passport_name = d['passport_name']
  331. if 'passport_no' in d:
  332. o.passport_no = d['passport_no']
  333. if 'sales_amount' in d:
  334. o.sales_amount = d['sales_amount']
  335. if 'sales_currency' in d:
  336. o.sales_currency = d['sales_currency']
  337. if 'sales_date' in d:
  338. o.sales_date = d['sales_date']
  339. if 'tax_refund_amount' in d:
  340. o.tax_refund_amount = d['tax_refund_amount']
  341. if 'tax_refund_currency' in d:
  342. o.tax_refund_currency = d['tax_refund_currency']
  343. if 'tax_refund_print_date' in d:
  344. o.tax_refund_print_date = d['tax_refund_print_date']
  345. if 'tax_refund_scene_type' in d:
  346. o.tax_refund_scene_type = d['tax_refund_scene_type']
  347. if 'user_received_amount' in d:
  348. o.user_received_amount = d['user_received_amount']
  349. if 'user_received_currency' in d:
  350. o.user_received_currency = d['user_received_currency']
  351. return o