AlipayOpenOperationBizfeeActivityApplyModel.py 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOpenOperationBizfeeActivityApplyModel(object):
  6. def __init__(self):
  7. self._activity_code = None
  8. self._amount = None
  9. self._gmt_service = None
  10. self._out_biz_no = None
  11. self._partner_id = None
  12. self._properties = None
  13. self._user_id = None
  14. @property
  15. def activity_code(self):
  16. return self._activity_code
  17. @activity_code.setter
  18. def activity_code(self, value):
  19. self._activity_code = value
  20. @property
  21. def amount(self):
  22. return self._amount
  23. @amount.setter
  24. def amount(self, value):
  25. self._amount = value
  26. @property
  27. def gmt_service(self):
  28. return self._gmt_service
  29. @gmt_service.setter
  30. def gmt_service(self, value):
  31. self._gmt_service = 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 partner_id(self):
  40. return self._partner_id
  41. @partner_id.setter
  42. def partner_id(self, value):
  43. self._partner_id = value
  44. @property
  45. def properties(self):
  46. return self._properties
  47. @properties.setter
  48. def properties(self, value):
  49. self._properties = 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.activity_code:
  59. if hasattr(self.activity_code, 'to_alipay_dict'):
  60. params['activity_code'] = self.activity_code.to_alipay_dict()
  61. else:
  62. params['activity_code'] = self.activity_code
  63. if self.amount:
  64. if hasattr(self.amount, 'to_alipay_dict'):
  65. params['amount'] = self.amount.to_alipay_dict()
  66. else:
  67. params['amount'] = self.amount
  68. if self.gmt_service:
  69. if hasattr(self.gmt_service, 'to_alipay_dict'):
  70. params['gmt_service'] = self.gmt_service.to_alipay_dict()
  71. else:
  72. params['gmt_service'] = self.gmt_service
  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.partner_id:
  79. if hasattr(self.partner_id, 'to_alipay_dict'):
  80. params['partner_id'] = self.partner_id.to_alipay_dict()
  81. else:
  82. params['partner_id'] = self.partner_id
  83. if self.properties:
  84. if hasattr(self.properties, 'to_alipay_dict'):
  85. params['properties'] = self.properties.to_alipay_dict()
  86. else:
  87. params['properties'] = self.properties
  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 = AlipayOpenOperationBizfeeActivityApplyModel()
  99. if 'activity_code' in d:
  100. o.activity_code = d['activity_code']
  101. if 'amount' in d:
  102. o.amount = d['amount']
  103. if 'gmt_service' in d:
  104. o.gmt_service = d['gmt_service']
  105. if 'out_biz_no' in d:
  106. o.out_biz_no = d['out_biz_no']
  107. if 'partner_id' in d:
  108. o.partner_id = d['partner_id']
  109. if 'properties' in d:
  110. o.properties = d['properties']
  111. if 'user_id' in d:
  112. o.user_id = d['user_id']
  113. return o