AlipayUserCharityCommonwealCreateModel.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayUserCharityCommonwealCreateModel(object):
  6. def __init__(self):
  7. self._biz_time = None
  8. self._ext_info = None
  9. self._numerical = None
  10. self._original_data = None
  11. self._partner_id = None
  12. self._unique_id = None
  13. self._user_id = None
  14. @property
  15. def biz_time(self):
  16. return self._biz_time
  17. @biz_time.setter
  18. def biz_time(self, value):
  19. self._biz_time = value
  20. @property
  21. def ext_info(self):
  22. return self._ext_info
  23. @ext_info.setter
  24. def ext_info(self, value):
  25. self._ext_info = value
  26. @property
  27. def numerical(self):
  28. return self._numerical
  29. @numerical.setter
  30. def numerical(self, value):
  31. self._numerical = value
  32. @property
  33. def original_data(self):
  34. return self._original_data
  35. @original_data.setter
  36. def original_data(self, value):
  37. self._original_data = 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 unique_id(self):
  46. return self._unique_id
  47. @unique_id.setter
  48. def unique_id(self, value):
  49. self._unique_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.biz_time:
  59. if hasattr(self.biz_time, 'to_alipay_dict'):
  60. params['biz_time'] = self.biz_time.to_alipay_dict()
  61. else:
  62. params['biz_time'] = self.biz_time
  63. if self.ext_info:
  64. if hasattr(self.ext_info, 'to_alipay_dict'):
  65. params['ext_info'] = self.ext_info.to_alipay_dict()
  66. else:
  67. params['ext_info'] = self.ext_info
  68. if self.numerical:
  69. if hasattr(self.numerical, 'to_alipay_dict'):
  70. params['numerical'] = self.numerical.to_alipay_dict()
  71. else:
  72. params['numerical'] = self.numerical
  73. if self.original_data:
  74. if hasattr(self.original_data, 'to_alipay_dict'):
  75. params['original_data'] = self.original_data.to_alipay_dict()
  76. else:
  77. params['original_data'] = self.original_data
  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.unique_id:
  84. if hasattr(self.unique_id, 'to_alipay_dict'):
  85. params['unique_id'] = self.unique_id.to_alipay_dict()
  86. else:
  87. params['unique_id'] = self.unique_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 = AlipayUserCharityCommonwealCreateModel()
  99. if 'biz_time' in d:
  100. o.biz_time = d['biz_time']
  101. if 'ext_info' in d:
  102. o.ext_info = d['ext_info']
  103. if 'numerical' in d:
  104. o.numerical = d['numerical']
  105. if 'original_data' in d:
  106. o.original_data = d['original_data']
  107. if 'partner_id' in d:
  108. o.partner_id = d['partner_id']
  109. if 'unique_id' in d:
  110. o.unique_id = d['unique_id']
  111. if 'user_id' in d:
  112. o.user_id = d['user_id']
  113. return o