KoubeiRetailWmsInboundorderQueryResponse.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.InboundOrderLine import InboundOrderLine
  6. from alipay.aop.api.domain.InboundOrderVO import InboundOrderVO
  7. class KoubeiRetailWmsInboundorderQueryResponse(AlipayResponse):
  8. def __init__(self):
  9. super(KoubeiRetailWmsInboundorderQueryResponse, self).__init__()
  10. self._inbound_order_line_list = None
  11. self._inbound_order_vo = None
  12. @property
  13. def inbound_order_line_list(self):
  14. return self._inbound_order_line_list
  15. @inbound_order_line_list.setter
  16. def inbound_order_line_list(self, value):
  17. if isinstance(value, list):
  18. self._inbound_order_line_list = list()
  19. for i in value:
  20. if isinstance(i, InboundOrderLine):
  21. self._inbound_order_line_list.append(i)
  22. else:
  23. self._inbound_order_line_list.append(InboundOrderLine.from_alipay_dict(i))
  24. @property
  25. def inbound_order_vo(self):
  26. return self._inbound_order_vo
  27. @inbound_order_vo.setter
  28. def inbound_order_vo(self, value):
  29. if isinstance(value, InboundOrderVO):
  30. self._inbound_order_vo = value
  31. else:
  32. self._inbound_order_vo = InboundOrderVO.from_alipay_dict(value)
  33. def parse_response_content(self, response_content):
  34. response = super(KoubeiRetailWmsInboundorderQueryResponse, self).parse_response_content(response_content)
  35. if 'inbound_order_line_list' in response:
  36. self.inbound_order_line_list = response['inbound_order_line_list']
  37. if 'inbound_order_vo' in response:
  38. self.inbound_order_vo = response['inbound_order_vo']