InsSellerActivity.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class InsSellerActivity(object):
  6. def __init__(self):
  7. self._biz_data = None
  8. self._join_time = None
  9. self._status = None
  10. @property
  11. def biz_data(self):
  12. return self._biz_data
  13. @biz_data.setter
  14. def biz_data(self, value):
  15. self._biz_data = value
  16. @property
  17. def join_time(self):
  18. return self._join_time
  19. @join_time.setter
  20. def join_time(self, value):
  21. self._join_time = value
  22. @property
  23. def status(self):
  24. return self._status
  25. @status.setter
  26. def status(self, value):
  27. self._status = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.biz_data:
  31. if hasattr(self.biz_data, 'to_alipay_dict'):
  32. params['biz_data'] = self.biz_data.to_alipay_dict()
  33. else:
  34. params['biz_data'] = self.biz_data
  35. if self.join_time:
  36. if hasattr(self.join_time, 'to_alipay_dict'):
  37. params['join_time'] = self.join_time.to_alipay_dict()
  38. else:
  39. params['join_time'] = self.join_time
  40. if self.status:
  41. if hasattr(self.status, 'to_alipay_dict'):
  42. params['status'] = self.status.to_alipay_dict()
  43. else:
  44. params['status'] = self.status
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = InsSellerActivity()
  51. if 'biz_data' in d:
  52. o.biz_data = d['biz_data']
  53. if 'join_time' in d:
  54. o.join_time = d['join_time']
  55. if 'status' in d:
  56. o.status = d['status']
  57. return o