KoubeiAdvertCommissionAdvertQueryModel.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiAdvertCommissionAdvertQueryModel(object):
  6. def __init__(self):
  7. self._identifies = None
  8. self._identify_type = None
  9. @property
  10. def identifies(self):
  11. return self._identifies
  12. @identifies.setter
  13. def identifies(self, value):
  14. if isinstance(value, list):
  15. self._identifies = list()
  16. for i in value:
  17. self._identifies.append(i)
  18. @property
  19. def identify_type(self):
  20. return self._identify_type
  21. @identify_type.setter
  22. def identify_type(self, value):
  23. self._identify_type = value
  24. def to_alipay_dict(self):
  25. params = dict()
  26. if self.identifies:
  27. if isinstance(self.identifies, list):
  28. for i in range(0, len(self.identifies)):
  29. element = self.identifies[i]
  30. if hasattr(element, 'to_alipay_dict'):
  31. self.identifies[i] = element.to_alipay_dict()
  32. if hasattr(self.identifies, 'to_alipay_dict'):
  33. params['identifies'] = self.identifies.to_alipay_dict()
  34. else:
  35. params['identifies'] = self.identifies
  36. if self.identify_type:
  37. if hasattr(self.identify_type, 'to_alipay_dict'):
  38. params['identify_type'] = self.identify_type.to_alipay_dict()
  39. else:
  40. params['identify_type'] = self.identify_type
  41. return params
  42. @staticmethod
  43. def from_alipay_dict(d):
  44. if not d:
  45. return None
  46. o = KoubeiAdvertCommissionAdvertQueryModel()
  47. if 'identifies' in d:
  48. o.identifies = d['identifies']
  49. if 'identify_type' in d:
  50. o.identify_type = d['identify_type']
  51. return o