AlipayOpenOperationBizfeeAftechCreateandpayModel.py 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOpenOperationBizfeeAftechCreateandpayModel(object):
  6. def __init__(self):
  7. self._app_name = None
  8. self._currency = None
  9. self._customer = None
  10. self._gmt_service = None
  11. self._inst_code = None
  12. self._order_amount = None
  13. self._order_no = None
  14. self._out_biz_no = None
  15. self._product_code = None
  16. self._properties = None
  17. self._refundable_amount = None
  18. self._tnt_inst_id = None
  19. @property
  20. def app_name(self):
  21. return self._app_name
  22. @app_name.setter
  23. def app_name(self, value):
  24. self._app_name = value
  25. @property
  26. def currency(self):
  27. return self._currency
  28. @currency.setter
  29. def currency(self, value):
  30. self._currency = value
  31. @property
  32. def customer(self):
  33. return self._customer
  34. @customer.setter
  35. def customer(self, value):
  36. self._customer = value
  37. @property
  38. def gmt_service(self):
  39. return self._gmt_service
  40. @gmt_service.setter
  41. def gmt_service(self, value):
  42. self._gmt_service = value
  43. @property
  44. def inst_code(self):
  45. return self._inst_code
  46. @inst_code.setter
  47. def inst_code(self, value):
  48. self._inst_code = value
  49. @property
  50. def order_amount(self):
  51. return self._order_amount
  52. @order_amount.setter
  53. def order_amount(self, value):
  54. self._order_amount = value
  55. @property
  56. def order_no(self):
  57. return self._order_no
  58. @order_no.setter
  59. def order_no(self, value):
  60. self._order_no = value
  61. @property
  62. def out_biz_no(self):
  63. return self._out_biz_no
  64. @out_biz_no.setter
  65. def out_biz_no(self, value):
  66. self._out_biz_no = value
  67. @property
  68. def product_code(self):
  69. return self._product_code
  70. @product_code.setter
  71. def product_code(self, value):
  72. self._product_code = value
  73. @property
  74. def properties(self):
  75. return self._properties
  76. @properties.setter
  77. def properties(self, value):
  78. self._properties = value
  79. @property
  80. def refundable_amount(self):
  81. return self._refundable_amount
  82. @refundable_amount.setter
  83. def refundable_amount(self, value):
  84. self._refundable_amount = value
  85. @property
  86. def tnt_inst_id(self):
  87. return self._tnt_inst_id
  88. @tnt_inst_id.setter
  89. def tnt_inst_id(self, value):
  90. self._tnt_inst_id = value
  91. def to_alipay_dict(self):
  92. params = dict()
  93. if self.app_name:
  94. if hasattr(self.app_name, 'to_alipay_dict'):
  95. params['app_name'] = self.app_name.to_alipay_dict()
  96. else:
  97. params['app_name'] = self.app_name
  98. if self.currency:
  99. if hasattr(self.currency, 'to_alipay_dict'):
  100. params['currency'] = self.currency.to_alipay_dict()
  101. else:
  102. params['currency'] = self.currency
  103. if self.customer:
  104. if hasattr(self.customer, 'to_alipay_dict'):
  105. params['customer'] = self.customer.to_alipay_dict()
  106. else:
  107. params['customer'] = self.customer
  108. if self.gmt_service:
  109. if hasattr(self.gmt_service, 'to_alipay_dict'):
  110. params['gmt_service'] = self.gmt_service.to_alipay_dict()
  111. else:
  112. params['gmt_service'] = self.gmt_service
  113. if self.inst_code:
  114. if hasattr(self.inst_code, 'to_alipay_dict'):
  115. params['inst_code'] = self.inst_code.to_alipay_dict()
  116. else:
  117. params['inst_code'] = self.inst_code
  118. if self.order_amount:
  119. if hasattr(self.order_amount, 'to_alipay_dict'):
  120. params['order_amount'] = self.order_amount.to_alipay_dict()
  121. else:
  122. params['order_amount'] = self.order_amount
  123. if self.order_no:
  124. if hasattr(self.order_no, 'to_alipay_dict'):
  125. params['order_no'] = self.order_no.to_alipay_dict()
  126. else:
  127. params['order_no'] = self.order_no
  128. if self.out_biz_no:
  129. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  130. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  131. else:
  132. params['out_biz_no'] = self.out_biz_no
  133. if self.product_code:
  134. if hasattr(self.product_code, 'to_alipay_dict'):
  135. params['product_code'] = self.product_code.to_alipay_dict()
  136. else:
  137. params['product_code'] = self.product_code
  138. if self.properties:
  139. if hasattr(self.properties, 'to_alipay_dict'):
  140. params['properties'] = self.properties.to_alipay_dict()
  141. else:
  142. params['properties'] = self.properties
  143. if self.refundable_amount:
  144. if hasattr(self.refundable_amount, 'to_alipay_dict'):
  145. params['refundable_amount'] = self.refundable_amount.to_alipay_dict()
  146. else:
  147. params['refundable_amount'] = self.refundable_amount
  148. if self.tnt_inst_id:
  149. if hasattr(self.tnt_inst_id, 'to_alipay_dict'):
  150. params['tnt_inst_id'] = self.tnt_inst_id.to_alipay_dict()
  151. else:
  152. params['tnt_inst_id'] = self.tnt_inst_id
  153. return params
  154. @staticmethod
  155. def from_alipay_dict(d):
  156. if not d:
  157. return None
  158. o = AlipayOpenOperationBizfeeAftechCreateandpayModel()
  159. if 'app_name' in d:
  160. o.app_name = d['app_name']
  161. if 'currency' in d:
  162. o.currency = d['currency']
  163. if 'customer' in d:
  164. o.customer = d['customer']
  165. if 'gmt_service' in d:
  166. o.gmt_service = d['gmt_service']
  167. if 'inst_code' in d:
  168. o.inst_code = d['inst_code']
  169. if 'order_amount' in d:
  170. o.order_amount = d['order_amount']
  171. if 'order_no' in d:
  172. o.order_no = d['order_no']
  173. if 'out_biz_no' in d:
  174. o.out_biz_no = d['out_biz_no']
  175. if 'product_code' in d:
  176. o.product_code = d['product_code']
  177. if 'properties' in d:
  178. o.properties = d['properties']
  179. if 'refundable_amount' in d:
  180. o.refundable_amount = d['refundable_amount']
  181. if 'tnt_inst_id' in d:
  182. o.tnt_inst_id = d['tnt_inst_id']
  183. return o