AlipayUserInvitetaskExchangeConsultModel.py 3.6 KB

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