AlipayEcoMapGeocodingReverseResponse.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipayEcoMapGeocodingReverseResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipayEcoMapGeocodingReverseResponse, self).__init__()
  8. self._city = None
  9. self._district = None
  10. self._province = None
  11. @property
  12. def city(self):
  13. return self._city
  14. @city.setter
  15. def city(self, value):
  16. self._city = value
  17. @property
  18. def district(self):
  19. return self._district
  20. @district.setter
  21. def district(self, value):
  22. self._district = value
  23. @property
  24. def province(self):
  25. return self._province
  26. @province.setter
  27. def province(self, value):
  28. self._province = value
  29. def parse_response_content(self, response_content):
  30. response = super(AlipayEcoMapGeocodingReverseResponse, self).parse_response_content(response_content)
  31. if 'city' in response:
  32. self.city = response['city']
  33. if 'district' in response:
  34. self.district = response['district']
  35. if 'province' in response:
  36. self.province = response['province']