AlipayEcoMycarFuellingShopQueryResponse.py 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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.Product import Product
  6. from alipay.aop.api.domain.Sale import Sale
  7. class AlipayEcoMycarFuellingShopQueryResponse(AlipayResponse):
  8. def __init__(self):
  9. super(AlipayEcoMycarFuellingShopQueryResponse, self).__init__()
  10. self._address = None
  11. self._city_code = None
  12. self._district_code = None
  13. self._lat = None
  14. self._lon = None
  15. self._out_shop_id = None
  16. self._pay_url = None
  17. self._poi_id = None
  18. self._product = None
  19. self._province_code = None
  20. self._sale = None
  21. self._shop_id = None
  22. self._shop_name = None
  23. self._shop_status = None
  24. @property
  25. def address(self):
  26. return self._address
  27. @address.setter
  28. def address(self, value):
  29. self._address = value
  30. @property
  31. def city_code(self):
  32. return self._city_code
  33. @city_code.setter
  34. def city_code(self, value):
  35. self._city_code = value
  36. @property
  37. def district_code(self):
  38. return self._district_code
  39. @district_code.setter
  40. def district_code(self, value):
  41. self._district_code = value
  42. @property
  43. def lat(self):
  44. return self._lat
  45. @lat.setter
  46. def lat(self, value):
  47. self._lat = value
  48. @property
  49. def lon(self):
  50. return self._lon
  51. @lon.setter
  52. def lon(self, value):
  53. self._lon = value
  54. @property
  55. def out_shop_id(self):
  56. return self._out_shop_id
  57. @out_shop_id.setter
  58. def out_shop_id(self, value):
  59. self._out_shop_id = value
  60. @property
  61. def pay_url(self):
  62. return self._pay_url
  63. @pay_url.setter
  64. def pay_url(self, value):
  65. self._pay_url = value
  66. @property
  67. def poi_id(self):
  68. return self._poi_id
  69. @poi_id.setter
  70. def poi_id(self, value):
  71. self._poi_id = value
  72. @property
  73. def product(self):
  74. return self._product
  75. @product.setter
  76. def product(self, value):
  77. if isinstance(value, list):
  78. self._product = list()
  79. for i in value:
  80. if isinstance(i, Product):
  81. self._product.append(i)
  82. else:
  83. self._product.append(Product.from_alipay_dict(i))
  84. @property
  85. def province_code(self):
  86. return self._province_code
  87. @province_code.setter
  88. def province_code(self, value):
  89. self._province_code = value
  90. @property
  91. def sale(self):
  92. return self._sale
  93. @sale.setter
  94. def sale(self, value):
  95. if isinstance(value, list):
  96. self._sale = list()
  97. for i in value:
  98. if isinstance(i, Sale):
  99. self._sale.append(i)
  100. else:
  101. self._sale.append(Sale.from_alipay_dict(i))
  102. @property
  103. def shop_id(self):
  104. return self._shop_id
  105. @shop_id.setter
  106. def shop_id(self, value):
  107. self._shop_id = value
  108. @property
  109. def shop_name(self):
  110. return self._shop_name
  111. @shop_name.setter
  112. def shop_name(self, value):
  113. self._shop_name = value
  114. @property
  115. def shop_status(self):
  116. return self._shop_status
  117. @shop_status.setter
  118. def shop_status(self, value):
  119. self._shop_status = value
  120. def parse_response_content(self, response_content):
  121. response = super(AlipayEcoMycarFuellingShopQueryResponse, self).parse_response_content(response_content)
  122. if 'address' in response:
  123. self.address = response['address']
  124. if 'city_code' in response:
  125. self.city_code = response['city_code']
  126. if 'district_code' in response:
  127. self.district_code = response['district_code']
  128. if 'lat' in response:
  129. self.lat = response['lat']
  130. if 'lon' in response:
  131. self.lon = response['lon']
  132. if 'out_shop_id' in response:
  133. self.out_shop_id = response['out_shop_id']
  134. if 'pay_url' in response:
  135. self.pay_url = response['pay_url']
  136. if 'poi_id' in response:
  137. self.poi_id = response['poi_id']
  138. if 'product' in response:
  139. self.product = response['product']
  140. if 'province_code' in response:
  141. self.province_code = response['province_code']
  142. if 'sale' in response:
  143. self.sale = response['sale']
  144. if 'shop_id' in response:
  145. self.shop_id = response['shop_id']
  146. if 'shop_name' in response:
  147. self.shop_name = response['shop_name']
  148. if 'shop_status' in response:
  149. self.shop_status = response['shop_status']