KoubeiAdvertCommissionChannelCreateResponse.py 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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.KbAdvertChannelResponse import KbAdvertChannelResponse
  6. class KoubeiAdvertCommissionChannelCreateResponse(AlipayResponse):
  7. def __init__(self):
  8. super(KoubeiAdvertCommissionChannelCreateResponse, self).__init__()
  9. self._channel_response = None
  10. @property
  11. def channel_response(self):
  12. return self._channel_response
  13. @channel_response.setter
  14. def channel_response(self, value):
  15. if isinstance(value, list):
  16. self._channel_response = list()
  17. for i in value:
  18. if isinstance(i, KbAdvertChannelResponse):
  19. self._channel_response.append(i)
  20. else:
  21. self._channel_response.append(KbAdvertChannelResponse.from_alipay_dict(i))
  22. def parse_response_content(self, response_content):
  23. response = super(KoubeiAdvertCommissionChannelCreateResponse, self).parse_response_content(response_content)
  24. if 'channel_response' in response:
  25. self.channel_response = response['channel_response']