AlipayUserInvitetaskExchangeConfirmModel.py 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayUserInvitetaskExchangeConfirmModel(object):
  6. def __init__(self):
  7. self._exchange_amount_money = None
  8. self._exchange_type = None
  9. self._order_id = None
  10. self._out_biz_no = None
  11. self._product_id = None
  12. self._task_process_id = None
  13. self._user_id = None
  14. @property
  15. def exchange_amount_money(self):
  16. return self._exchange_amount_money
  17. @exchange_amount_money.setter
  18. def exchange_amount_money(self, value):
  19. self._exchange_amount_money = value
  20. @property
  21. def exchange_type(self):
  22. return self._exchange_type
  23. @exchange_type.setter
  24. def exchange_type(self, value):
  25. self._exchange_type = value
  26. @property
  27. def order_id(self):
  28. return self._order_id
  29. @order_id.setter
  30. def order_id(self, value):
  31. self._order_id = value
  32. @property
  33. def out_biz_no(self):
  34. return self._out_biz_no
  35. @out_biz_no.setter
  36. def out_biz_no(self, value):
  37. self._out_biz_no = value
  38. @property
  39. def product_id(self):
  40. return self._product_id
  41. @product_id.setter
  42. def product_id(self, value):
  43. self._product_id = value
  44. @property
  45. def task_process_id(self):
  46. return self._task_process_id
  47. @task_process_id.setter
  48. def task_process_id(self, value):
  49. self._task_process_id = value
  50. @property
  51. def user_id(self):
  52. return self._user_id
  53. @user_id.setter
  54. def user_id(self, value):
  55. self._user_id = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.exchange_amount_money:
  59. if hasattr(self.exchange_amount_money, 'to_alipay_dict'):
  60. params['exchange_amount_money'] = self.exchange_amount_money.to_alipay_dict()
  61. else:
  62. params['exchange_amount_money'] = self.exchange_amount_money
  63. if self.exchange_type:
  64. if hasattr(self.exchange_type, 'to_alipay_dict'):
  65. params['exchange_type'] = self.exchange_type.to_alipay_dict()
  66. else:
  67. params['exchange_type'] = self.exchange_type
  68. if self.order_id:
  69. if hasattr(self.order_id, 'to_alipay_dict'):
  70. params['order_id'] = self.order_id.to_alipay_dict()
  71. else:
  72. params['order_id'] = self.order_id
  73. if self.out_biz_no:
  74. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  75. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  76. else:
  77. params['out_biz_no'] = self.out_biz_no
  78. if self.product_id:
  79. if hasattr(self.product_id, 'to_alipay_dict'):
  80. params['product_id'] = self.product_id.to_alipay_dict()
  81. else:
  82. params['product_id'] = self.product_id
  83. if self.task_process_id:
  84. if hasattr(self.task_process_id, 'to_alipay_dict'):
  85. params['task_process_id'] = self.task_process_id.to_alipay_dict()
  86. else:
  87. params['task_process_id'] = self.task_process_id
  88. if self.user_id:
  89. if hasattr(self.user_id, 'to_alipay_dict'):
  90. params['user_id'] = self.user_id.to_alipay_dict()
  91. else:
  92. params['user_id'] = self.user_id
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = AlipayUserInvitetaskExchangeConfirmModel()
  99. if 'exchange_amount_money' in d:
  100. o.exchange_amount_money = d['exchange_amount_money']
  101. if 'exchange_type' in d:
  102. o.exchange_type = d['exchange_type']
  103. if 'order_id' in d:
  104. o.order_id = d['order_id']
  105. if 'out_biz_no' in d:
  106. o.out_biz_no = d['out_biz_no']
  107. if 'product_id' in d:
  108. o.product_id = d['product_id']
  109. if 'task_process_id' in d:
  110. o.task_process_id = d['task_process_id']
  111. if 'user_id' in d:
  112. o.user_id = d['user_id']
  113. return o