AlipayEcoMycarMerchantshopCommentBatchqueryResponse.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.MerchantshopCommentResult import MerchantshopCommentResult
  6. from alipay.aop.api.domain.MerchantshopCommentStatistic import MerchantshopCommentStatistic
  7. class AlipayEcoMycarMerchantshopCommentBatchqueryResponse(AlipayResponse):
  8. def __init__(self):
  9. super(AlipayEcoMycarMerchantshopCommentBatchqueryResponse, self).__init__()
  10. self._comment_result = None
  11. self._comment_statistic = None
  12. @property
  13. def comment_result(self):
  14. return self._comment_result
  15. @comment_result.setter
  16. def comment_result(self, value):
  17. if isinstance(value, list):
  18. self._comment_result = list()
  19. for i in value:
  20. if isinstance(i, MerchantshopCommentResult):
  21. self._comment_result.append(i)
  22. else:
  23. self._comment_result.append(MerchantshopCommentResult.from_alipay_dict(i))
  24. @property
  25. def comment_statistic(self):
  26. return self._comment_statistic
  27. @comment_statistic.setter
  28. def comment_statistic(self, value):
  29. if isinstance(value, MerchantshopCommentStatistic):
  30. self._comment_statistic = value
  31. else:
  32. self._comment_statistic = MerchantshopCommentStatistic.from_alipay_dict(value)
  33. def parse_response_content(self, response_content):
  34. response = super(AlipayEcoMycarMerchantshopCommentBatchqueryResponse, self).parse_response_content(response_content)
  35. if 'comment_result' in response:
  36. self.comment_result = response['comment_result']
  37. if 'comment_statistic' in response:
  38. self.comment_statistic = response['comment_statistic']