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