AlipayOpenServicemarketOrderSyncModel.py 6.9 KB

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