AlipayCommerceTransportOfflinepayVirtualcardSendModel.py 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayCommerceTransportOfflinepayVirtualcardSendModel(object):
  6. def __init__(self):
  7. self._action = None
  8. self._balance = None
  9. self._card_data = None
  10. self._card_no = None
  11. self._card_type = None
  12. self._disabled = None
  13. self._disabled_code = None
  14. self._disabled_tips = None
  15. self._ext_info = None
  16. self._last_update_time = None
  17. self._sub_action = None
  18. self._trade_scene = None
  19. self._user_id = None
  20. @property
  21. def action(self):
  22. return self._action
  23. @action.setter
  24. def action(self, value):
  25. self._action = value
  26. @property
  27. def balance(self):
  28. return self._balance
  29. @balance.setter
  30. def balance(self, value):
  31. self._balance = value
  32. @property
  33. def card_data(self):
  34. return self._card_data
  35. @card_data.setter
  36. def card_data(self, value):
  37. self._card_data = value
  38. @property
  39. def card_no(self):
  40. return self._card_no
  41. @card_no.setter
  42. def card_no(self, value):
  43. self._card_no = value
  44. @property
  45. def card_type(self):
  46. return self._card_type
  47. @card_type.setter
  48. def card_type(self, value):
  49. self._card_type = value
  50. @property
  51. def disabled(self):
  52. return self._disabled
  53. @disabled.setter
  54. def disabled(self, value):
  55. self._disabled = value
  56. @property
  57. def disabled_code(self):
  58. return self._disabled_code
  59. @disabled_code.setter
  60. def disabled_code(self, value):
  61. self._disabled_code = value
  62. @property
  63. def disabled_tips(self):
  64. return self._disabled_tips
  65. @disabled_tips.setter
  66. def disabled_tips(self, value):
  67. self._disabled_tips = value
  68. @property
  69. def ext_info(self):
  70. return self._ext_info
  71. @ext_info.setter
  72. def ext_info(self, value):
  73. self._ext_info = value
  74. @property
  75. def last_update_time(self):
  76. return self._last_update_time
  77. @last_update_time.setter
  78. def last_update_time(self, value):
  79. self._last_update_time = value
  80. @property
  81. def sub_action(self):
  82. return self._sub_action
  83. @sub_action.setter
  84. def sub_action(self, value):
  85. self._sub_action = value
  86. @property
  87. def trade_scene(self):
  88. return self._trade_scene
  89. @trade_scene.setter
  90. def trade_scene(self, value):
  91. self._trade_scene = value
  92. @property
  93. def user_id(self):
  94. return self._user_id
  95. @user_id.setter
  96. def user_id(self, value):
  97. self._user_id = value
  98. def to_alipay_dict(self):
  99. params = dict()
  100. if self.action:
  101. if hasattr(self.action, 'to_alipay_dict'):
  102. params['action'] = self.action.to_alipay_dict()
  103. else:
  104. params['action'] = self.action
  105. if self.balance:
  106. if hasattr(self.balance, 'to_alipay_dict'):
  107. params['balance'] = self.balance.to_alipay_dict()
  108. else:
  109. params['balance'] = self.balance
  110. if self.card_data:
  111. if hasattr(self.card_data, 'to_alipay_dict'):
  112. params['card_data'] = self.card_data.to_alipay_dict()
  113. else:
  114. params['card_data'] = self.card_data
  115. if self.card_no:
  116. if hasattr(self.card_no, 'to_alipay_dict'):
  117. params['card_no'] = self.card_no.to_alipay_dict()
  118. else:
  119. params['card_no'] = self.card_no
  120. if self.card_type:
  121. if hasattr(self.card_type, 'to_alipay_dict'):
  122. params['card_type'] = self.card_type.to_alipay_dict()
  123. else:
  124. params['card_type'] = self.card_type
  125. if self.disabled:
  126. if hasattr(self.disabled, 'to_alipay_dict'):
  127. params['disabled'] = self.disabled.to_alipay_dict()
  128. else:
  129. params['disabled'] = self.disabled
  130. if self.disabled_code:
  131. if hasattr(self.disabled_code, 'to_alipay_dict'):
  132. params['disabled_code'] = self.disabled_code.to_alipay_dict()
  133. else:
  134. params['disabled_code'] = self.disabled_code
  135. if self.disabled_tips:
  136. if hasattr(self.disabled_tips, 'to_alipay_dict'):
  137. params['disabled_tips'] = self.disabled_tips.to_alipay_dict()
  138. else:
  139. params['disabled_tips'] = self.disabled_tips
  140. if self.ext_info:
  141. if hasattr(self.ext_info, 'to_alipay_dict'):
  142. params['ext_info'] = self.ext_info.to_alipay_dict()
  143. else:
  144. params['ext_info'] = self.ext_info
  145. if self.last_update_time:
  146. if hasattr(self.last_update_time, 'to_alipay_dict'):
  147. params['last_update_time'] = self.last_update_time.to_alipay_dict()
  148. else:
  149. params['last_update_time'] = self.last_update_time
  150. if self.sub_action:
  151. if hasattr(self.sub_action, 'to_alipay_dict'):
  152. params['sub_action'] = self.sub_action.to_alipay_dict()
  153. else:
  154. params['sub_action'] = self.sub_action
  155. if self.trade_scene:
  156. if hasattr(self.trade_scene, 'to_alipay_dict'):
  157. params['trade_scene'] = self.trade_scene.to_alipay_dict()
  158. else:
  159. params['trade_scene'] = self.trade_scene
  160. if self.user_id:
  161. if hasattr(self.user_id, 'to_alipay_dict'):
  162. params['user_id'] = self.user_id.to_alipay_dict()
  163. else:
  164. params['user_id'] = self.user_id
  165. return params
  166. @staticmethod
  167. def from_alipay_dict(d):
  168. if not d:
  169. return None
  170. o = AlipayCommerceTransportOfflinepayVirtualcardSendModel()
  171. if 'action' in d:
  172. o.action = d['action']
  173. if 'balance' in d:
  174. o.balance = d['balance']
  175. if 'card_data' in d:
  176. o.card_data = d['card_data']
  177. if 'card_no' in d:
  178. o.card_no = d['card_no']
  179. if 'card_type' in d:
  180. o.card_type = d['card_type']
  181. if 'disabled' in d:
  182. o.disabled = d['disabled']
  183. if 'disabled_code' in d:
  184. o.disabled_code = d['disabled_code']
  185. if 'disabled_tips' in d:
  186. o.disabled_tips = d['disabled_tips']
  187. if 'ext_info' in d:
  188. o.ext_info = d['ext_info']
  189. if 'last_update_time' in d:
  190. o.last_update_time = d['last_update_time']
  191. if 'sub_action' in d:
  192. o.sub_action = d['sub_action']
  193. if 'trade_scene' in d:
  194. o.trade_scene = d['trade_scene']
  195. if 'user_id' in d:
  196. o.user_id = d['user_id']
  197. return o