AlipayOpenPublicGisQueryResponse.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipayOpenPublicGisQueryResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipayOpenPublicGisQueryResponse, self).__init__()
  8. self._accuracy = None
  9. self._city = None
  10. self._latitude = None
  11. self._longitude = None
  12. self._province = None
  13. @property
  14. def accuracy(self):
  15. return self._accuracy
  16. @accuracy.setter
  17. def accuracy(self, value):
  18. self._accuracy = value
  19. @property
  20. def city(self):
  21. return self._city
  22. @city.setter
  23. def city(self, value):
  24. self._city = value
  25. @property
  26. def latitude(self):
  27. return self._latitude
  28. @latitude.setter
  29. def latitude(self, value):
  30. self._latitude = value
  31. @property
  32. def longitude(self):
  33. return self._longitude
  34. @longitude.setter
  35. def longitude(self, value):
  36. self._longitude = value
  37. @property
  38. def province(self):
  39. return self._province
  40. @province.setter
  41. def province(self, value):
  42. self._province = value
  43. def parse_response_content(self, response_content):
  44. response = super(AlipayOpenPublicGisQueryResponse, self).parse_response_content(response_content)
  45. if 'accuracy' in response:
  46. self.accuracy = response['accuracy']
  47. if 'city' in response:
  48. self.city = response['city']
  49. if 'latitude' in response:
  50. self.latitude = response['latitude']
  51. if 'longitude' in response:
  52. self.longitude = response['longitude']
  53. if 'province' in response:
  54. self.province = response['province']