AlipayTradeMerchantCreditQueryResponse.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipayTradeMerchantCreditQueryResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipayTradeMerchantCreditQueryResponse, self).__init__()
  8. self._credit_scene = None
  9. self._granted_credit_quota = None
  10. self._merchant_credit_source = None
  11. self._merchant_user_id = None
  12. self._total_credit_quota = None
  13. @property
  14. def credit_scene(self):
  15. return self._credit_scene
  16. @credit_scene.setter
  17. def credit_scene(self, value):
  18. self._credit_scene = value
  19. @property
  20. def granted_credit_quota(self):
  21. return self._granted_credit_quota
  22. @granted_credit_quota.setter
  23. def granted_credit_quota(self, value):
  24. self._granted_credit_quota = value
  25. @property
  26. def merchant_credit_source(self):
  27. return self._merchant_credit_source
  28. @merchant_credit_source.setter
  29. def merchant_credit_source(self, value):
  30. self._merchant_credit_source = value
  31. @property
  32. def merchant_user_id(self):
  33. return self._merchant_user_id
  34. @merchant_user_id.setter
  35. def merchant_user_id(self, value):
  36. self._merchant_user_id = value
  37. @property
  38. def total_credit_quota(self):
  39. return self._total_credit_quota
  40. @total_credit_quota.setter
  41. def total_credit_quota(self, value):
  42. self._total_credit_quota = value
  43. def parse_response_content(self, response_content):
  44. response = super(AlipayTradeMerchantCreditQueryResponse, self).parse_response_content(response_content)
  45. if 'credit_scene' in response:
  46. self.credit_scene = response['credit_scene']
  47. if 'granted_credit_quota' in response:
  48. self.granted_credit_quota = response['granted_credit_quota']
  49. if 'merchant_credit_source' in response:
  50. self.merchant_credit_source = response['merchant_credit_source']
  51. if 'merchant_user_id' in response:
  52. self.merchant_user_id = response['merchant_user_id']
  53. if 'total_credit_quota' in response:
  54. self.total_credit_quota = response['total_credit_quota']