AlipayInsSceneProductAccessApplyResponse.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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.InsProduct import InsProduct
  6. class AlipayInsSceneProductAccessApplyResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayInsSceneProductAccessApplyResponse, self).__init__()
  9. self._is_access = None
  10. self._product = None
  11. self._reason = None
  12. @property
  13. def is_access(self):
  14. return self._is_access
  15. @is_access.setter
  16. def is_access(self, value):
  17. self._is_access = value
  18. @property
  19. def product(self):
  20. return self._product
  21. @product.setter
  22. def product(self, value):
  23. if isinstance(value, InsProduct):
  24. self._product = value
  25. else:
  26. self._product = InsProduct.from_alipay_dict(value)
  27. @property
  28. def reason(self):
  29. return self._reason
  30. @reason.setter
  31. def reason(self, value):
  32. self._reason = value
  33. def parse_response_content(self, response_content):
  34. response = super(AlipayInsSceneProductAccessApplyResponse, self).parse_response_content(response_content)
  35. if 'is_access' in response:
  36. self.is_access = response['is_access']
  37. if 'product' in response:
  38. self.product = response['product']
  39. if 'reason' in response:
  40. self.reason = response['reason']