AntMerchantExpandIndirectCreateResponse.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AntMerchantExpandIndirectCreateResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AntMerchantExpandIndirectCreateResponse, self).__init__()
  8. self._service_codes = None
  9. self._service_fail_reason = None
  10. self._sub_merchant_id = None
  11. @property
  12. def service_codes(self):
  13. return self._service_codes
  14. @service_codes.setter
  15. def service_codes(self, value):
  16. if isinstance(value, list):
  17. self._service_codes = list()
  18. for i in value:
  19. self._service_codes.append(i)
  20. @property
  21. def service_fail_reason(self):
  22. return self._service_fail_reason
  23. @service_fail_reason.setter
  24. def service_fail_reason(self, value):
  25. self._service_fail_reason = value
  26. @property
  27. def sub_merchant_id(self):
  28. return self._sub_merchant_id
  29. @sub_merchant_id.setter
  30. def sub_merchant_id(self, value):
  31. self._sub_merchant_id = value
  32. def parse_response_content(self, response_content):
  33. response = super(AntMerchantExpandIndirectCreateResponse, self).parse_response_content(response_content)
  34. if 'service_codes' in response:
  35. self.service_codes = response['service_codes']
  36. if 'service_fail_reason' in response:
  37. self.service_fail_reason = response['service_fail_reason']
  38. if 'sub_merchant_id' in response:
  39. self.sub_merchant_id = response['sub_merchant_id']