AlipayEcoCplifeCommunityBatchqueryResponse.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. from alipay.aop.api.domain.CPCommunitySet import CPCommunitySet
  6. class AlipayEcoCplifeCommunityBatchqueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayEcoCplifeCommunityBatchqueryResponse, self).__init__()
  9. self._community_list = None
  10. self._current_page_num = None
  11. self._total_community_count = None
  12. @property
  13. def community_list(self):
  14. return self._community_list
  15. @community_list.setter
  16. def community_list(self, value):
  17. if isinstance(value, list):
  18. self._community_list = list()
  19. for i in value:
  20. if isinstance(i, CPCommunitySet):
  21. self._community_list.append(i)
  22. else:
  23. self._community_list.append(CPCommunitySet.from_alipay_dict(i))
  24. @property
  25. def current_page_num(self):
  26. return self._current_page_num
  27. @current_page_num.setter
  28. def current_page_num(self, value):
  29. self._current_page_num = value
  30. @property
  31. def total_community_count(self):
  32. return self._total_community_count
  33. @total_community_count.setter
  34. def total_community_count(self, value):
  35. self._total_community_count = value
  36. def parse_response_content(self, response_content):
  37. response = super(AlipayEcoCplifeCommunityBatchqueryResponse, self).parse_response_content(response_content)
  38. if 'community_list' in response:
  39. self.community_list = response['community_list']
  40. if 'current_page_num' in response:
  41. self.current_page_num = response['current_page_num']
  42. if 'total_community_count' in response:
  43. self.total_community_count = response['total_community_count']