KoubeiCateringItemlistQueryResponse.py 1.6 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.CaterItemListInfo import CaterItemListInfo
  6. class KoubeiCateringItemlistQueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(KoubeiCateringItemlistQueryResponse, self).__init__()
  9. self._item_list = None
  10. self._request_id = None
  11. self._total_amount = None
  12. @property
  13. def item_list(self):
  14. return self._item_list
  15. @item_list.setter
  16. def item_list(self, value):
  17. if isinstance(value, list):
  18. self._item_list = list()
  19. for i in value:
  20. if isinstance(i, CaterItemListInfo):
  21. self._item_list.append(i)
  22. else:
  23. self._item_list.append(CaterItemListInfo.from_alipay_dict(i))
  24. @property
  25. def request_id(self):
  26. return self._request_id
  27. @request_id.setter
  28. def request_id(self, value):
  29. self._request_id = value
  30. @property
  31. def total_amount(self):
  32. return self._total_amount
  33. @total_amount.setter
  34. def total_amount(self, value):
  35. self._total_amount = value
  36. def parse_response_content(self, response_content):
  37. response = super(KoubeiCateringItemlistQueryResponse, self).parse_response_content(response_content)
  38. if 'item_list' in response:
  39. self.item_list = response['item_list']
  40. if 'request_id' in response:
  41. self.request_id = response['request_id']
  42. if 'total_amount' in response:
  43. self.total_amount = response['total_amount']