ZhimaCreditEpProductCodeApplyResponse.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.CodeResInfo import CodeResInfo
  6. class ZhimaCreditEpProductCodeApplyResponse(AlipayResponse):
  7. def __init__(self):
  8. super(ZhimaCreditEpProductCodeApplyResponse, self).__init__()
  9. self._apply_no = None
  10. self._code_list = None
  11. @property
  12. def apply_no(self):
  13. return self._apply_no
  14. @apply_no.setter
  15. def apply_no(self, value):
  16. self._apply_no = value
  17. @property
  18. def code_list(self):
  19. return self._code_list
  20. @code_list.setter
  21. def code_list(self, value):
  22. if isinstance(value, list):
  23. self._code_list = list()
  24. for i in value:
  25. if isinstance(i, CodeResInfo):
  26. self._code_list.append(i)
  27. else:
  28. self._code_list.append(CodeResInfo.from_alipay_dict(i))
  29. def parse_response_content(self, response_content):
  30. response = super(ZhimaCreditEpProductCodeApplyResponse, self).parse_response_content(response_content)
  31. if 'apply_no' in response:
  32. self.apply_no = response['apply_no']
  33. if 'code_list' in response:
  34. self.code_list = response['code_list']