AlipayInsSceneApplicationQueryResponse.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.InsPolicy import InsPolicy
  6. class AlipayInsSceneApplicationQueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayInsSceneApplicationQueryResponse, self).__init__()
  9. self._application_no = None
  10. self._application_status = None
  11. self._operation_id = None
  12. self._out_biz_no = None
  13. self._policys = None
  14. self._trade_no = None
  15. @property
  16. def application_no(self):
  17. return self._application_no
  18. @application_no.setter
  19. def application_no(self, value):
  20. self._application_no = value
  21. @property
  22. def application_status(self):
  23. return self._application_status
  24. @application_status.setter
  25. def application_status(self, value):
  26. self._application_status = value
  27. @property
  28. def operation_id(self):
  29. return self._operation_id
  30. @operation_id.setter
  31. def operation_id(self, value):
  32. self._operation_id = value
  33. @property
  34. def out_biz_no(self):
  35. return self._out_biz_no
  36. @out_biz_no.setter
  37. def out_biz_no(self, value):
  38. self._out_biz_no = value
  39. @property
  40. def policys(self):
  41. return self._policys
  42. @policys.setter
  43. def policys(self, value):
  44. if isinstance(value, list):
  45. self._policys = list()
  46. for i in value:
  47. if isinstance(i, InsPolicy):
  48. self._policys.append(i)
  49. else:
  50. self._policys.append(InsPolicy.from_alipay_dict(i))
  51. @property
  52. def trade_no(self):
  53. return self._trade_no
  54. @trade_no.setter
  55. def trade_no(self, value):
  56. self._trade_no = value
  57. def parse_response_content(self, response_content):
  58. response = super(AlipayInsSceneApplicationQueryResponse, self).parse_response_content(response_content)
  59. if 'application_no' in response:
  60. self.application_no = response['application_no']
  61. if 'application_status' in response:
  62. self.application_status = response['application_status']
  63. if 'operation_id' in response:
  64. self.operation_id = response['operation_id']
  65. if 'out_biz_no' in response:
  66. self.out_biz_no = response['out_biz_no']
  67. if 'policys' in response:
  68. self.policys = response['policys']
  69. if 'trade_no' in response:
  70. self.trade_no = response['trade_no']