AlipayInsAutoAutoinsprodPolicyApplyResponse.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.InsTradeInfo import InsTradeInfo
  6. class AlipayInsAutoAutoinsprodPolicyApplyResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayInsAutoAutoinsprodPolicyApplyResponse, self).__init__()
  9. self._enquiry_biz_id = None
  10. self._quote_biz_id = None
  11. self._trade_infos = None
  12. self._zhi_link = None
  13. @property
  14. def enquiry_biz_id(self):
  15. return self._enquiry_biz_id
  16. @enquiry_biz_id.setter
  17. def enquiry_biz_id(self, value):
  18. self._enquiry_biz_id = value
  19. @property
  20. def quote_biz_id(self):
  21. return self._quote_biz_id
  22. @quote_biz_id.setter
  23. def quote_biz_id(self, value):
  24. self._quote_biz_id = value
  25. @property
  26. def trade_infos(self):
  27. return self._trade_infos
  28. @trade_infos.setter
  29. def trade_infos(self, value):
  30. if isinstance(value, list):
  31. self._trade_infos = list()
  32. for i in value:
  33. if isinstance(i, InsTradeInfo):
  34. self._trade_infos.append(i)
  35. else:
  36. self._trade_infos.append(InsTradeInfo.from_alipay_dict(i))
  37. @property
  38. def zhi_link(self):
  39. return self._zhi_link
  40. @zhi_link.setter
  41. def zhi_link(self, value):
  42. self._zhi_link = value
  43. def parse_response_content(self, response_content):
  44. response = super(AlipayInsAutoAutoinsprodPolicyApplyResponse, self).parse_response_content(response_content)
  45. if 'enquiry_biz_id' in response:
  46. self.enquiry_biz_id = response['enquiry_biz_id']
  47. if 'quote_biz_id' in response:
  48. self.quote_biz_id = response['quote_biz_id']
  49. if 'trade_infos' in response:
  50. self.trade_infos = response['trade_infos']
  51. if 'zhi_link' in response:
  52. self.zhi_link = response['zhi_link']