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