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