AlipaySocialGiftStockQueryResponse.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipaySocialGiftStockQueryResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipaySocialGiftStockQueryResponse, self).__init__()
  8. self._available_count = None
  9. self._exist_list = None
  10. self._not_exist_list = None
  11. self._total_count = None
  12. @property
  13. def available_count(self):
  14. return self._available_count
  15. @available_count.setter
  16. def available_count(self, value):
  17. self._available_count = value
  18. @property
  19. def exist_list(self):
  20. return self._exist_list
  21. @exist_list.setter
  22. def exist_list(self, value):
  23. if isinstance(value, list):
  24. self._exist_list = list()
  25. for i in value:
  26. self._exist_list.append(i)
  27. @property
  28. def not_exist_list(self):
  29. return self._not_exist_list
  30. @not_exist_list.setter
  31. def not_exist_list(self, value):
  32. if isinstance(value, list):
  33. self._not_exist_list = list()
  34. for i in value:
  35. self._not_exist_list.append(i)
  36. @property
  37. def total_count(self):
  38. return self._total_count
  39. @total_count.setter
  40. def total_count(self, value):
  41. self._total_count = value
  42. def parse_response_content(self, response_content):
  43. response = super(AlipaySocialGiftStockQueryResponse, self).parse_response_content(response_content)
  44. if 'available_count' in response:
  45. self.available_count = response['available_count']
  46. if 'exist_list' in response:
  47. self.exist_list = response['exist_list']
  48. if 'not_exist_list' in response:
  49. self.not_exist_list = response['not_exist_list']
  50. if 'total_count' in response:
  51. self.total_count = response['total_count']