IntelligentGuideTradeDetail.py 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class IntelligentGuideTradeDetail(object):
  6. def __init__(self):
  7. self._card_type = None
  8. self._customer_source = None
  9. self._customer_type = None
  10. self._date = None
  11. self._fifth_recommendation = None
  12. self._first_category = None
  13. self._first_recommendation = None
  14. self._fourth_recommendation = None
  15. self._guide_record_id = None
  16. self._item_name = None
  17. self._mobile = None
  18. self._original_price = None
  19. self._payment_type = None
  20. self._price = None
  21. self._second_category = None
  22. self._second_recommendation = None
  23. self._service_staff = None
  24. self._third_recommendation = None
  25. @property
  26. def card_type(self):
  27. return self._card_type
  28. @card_type.setter
  29. def card_type(self, value):
  30. self._card_type = value
  31. @property
  32. def customer_source(self):
  33. return self._customer_source
  34. @customer_source.setter
  35. def customer_source(self, value):
  36. self._customer_source = value
  37. @property
  38. def customer_type(self):
  39. return self._customer_type
  40. @customer_type.setter
  41. def customer_type(self, value):
  42. self._customer_type = value
  43. @property
  44. def date(self):
  45. return self._date
  46. @date.setter
  47. def date(self, value):
  48. self._date = value
  49. @property
  50. def fifth_recommendation(self):
  51. return self._fifth_recommendation
  52. @fifth_recommendation.setter
  53. def fifth_recommendation(self, value):
  54. self._fifth_recommendation = value
  55. @property
  56. def first_category(self):
  57. return self._first_category
  58. @first_category.setter
  59. def first_category(self, value):
  60. self._first_category = value
  61. @property
  62. def first_recommendation(self):
  63. return self._first_recommendation
  64. @first_recommendation.setter
  65. def first_recommendation(self, value):
  66. self._first_recommendation = value
  67. @property
  68. def fourth_recommendation(self):
  69. return self._fourth_recommendation
  70. @fourth_recommendation.setter
  71. def fourth_recommendation(self, value):
  72. self._fourth_recommendation = value
  73. @property
  74. def guide_record_id(self):
  75. return self._guide_record_id
  76. @guide_record_id.setter
  77. def guide_record_id(self, value):
  78. self._guide_record_id = value
  79. @property
  80. def item_name(self):
  81. return self._item_name
  82. @item_name.setter
  83. def item_name(self, value):
  84. self._item_name = value
  85. @property
  86. def mobile(self):
  87. return self._mobile
  88. @mobile.setter
  89. def mobile(self, value):
  90. self._mobile = value
  91. @property
  92. def original_price(self):
  93. return self._original_price
  94. @original_price.setter
  95. def original_price(self, value):
  96. self._original_price = value
  97. @property
  98. def payment_type(self):
  99. return self._payment_type
  100. @payment_type.setter
  101. def payment_type(self, value):
  102. self._payment_type = value
  103. @property
  104. def price(self):
  105. return self._price
  106. @price.setter
  107. def price(self, value):
  108. self._price = value
  109. @property
  110. def second_category(self):
  111. return self._second_category
  112. @second_category.setter
  113. def second_category(self, value):
  114. self._second_category = value
  115. @property
  116. def second_recommendation(self):
  117. return self._second_recommendation
  118. @second_recommendation.setter
  119. def second_recommendation(self, value):
  120. self._second_recommendation = value
  121. @property
  122. def service_staff(self):
  123. return self._service_staff
  124. @service_staff.setter
  125. def service_staff(self, value):
  126. self._service_staff = value
  127. @property
  128. def third_recommendation(self):
  129. return self._third_recommendation
  130. @third_recommendation.setter
  131. def third_recommendation(self, value):
  132. self._third_recommendation = value
  133. def to_alipay_dict(self):
  134. params = dict()
  135. if self.card_type:
  136. if hasattr(self.card_type, 'to_alipay_dict'):
  137. params['card_type'] = self.card_type.to_alipay_dict()
  138. else:
  139. params['card_type'] = self.card_type
  140. if self.customer_source:
  141. if hasattr(self.customer_source, 'to_alipay_dict'):
  142. params['customer_source'] = self.customer_source.to_alipay_dict()
  143. else:
  144. params['customer_source'] = self.customer_source
  145. if self.customer_type:
  146. if hasattr(self.customer_type, 'to_alipay_dict'):
  147. params['customer_type'] = self.customer_type.to_alipay_dict()
  148. else:
  149. params['customer_type'] = self.customer_type
  150. if self.date:
  151. if hasattr(self.date, 'to_alipay_dict'):
  152. params['date'] = self.date.to_alipay_dict()
  153. else:
  154. params['date'] = self.date
  155. if self.fifth_recommendation:
  156. if hasattr(self.fifth_recommendation, 'to_alipay_dict'):
  157. params['fifth_recommendation'] = self.fifth_recommendation.to_alipay_dict()
  158. else:
  159. params['fifth_recommendation'] = self.fifth_recommendation
  160. if self.first_category:
  161. if hasattr(self.first_category, 'to_alipay_dict'):
  162. params['first_category'] = self.first_category.to_alipay_dict()
  163. else:
  164. params['first_category'] = self.first_category
  165. if self.first_recommendation:
  166. if hasattr(self.first_recommendation, 'to_alipay_dict'):
  167. params['first_recommendation'] = self.first_recommendation.to_alipay_dict()
  168. else:
  169. params['first_recommendation'] = self.first_recommendation
  170. if self.fourth_recommendation:
  171. if hasattr(self.fourth_recommendation, 'to_alipay_dict'):
  172. params['fourth_recommendation'] = self.fourth_recommendation.to_alipay_dict()
  173. else:
  174. params['fourth_recommendation'] = self.fourth_recommendation
  175. if self.guide_record_id:
  176. if hasattr(self.guide_record_id, 'to_alipay_dict'):
  177. params['guide_record_id'] = self.guide_record_id.to_alipay_dict()
  178. else:
  179. params['guide_record_id'] = self.guide_record_id
  180. if self.item_name:
  181. if hasattr(self.item_name, 'to_alipay_dict'):
  182. params['item_name'] = self.item_name.to_alipay_dict()
  183. else:
  184. params['item_name'] = self.item_name
  185. if self.mobile:
  186. if hasattr(self.mobile, 'to_alipay_dict'):
  187. params['mobile'] = self.mobile.to_alipay_dict()
  188. else:
  189. params['mobile'] = self.mobile
  190. if self.original_price:
  191. if hasattr(self.original_price, 'to_alipay_dict'):
  192. params['original_price'] = self.original_price.to_alipay_dict()
  193. else:
  194. params['original_price'] = self.original_price
  195. if self.payment_type:
  196. if hasattr(self.payment_type, 'to_alipay_dict'):
  197. params['payment_type'] = self.payment_type.to_alipay_dict()
  198. else:
  199. params['payment_type'] = self.payment_type
  200. if self.price:
  201. if hasattr(self.price, 'to_alipay_dict'):
  202. params['price'] = self.price.to_alipay_dict()
  203. else:
  204. params['price'] = self.price
  205. if self.second_category:
  206. if hasattr(self.second_category, 'to_alipay_dict'):
  207. params['second_category'] = self.second_category.to_alipay_dict()
  208. else:
  209. params['second_category'] = self.second_category
  210. if self.second_recommendation:
  211. if hasattr(self.second_recommendation, 'to_alipay_dict'):
  212. params['second_recommendation'] = self.second_recommendation.to_alipay_dict()
  213. else:
  214. params['second_recommendation'] = self.second_recommendation
  215. if self.service_staff:
  216. if hasattr(self.service_staff, 'to_alipay_dict'):
  217. params['service_staff'] = self.service_staff.to_alipay_dict()
  218. else:
  219. params['service_staff'] = self.service_staff
  220. if self.third_recommendation:
  221. if hasattr(self.third_recommendation, 'to_alipay_dict'):
  222. params['third_recommendation'] = self.third_recommendation.to_alipay_dict()
  223. else:
  224. params['third_recommendation'] = self.third_recommendation
  225. return params
  226. @staticmethod
  227. def from_alipay_dict(d):
  228. if not d:
  229. return None
  230. o = IntelligentGuideTradeDetail()
  231. if 'card_type' in d:
  232. o.card_type = d['card_type']
  233. if 'customer_source' in d:
  234. o.customer_source = d['customer_source']
  235. if 'customer_type' in d:
  236. o.customer_type = d['customer_type']
  237. if 'date' in d:
  238. o.date = d['date']
  239. if 'fifth_recommendation' in d:
  240. o.fifth_recommendation = d['fifth_recommendation']
  241. if 'first_category' in d:
  242. o.first_category = d['first_category']
  243. if 'first_recommendation' in d:
  244. o.first_recommendation = d['first_recommendation']
  245. if 'fourth_recommendation' in d:
  246. o.fourth_recommendation = d['fourth_recommendation']
  247. if 'guide_record_id' in d:
  248. o.guide_record_id = d['guide_record_id']
  249. if 'item_name' in d:
  250. o.item_name = d['item_name']
  251. if 'mobile' in d:
  252. o.mobile = d['mobile']
  253. if 'original_price' in d:
  254. o.original_price = d['original_price']
  255. if 'payment_type' in d:
  256. o.payment_type = d['payment_type']
  257. if 'price' in d:
  258. o.price = d['price']
  259. if 'second_category' in d:
  260. o.second_category = d['second_category']
  261. if 'second_recommendation' in d:
  262. o.second_recommendation = d['second_recommendation']
  263. if 'service_staff' in d:
  264. o.service_staff = d['service_staff']
  265. if 'third_recommendation' in d:
  266. o.third_recommendation = d['third_recommendation']
  267. return o