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