AlipayInsSceneSellerActivitySignModel.py 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayInsSceneSellerActivitySignModel(object):
  6. def __init__(self):
  7. self._biz_data = None
  8. self._channel_account_id = None
  9. self._channel_account_type = None
  10. self._sp_code = None
  11. @property
  12. def biz_data(self):
  13. return self._biz_data
  14. @biz_data.setter
  15. def biz_data(self, value):
  16. self._biz_data = value
  17. @property
  18. def channel_account_id(self):
  19. return self._channel_account_id
  20. @channel_account_id.setter
  21. def channel_account_id(self, value):
  22. self._channel_account_id = value
  23. @property
  24. def channel_account_type(self):
  25. return self._channel_account_type
  26. @channel_account_type.setter
  27. def channel_account_type(self, value):
  28. self._channel_account_type = value
  29. @property
  30. def sp_code(self):
  31. return self._sp_code
  32. @sp_code.setter
  33. def sp_code(self, value):
  34. self._sp_code = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.biz_data:
  38. if hasattr(self.biz_data, 'to_alipay_dict'):
  39. params['biz_data'] = self.biz_data.to_alipay_dict()
  40. else:
  41. params['biz_data'] = self.biz_data
  42. if self.channel_account_id:
  43. if hasattr(self.channel_account_id, 'to_alipay_dict'):
  44. params['channel_account_id'] = self.channel_account_id.to_alipay_dict()
  45. else:
  46. params['channel_account_id'] = self.channel_account_id
  47. if self.channel_account_type:
  48. if hasattr(self.channel_account_type, 'to_alipay_dict'):
  49. params['channel_account_type'] = self.channel_account_type.to_alipay_dict()
  50. else:
  51. params['channel_account_type'] = self.channel_account_type
  52. if self.sp_code:
  53. if hasattr(self.sp_code, 'to_alipay_dict'):
  54. params['sp_code'] = self.sp_code.to_alipay_dict()
  55. else:
  56. params['sp_code'] = self.sp_code
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipayInsSceneSellerActivitySignModel()
  63. if 'biz_data' in d:
  64. o.biz_data = d['biz_data']
  65. if 'channel_account_id' in d:
  66. o.channel_account_id = d['channel_account_id']
  67. if 'channel_account_type' in d:
  68. o.channel_account_type = d['channel_account_type']
  69. if 'sp_code' in d:
  70. o.sp_code = d['sp_code']
  71. return o