AlipayInsAutoPointReceiveQueryModel.py 2.0 KB

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