AlipaySocialAntforestEnergyQueryResponse.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipaySocialAntforestEnergyQueryResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipaySocialAntforestEnergyQueryResponse, self).__init__()
  8. self._current_energy = None
  9. self._total_energy = None
  10. @property
  11. def current_energy(self):
  12. return self._current_energy
  13. @current_energy.setter
  14. def current_energy(self, value):
  15. self._current_energy = value
  16. @property
  17. def total_energy(self):
  18. return self._total_energy
  19. @total_energy.setter
  20. def total_energy(self, value):
  21. self._total_energy = value
  22. def parse_response_content(self, response_content):
  23. response = super(AlipaySocialAntforestEnergyQueryResponse, self).parse_response_content(response_content)
  24. if 'current_energy' in response:
  25. self.current_energy = response['current_energy']
  26. if 'total_energy' in response:
  27. self.total_energy = response['total_energy']