AlipayEbppPdeductAsyncPayModel.py 6.1 KB

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