MybankCreditLoantradePayAssetConsultResponse.py 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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.CreditPayBillAssetVO import CreditPayBillAssetVO
  6. from alipay.aop.api.domain.CreditPayInstallmentAssetVO import CreditPayInstallmentAssetVO
  7. from alipay.aop.api.domain.CreditPayRefuseVO import CreditPayRefuseVO
  8. class MybankCreditLoantradePayAssetConsultResponse(AlipayResponse):
  9. def __init__(self):
  10. super(MybankCreditLoantradePayAssetConsultResponse, self).__init__()
  11. self._bill_assets = None
  12. self._installment_assets = None
  13. self._refuse_info = None
  14. self._success = None
  15. @property
  16. def bill_assets(self):
  17. return self._bill_assets
  18. @bill_assets.setter
  19. def bill_assets(self, value):
  20. if isinstance(value, list):
  21. self._bill_assets = list()
  22. for i in value:
  23. if isinstance(i, CreditPayBillAssetVO):
  24. self._bill_assets.append(i)
  25. else:
  26. self._bill_assets.append(CreditPayBillAssetVO.from_alipay_dict(i))
  27. @property
  28. def installment_assets(self):
  29. return self._installment_assets
  30. @installment_assets.setter
  31. def installment_assets(self, value):
  32. if isinstance(value, list):
  33. self._installment_assets = list()
  34. for i in value:
  35. if isinstance(i, CreditPayInstallmentAssetVO):
  36. self._installment_assets.append(i)
  37. else:
  38. self._installment_assets.append(CreditPayInstallmentAssetVO.from_alipay_dict(i))
  39. @property
  40. def refuse_info(self):
  41. return self._refuse_info
  42. @refuse_info.setter
  43. def refuse_info(self, value):
  44. if isinstance(value, CreditPayRefuseVO):
  45. self._refuse_info = value
  46. else:
  47. self._refuse_info = CreditPayRefuseVO.from_alipay_dict(value)
  48. @property
  49. def success(self):
  50. return self._success
  51. @success.setter
  52. def success(self, value):
  53. self._success = value
  54. def parse_response_content(self, response_content):
  55. response = super(MybankCreditLoantradePayAssetConsultResponse, self).parse_response_content(response_content)
  56. if 'bill_assets' in response:
  57. self.bill_assets = response['bill_assets']
  58. if 'installment_assets' in response:
  59. self.installment_assets = response['installment_assets']
  60. if 'refuse_info' in response:
  61. self.refuse_info = response['refuse_info']
  62. if 'success' in response:
  63. self.success = response['success']