KoubeiAdvertDeliveryDiscountBatchqueryModel.py 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiAdvertDeliveryDiscountBatchqueryModel(object):
  6. def __init__(self):
  7. self._channel = None
  8. self._city_code = None
  9. self._latitude = None
  10. self._longitude = None
  11. self._mobile = None
  12. self._purchase_num = None
  13. self._shop_id = None
  14. self._size = None
  15. self._strategy = None
  16. self._user_id = None
  17. @property
  18. def channel(self):
  19. return self._channel
  20. @channel.setter
  21. def channel(self, value):
  22. self._channel = value
  23. @property
  24. def city_code(self):
  25. return self._city_code
  26. @city_code.setter
  27. def city_code(self, value):
  28. self._city_code = value
  29. @property
  30. def latitude(self):
  31. return self._latitude
  32. @latitude.setter
  33. def latitude(self, value):
  34. self._latitude = value
  35. @property
  36. def longitude(self):
  37. return self._longitude
  38. @longitude.setter
  39. def longitude(self, value):
  40. self._longitude = value
  41. @property
  42. def mobile(self):
  43. return self._mobile
  44. @mobile.setter
  45. def mobile(self, value):
  46. self._mobile = value
  47. @property
  48. def purchase_num(self):
  49. return self._purchase_num
  50. @purchase_num.setter
  51. def purchase_num(self, value):
  52. self._purchase_num = value
  53. @property
  54. def shop_id(self):
  55. return self._shop_id
  56. @shop_id.setter
  57. def shop_id(self, value):
  58. self._shop_id = value
  59. @property
  60. def size(self):
  61. return self._size
  62. @size.setter
  63. def size(self, value):
  64. self._size = value
  65. @property
  66. def strategy(self):
  67. return self._strategy
  68. @strategy.setter
  69. def strategy(self, value):
  70. self._strategy = value
  71. @property
  72. def user_id(self):
  73. return self._user_id
  74. @user_id.setter
  75. def user_id(self, value):
  76. self._user_id = value
  77. def to_alipay_dict(self):
  78. params = dict()
  79. if self.channel:
  80. if hasattr(self.channel, 'to_alipay_dict'):
  81. params['channel'] = self.channel.to_alipay_dict()
  82. else:
  83. params['channel'] = self.channel
  84. if self.city_code:
  85. if hasattr(self.city_code, 'to_alipay_dict'):
  86. params['city_code'] = self.city_code.to_alipay_dict()
  87. else:
  88. params['city_code'] = self.city_code
  89. if self.latitude:
  90. if hasattr(self.latitude, 'to_alipay_dict'):
  91. params['latitude'] = self.latitude.to_alipay_dict()
  92. else:
  93. params['latitude'] = self.latitude
  94. if self.longitude:
  95. if hasattr(self.longitude, 'to_alipay_dict'):
  96. params['longitude'] = self.longitude.to_alipay_dict()
  97. else:
  98. params['longitude'] = self.longitude
  99. if self.mobile:
  100. if hasattr(self.mobile, 'to_alipay_dict'):
  101. params['mobile'] = self.mobile.to_alipay_dict()
  102. else:
  103. params['mobile'] = self.mobile
  104. if self.purchase_num:
  105. if hasattr(self.purchase_num, 'to_alipay_dict'):
  106. params['purchase_num'] = self.purchase_num.to_alipay_dict()
  107. else:
  108. params['purchase_num'] = self.purchase_num
  109. if self.shop_id:
  110. if hasattr(self.shop_id, 'to_alipay_dict'):
  111. params['shop_id'] = self.shop_id.to_alipay_dict()
  112. else:
  113. params['shop_id'] = self.shop_id
  114. if self.size:
  115. if hasattr(self.size, 'to_alipay_dict'):
  116. params['size'] = self.size.to_alipay_dict()
  117. else:
  118. params['size'] = self.size
  119. if self.strategy:
  120. if hasattr(self.strategy, 'to_alipay_dict'):
  121. params['strategy'] = self.strategy.to_alipay_dict()
  122. else:
  123. params['strategy'] = self.strategy
  124. if self.user_id:
  125. if hasattr(self.user_id, 'to_alipay_dict'):
  126. params['user_id'] = self.user_id.to_alipay_dict()
  127. else:
  128. params['user_id'] = self.user_id
  129. return params
  130. @staticmethod
  131. def from_alipay_dict(d):
  132. if not d:
  133. return None
  134. o = KoubeiAdvertDeliveryDiscountBatchqueryModel()
  135. if 'channel' in d:
  136. o.channel = d['channel']
  137. if 'city_code' in d:
  138. o.city_code = d['city_code']
  139. if 'latitude' in d:
  140. o.latitude = d['latitude']
  141. if 'longitude' in d:
  142. o.longitude = d['longitude']
  143. if 'mobile' in d:
  144. o.mobile = d['mobile']
  145. if 'purchase_num' in d:
  146. o.purchase_num = d['purchase_num']
  147. if 'shop_id' in d:
  148. o.shop_id = d['shop_id']
  149. if 'size' in d:
  150. o.size = d['size']
  151. if 'strategy' in d:
  152. o.strategy = d['strategy']
  153. if 'user_id' in d:
  154. o.user_id = d['user_id']
  155. return o