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