AlipayOpenAppLingqierwuLingqierquQueryModel.py 1.2 KB

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