AlipayEcoMycarFuellingShopCreateModel.py 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoMycarFuellingShopCreateModel(object):
  6. def __init__(self):
  7. self._address = None
  8. self._city_code = None
  9. self._district_code = None
  10. self._lat = None
  11. self._lon = None
  12. self._out_shop_id = None
  13. self._pay_url = None
  14. self._poi_id = None
  15. self._province_code = None
  16. self._shop_name = None
  17. self._shop_status = None
  18. @property
  19. def address(self):
  20. return self._address
  21. @address.setter
  22. def address(self, value):
  23. self._address = value
  24. @property
  25. def city_code(self):
  26. return self._city_code
  27. @city_code.setter
  28. def city_code(self, value):
  29. self._city_code = value
  30. @property
  31. def district_code(self):
  32. return self._district_code
  33. @district_code.setter
  34. def district_code(self, value):
  35. self._district_code = value
  36. @property
  37. def lat(self):
  38. return self._lat
  39. @lat.setter
  40. def lat(self, value):
  41. self._lat = value
  42. @property
  43. def lon(self):
  44. return self._lon
  45. @lon.setter
  46. def lon(self, value):
  47. self._lon = value
  48. @property
  49. def out_shop_id(self):
  50. return self._out_shop_id
  51. @out_shop_id.setter
  52. def out_shop_id(self, value):
  53. self._out_shop_id = value
  54. @property
  55. def pay_url(self):
  56. return self._pay_url
  57. @pay_url.setter
  58. def pay_url(self, value):
  59. self._pay_url = value
  60. @property
  61. def poi_id(self):
  62. return self._poi_id
  63. @poi_id.setter
  64. def poi_id(self, value):
  65. self._poi_id = value
  66. @property
  67. def province_code(self):
  68. return self._province_code
  69. @province_code.setter
  70. def province_code(self, value):
  71. self._province_code = value
  72. @property
  73. def shop_name(self):
  74. return self._shop_name
  75. @shop_name.setter
  76. def shop_name(self, value):
  77. self._shop_name = value
  78. @property
  79. def shop_status(self):
  80. return self._shop_status
  81. @shop_status.setter
  82. def shop_status(self, value):
  83. self._shop_status = value
  84. def to_alipay_dict(self):
  85. params = dict()
  86. if self.address:
  87. if hasattr(self.address, 'to_alipay_dict'):
  88. params['address'] = self.address.to_alipay_dict()
  89. else:
  90. params['address'] = self.address
  91. if self.city_code:
  92. if hasattr(self.city_code, 'to_alipay_dict'):
  93. params['city_code'] = self.city_code.to_alipay_dict()
  94. else:
  95. params['city_code'] = self.city_code
  96. if self.district_code:
  97. if hasattr(self.district_code, 'to_alipay_dict'):
  98. params['district_code'] = self.district_code.to_alipay_dict()
  99. else:
  100. params['district_code'] = self.district_code
  101. if self.lat:
  102. if hasattr(self.lat, 'to_alipay_dict'):
  103. params['lat'] = self.lat.to_alipay_dict()
  104. else:
  105. params['lat'] = self.lat
  106. if self.lon:
  107. if hasattr(self.lon, 'to_alipay_dict'):
  108. params['lon'] = self.lon.to_alipay_dict()
  109. else:
  110. params['lon'] = self.lon
  111. if self.out_shop_id:
  112. if hasattr(self.out_shop_id, 'to_alipay_dict'):
  113. params['out_shop_id'] = self.out_shop_id.to_alipay_dict()
  114. else:
  115. params['out_shop_id'] = self.out_shop_id
  116. if self.pay_url:
  117. if hasattr(self.pay_url, 'to_alipay_dict'):
  118. params['pay_url'] = self.pay_url.to_alipay_dict()
  119. else:
  120. params['pay_url'] = self.pay_url
  121. if self.poi_id:
  122. if hasattr(self.poi_id, 'to_alipay_dict'):
  123. params['poi_id'] = self.poi_id.to_alipay_dict()
  124. else:
  125. params['poi_id'] = self.poi_id
  126. if self.province_code:
  127. if hasattr(self.province_code, 'to_alipay_dict'):
  128. params['province_code'] = self.province_code.to_alipay_dict()
  129. else:
  130. params['province_code'] = self.province_code
  131. if self.shop_name:
  132. if hasattr(self.shop_name, 'to_alipay_dict'):
  133. params['shop_name'] = self.shop_name.to_alipay_dict()
  134. else:
  135. params['shop_name'] = self.shop_name
  136. if self.shop_status:
  137. if hasattr(self.shop_status, 'to_alipay_dict'):
  138. params['shop_status'] = self.shop_status.to_alipay_dict()
  139. else:
  140. params['shop_status'] = self.shop_status
  141. return params
  142. @staticmethod
  143. def from_alipay_dict(d):
  144. if not d:
  145. return None
  146. o = AlipayEcoMycarFuellingShopCreateModel()
  147. if 'address' in d:
  148. o.address = d['address']
  149. if 'city_code' in d:
  150. o.city_code = d['city_code']
  151. if 'district_code' in d:
  152. o.district_code = d['district_code']
  153. if 'lat' in d:
  154. o.lat = d['lat']
  155. if 'lon' in d:
  156. o.lon = d['lon']
  157. if 'out_shop_id' in d:
  158. o.out_shop_id = d['out_shop_id']
  159. if 'pay_url' in d:
  160. o.pay_url = d['pay_url']
  161. if 'poi_id' in d:
  162. o.poi_id = d['poi_id']
  163. if 'province_code' in d:
  164. o.province_code = d['province_code']
  165. if 'shop_name' in d:
  166. o.shop_name = d['shop_name']
  167. if 'shop_status' in d:
  168. o.shop_status = d['shop_status']
  169. return o