AlipayCommerceIotAdvertiserDeviceQueryResponse.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipayCommerceIotAdvertiserDeviceQueryResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipayCommerceIotAdvertiserDeviceQueryResponse, self).__init__()
  8. self._device_sn_list = None
  9. self._total = None
  10. @property
  11. def device_sn_list(self):
  12. return self._device_sn_list
  13. @device_sn_list.setter
  14. def device_sn_list(self, value):
  15. if isinstance(value, list):
  16. self._device_sn_list = list()
  17. for i in value:
  18. self._device_sn_list.append(i)
  19. @property
  20. def total(self):
  21. return self._total
  22. @total.setter
  23. def total(self, value):
  24. self._total = value
  25. def parse_response_content(self, response_content):
  26. response = super(AlipayCommerceIotAdvertiserDeviceQueryResponse, self).parse_response_content(response_content)
  27. if 'device_sn_list' in response:
  28. self.device_sn_list = response['device_sn_list']
  29. if 'total' in response:
  30. self.total = response['total']