MybankPaymentTradeQrcodeCreateModel.py 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class MybankPaymentTradeQrcodeCreateModel(object):
  6. def __init__(self):
  7. self._account_category = None
  8. self._account_type = None
  9. self._amount = None
  10. self._bank_name = None
  11. self._biz_no = None
  12. self._biz_scene = None
  13. self._branch_inst_code = None
  14. self._branch_name = None
  15. self._channel = None
  16. self._currency = None
  17. self._enterprise_scheme_ar_no = None
  18. self._inst_code = None
  19. self._invalid_date = None
  20. self._order_ext = None
  21. self._personal_scheme_ar_no = None
  22. self._qr_code_type = None
  23. self._receipt_account_name = None
  24. self._receipt_account_no = None
  25. @property
  26. def account_category(self):
  27. return self._account_category
  28. @account_category.setter
  29. def account_category(self, value):
  30. self._account_category = value
  31. @property
  32. def account_type(self):
  33. return self._account_type
  34. @account_type.setter
  35. def account_type(self, value):
  36. self._account_type = value
  37. @property
  38. def amount(self):
  39. return self._amount
  40. @amount.setter
  41. def amount(self, value):
  42. self._amount = value
  43. @property
  44. def bank_name(self):
  45. return self._bank_name
  46. @bank_name.setter
  47. def bank_name(self, value):
  48. self._bank_name = value
  49. @property
  50. def biz_no(self):
  51. return self._biz_no
  52. @biz_no.setter
  53. def biz_no(self, value):
  54. self._biz_no = value
  55. @property
  56. def biz_scene(self):
  57. return self._biz_scene
  58. @biz_scene.setter
  59. def biz_scene(self, value):
  60. self._biz_scene = value
  61. @property
  62. def branch_inst_code(self):
  63. return self._branch_inst_code
  64. @branch_inst_code.setter
  65. def branch_inst_code(self, value):
  66. self._branch_inst_code = value
  67. @property
  68. def branch_name(self):
  69. return self._branch_name
  70. @branch_name.setter
  71. def branch_name(self, value):
  72. self._branch_name = value
  73. @property
  74. def channel(self):
  75. return self._channel
  76. @channel.setter
  77. def channel(self, value):
  78. self._channel = value
  79. @property
  80. def currency(self):
  81. return self._currency
  82. @currency.setter
  83. def currency(self, value):
  84. self._currency = value
  85. @property
  86. def enterprise_scheme_ar_no(self):
  87. return self._enterprise_scheme_ar_no
  88. @enterprise_scheme_ar_no.setter
  89. def enterprise_scheme_ar_no(self, value):
  90. self._enterprise_scheme_ar_no = value
  91. @property
  92. def inst_code(self):
  93. return self._inst_code
  94. @inst_code.setter
  95. def inst_code(self, value):
  96. self._inst_code = value
  97. @property
  98. def invalid_date(self):
  99. return self._invalid_date
  100. @invalid_date.setter
  101. def invalid_date(self, value):
  102. self._invalid_date = value
  103. @property
  104. def order_ext(self):
  105. return self._order_ext
  106. @order_ext.setter
  107. def order_ext(self, value):
  108. self._order_ext = value
  109. @property
  110. def personal_scheme_ar_no(self):
  111. return self._personal_scheme_ar_no
  112. @personal_scheme_ar_no.setter
  113. def personal_scheme_ar_no(self, value):
  114. self._personal_scheme_ar_no = value
  115. @property
  116. def qr_code_type(self):
  117. return self._qr_code_type
  118. @qr_code_type.setter
  119. def qr_code_type(self, value):
  120. self._qr_code_type = value
  121. @property
  122. def receipt_account_name(self):
  123. return self._receipt_account_name
  124. @receipt_account_name.setter
  125. def receipt_account_name(self, value):
  126. self._receipt_account_name = value
  127. @property
  128. def receipt_account_no(self):
  129. return self._receipt_account_no
  130. @receipt_account_no.setter
  131. def receipt_account_no(self, value):
  132. self._receipt_account_no = value
  133. def to_alipay_dict(self):
  134. params = dict()
  135. if self.account_category:
  136. if hasattr(self.account_category, 'to_alipay_dict'):
  137. params['account_category'] = self.account_category.to_alipay_dict()
  138. else:
  139. params['account_category'] = self.account_category
  140. if self.account_type:
  141. if hasattr(self.account_type, 'to_alipay_dict'):
  142. params['account_type'] = self.account_type.to_alipay_dict()
  143. else:
  144. params['account_type'] = self.account_type
  145. if self.amount:
  146. if hasattr(self.amount, 'to_alipay_dict'):
  147. params['amount'] = self.amount.to_alipay_dict()
  148. else:
  149. params['amount'] = self.amount
  150. if self.bank_name:
  151. if hasattr(self.bank_name, 'to_alipay_dict'):
  152. params['bank_name'] = self.bank_name.to_alipay_dict()
  153. else:
  154. params['bank_name'] = self.bank_name
  155. if self.biz_no:
  156. if hasattr(self.biz_no, 'to_alipay_dict'):
  157. params['biz_no'] = self.biz_no.to_alipay_dict()
  158. else:
  159. params['biz_no'] = self.biz_no
  160. if self.biz_scene:
  161. if hasattr(self.biz_scene, 'to_alipay_dict'):
  162. params['biz_scene'] = self.biz_scene.to_alipay_dict()
  163. else:
  164. params['biz_scene'] = self.biz_scene
  165. if self.branch_inst_code:
  166. if hasattr(self.branch_inst_code, 'to_alipay_dict'):
  167. params['branch_inst_code'] = self.branch_inst_code.to_alipay_dict()
  168. else:
  169. params['branch_inst_code'] = self.branch_inst_code
  170. if self.branch_name:
  171. if hasattr(self.branch_name, 'to_alipay_dict'):
  172. params['branch_name'] = self.branch_name.to_alipay_dict()
  173. else:
  174. params['branch_name'] = self.branch_name
  175. if self.channel:
  176. if hasattr(self.channel, 'to_alipay_dict'):
  177. params['channel'] = self.channel.to_alipay_dict()
  178. else:
  179. params['channel'] = self.channel
  180. if self.currency:
  181. if hasattr(self.currency, 'to_alipay_dict'):
  182. params['currency'] = self.currency.to_alipay_dict()
  183. else:
  184. params['currency'] = self.currency
  185. if self.enterprise_scheme_ar_no:
  186. if hasattr(self.enterprise_scheme_ar_no, 'to_alipay_dict'):
  187. params['enterprise_scheme_ar_no'] = self.enterprise_scheme_ar_no.to_alipay_dict()
  188. else:
  189. params['enterprise_scheme_ar_no'] = self.enterprise_scheme_ar_no
  190. if self.inst_code:
  191. if hasattr(self.inst_code, 'to_alipay_dict'):
  192. params['inst_code'] = self.inst_code.to_alipay_dict()
  193. else:
  194. params['inst_code'] = self.inst_code
  195. if self.invalid_date:
  196. if hasattr(self.invalid_date, 'to_alipay_dict'):
  197. params['invalid_date'] = self.invalid_date.to_alipay_dict()
  198. else:
  199. params['invalid_date'] = self.invalid_date
  200. if self.order_ext:
  201. if hasattr(self.order_ext, 'to_alipay_dict'):
  202. params['order_ext'] = self.order_ext.to_alipay_dict()
  203. else:
  204. params['order_ext'] = self.order_ext
  205. if self.personal_scheme_ar_no:
  206. if hasattr(self.personal_scheme_ar_no, 'to_alipay_dict'):
  207. params['personal_scheme_ar_no'] = self.personal_scheme_ar_no.to_alipay_dict()
  208. else:
  209. params['personal_scheme_ar_no'] = self.personal_scheme_ar_no
  210. if self.qr_code_type:
  211. if hasattr(self.qr_code_type, 'to_alipay_dict'):
  212. params['qr_code_type'] = self.qr_code_type.to_alipay_dict()
  213. else:
  214. params['qr_code_type'] = self.qr_code_type
  215. if self.receipt_account_name:
  216. if hasattr(self.receipt_account_name, 'to_alipay_dict'):
  217. params['receipt_account_name'] = self.receipt_account_name.to_alipay_dict()
  218. else:
  219. params['receipt_account_name'] = self.receipt_account_name
  220. if self.receipt_account_no:
  221. if hasattr(self.receipt_account_no, 'to_alipay_dict'):
  222. params['receipt_account_no'] = self.receipt_account_no.to_alipay_dict()
  223. else:
  224. params['receipt_account_no'] = self.receipt_account_no
  225. return params
  226. @staticmethod
  227. def from_alipay_dict(d):
  228. if not d:
  229. return None
  230. o = MybankPaymentTradeQrcodeCreateModel()
  231. if 'account_category' in d:
  232. o.account_category = d['account_category']
  233. if 'account_type' in d:
  234. o.account_type = d['account_type']
  235. if 'amount' in d:
  236. o.amount = d['amount']
  237. if 'bank_name' in d:
  238. o.bank_name = d['bank_name']
  239. if 'biz_no' in d:
  240. o.biz_no = d['biz_no']
  241. if 'biz_scene' in d:
  242. o.biz_scene = d['biz_scene']
  243. if 'branch_inst_code' in d:
  244. o.branch_inst_code = d['branch_inst_code']
  245. if 'branch_name' in d:
  246. o.branch_name = d['branch_name']
  247. if 'channel' in d:
  248. o.channel = d['channel']
  249. if 'currency' in d:
  250. o.currency = d['currency']
  251. if 'enterprise_scheme_ar_no' in d:
  252. o.enterprise_scheme_ar_no = d['enterprise_scheme_ar_no']
  253. if 'inst_code' in d:
  254. o.inst_code = d['inst_code']
  255. if 'invalid_date' in d:
  256. o.invalid_date = d['invalid_date']
  257. if 'order_ext' in d:
  258. o.order_ext = d['order_ext']
  259. if 'personal_scheme_ar_no' in d:
  260. o.personal_scheme_ar_no = d['personal_scheme_ar_no']
  261. if 'qr_code_type' in d:
  262. o.qr_code_type = d['qr_code_type']
  263. if 'receipt_account_name' in d:
  264. o.receipt_account_name = d['receipt_account_name']
  265. if 'receipt_account_no' in d:
  266. o.receipt_account_no = d['receipt_account_no']
  267. return o