AlipayMarketingCampaignDiscountQueryResponse.py 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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.DiscountDstCampPrizeModel import DiscountDstCampPrizeModel
  6. from alipay.aop.api.domain.DstCampRuleModel import DstCampRuleModel
  7. from alipay.aop.api.domain.DateAreaModel import DateAreaModel
  8. from alipay.aop.api.domain.RandomDiscountDstCampPrizeModel import RandomDiscountDstCampPrizeModel
  9. from alipay.aop.api.domain.ReduceDstCampPrizeModel import ReduceDstCampPrizeModel
  10. from alipay.aop.api.domain.ReduceToDiscountDstCampPrizeModel import ReduceToDiscountDstCampPrizeModel
  11. from alipay.aop.api.domain.ResetZeroDstCampPrizeModel import ResetZeroDstCampPrizeModel
  12. from alipay.aop.api.domain.SingleDstCampPrizeModel import SingleDstCampPrizeModel
  13. from alipay.aop.api.domain.StagedDiscountDstCampPrizeModel import StagedDiscountDstCampPrizeModel
  14. class AlipayMarketingCampaignDiscountQueryResponse(AlipayResponse):
  15. def __init__(self):
  16. super(AlipayMarketingCampaignDiscountQueryResponse, self).__init__()
  17. self._camp_code = None
  18. self._camp_desc = None
  19. self._camp_id = None
  20. self._camp_name = None
  21. self._camp_slogan = None
  22. self._camp_status = None
  23. self._discount_dst_camp_prize_model = None
  24. self._dst_camp_rule_model = None
  25. self._dst_camp_sub_time_model_list = None
  26. self._gmt_end = None
  27. self._gmt_start = None
  28. self._prize_type = None
  29. self._random_discount_dst_camp_prize_model = None
  30. self._reduce_dst_camp_prize_model = None
  31. self._reduce_to_discount_dst_camp_prize_model = None
  32. self._reset_zero_dst_camp_prize_model = None
  33. self._single_dst_camp_prize_model = None
  34. self._staged_discount_dst_camp_prize_model = None
  35. @property
  36. def camp_code(self):
  37. return self._camp_code
  38. @camp_code.setter
  39. def camp_code(self, value):
  40. self._camp_code = value
  41. @property
  42. def camp_desc(self):
  43. return self._camp_desc
  44. @camp_desc.setter
  45. def camp_desc(self, value):
  46. self._camp_desc = value
  47. @property
  48. def camp_id(self):
  49. return self._camp_id
  50. @camp_id.setter
  51. def camp_id(self, value):
  52. self._camp_id = value
  53. @property
  54. def camp_name(self):
  55. return self._camp_name
  56. @camp_name.setter
  57. def camp_name(self, value):
  58. self._camp_name = value
  59. @property
  60. def camp_slogan(self):
  61. return self._camp_slogan
  62. @camp_slogan.setter
  63. def camp_slogan(self, value):
  64. self._camp_slogan = value
  65. @property
  66. def camp_status(self):
  67. return self._camp_status
  68. @camp_status.setter
  69. def camp_status(self, value):
  70. self._camp_status = value
  71. @property
  72. def discount_dst_camp_prize_model(self):
  73. return self._discount_dst_camp_prize_model
  74. @discount_dst_camp_prize_model.setter
  75. def discount_dst_camp_prize_model(self, value):
  76. if isinstance(value, DiscountDstCampPrizeModel):
  77. self._discount_dst_camp_prize_model = value
  78. else:
  79. self._discount_dst_camp_prize_model = DiscountDstCampPrizeModel.from_alipay_dict(value)
  80. @property
  81. def dst_camp_rule_model(self):
  82. return self._dst_camp_rule_model
  83. @dst_camp_rule_model.setter
  84. def dst_camp_rule_model(self, value):
  85. if isinstance(value, DstCampRuleModel):
  86. self._dst_camp_rule_model = value
  87. else:
  88. self._dst_camp_rule_model = DstCampRuleModel.from_alipay_dict(value)
  89. @property
  90. def dst_camp_sub_time_model_list(self):
  91. return self._dst_camp_sub_time_model_list
  92. @dst_camp_sub_time_model_list.setter
  93. def dst_camp_sub_time_model_list(self, value):
  94. if isinstance(value, list):
  95. self._dst_camp_sub_time_model_list = list()
  96. for i in value:
  97. if isinstance(i, DateAreaModel):
  98. self._dst_camp_sub_time_model_list.append(i)
  99. else:
  100. self._dst_camp_sub_time_model_list.append(DateAreaModel.from_alipay_dict(i))
  101. @property
  102. def gmt_end(self):
  103. return self._gmt_end
  104. @gmt_end.setter
  105. def gmt_end(self, value):
  106. self._gmt_end = value
  107. @property
  108. def gmt_start(self):
  109. return self._gmt_start
  110. @gmt_start.setter
  111. def gmt_start(self, value):
  112. self._gmt_start = value
  113. @property
  114. def prize_type(self):
  115. return self._prize_type
  116. @prize_type.setter
  117. def prize_type(self, value):
  118. self._prize_type = value
  119. @property
  120. def random_discount_dst_camp_prize_model(self):
  121. return self._random_discount_dst_camp_prize_model
  122. @random_discount_dst_camp_prize_model.setter
  123. def random_discount_dst_camp_prize_model(self, value):
  124. if isinstance(value, RandomDiscountDstCampPrizeModel):
  125. self._random_discount_dst_camp_prize_model = value
  126. else:
  127. self._random_discount_dst_camp_prize_model = RandomDiscountDstCampPrizeModel.from_alipay_dict(value)
  128. @property
  129. def reduce_dst_camp_prize_model(self):
  130. return self._reduce_dst_camp_prize_model
  131. @reduce_dst_camp_prize_model.setter
  132. def reduce_dst_camp_prize_model(self, value):
  133. if isinstance(value, ReduceDstCampPrizeModel):
  134. self._reduce_dst_camp_prize_model = value
  135. else:
  136. self._reduce_dst_camp_prize_model = ReduceDstCampPrizeModel.from_alipay_dict(value)
  137. @property
  138. def reduce_to_discount_dst_camp_prize_model(self):
  139. return self._reduce_to_discount_dst_camp_prize_model
  140. @reduce_to_discount_dst_camp_prize_model.setter
  141. def reduce_to_discount_dst_camp_prize_model(self, value):
  142. if isinstance(value, ReduceToDiscountDstCampPrizeModel):
  143. self._reduce_to_discount_dst_camp_prize_model = value
  144. else:
  145. self._reduce_to_discount_dst_camp_prize_model = ReduceToDiscountDstCampPrizeModel.from_alipay_dict(value)
  146. @property
  147. def reset_zero_dst_camp_prize_model(self):
  148. return self._reset_zero_dst_camp_prize_model
  149. @reset_zero_dst_camp_prize_model.setter
  150. def reset_zero_dst_camp_prize_model(self, value):
  151. if isinstance(value, ResetZeroDstCampPrizeModel):
  152. self._reset_zero_dst_camp_prize_model = value
  153. else:
  154. self._reset_zero_dst_camp_prize_model = ResetZeroDstCampPrizeModel.from_alipay_dict(value)
  155. @property
  156. def single_dst_camp_prize_model(self):
  157. return self._single_dst_camp_prize_model
  158. @single_dst_camp_prize_model.setter
  159. def single_dst_camp_prize_model(self, value):
  160. if isinstance(value, SingleDstCampPrizeModel):
  161. self._single_dst_camp_prize_model = value
  162. else:
  163. self._single_dst_camp_prize_model = SingleDstCampPrizeModel.from_alipay_dict(value)
  164. @property
  165. def staged_discount_dst_camp_prize_model(self):
  166. return self._staged_discount_dst_camp_prize_model
  167. @staged_discount_dst_camp_prize_model.setter
  168. def staged_discount_dst_camp_prize_model(self, value):
  169. if isinstance(value, StagedDiscountDstCampPrizeModel):
  170. self._staged_discount_dst_camp_prize_model = value
  171. else:
  172. self._staged_discount_dst_camp_prize_model = StagedDiscountDstCampPrizeModel.from_alipay_dict(value)
  173. def parse_response_content(self, response_content):
  174. response = super(AlipayMarketingCampaignDiscountQueryResponse, self).parse_response_content(response_content)
  175. if 'camp_code' in response:
  176. self.camp_code = response['camp_code']
  177. if 'camp_desc' in response:
  178. self.camp_desc = response['camp_desc']
  179. if 'camp_id' in response:
  180. self.camp_id = response['camp_id']
  181. if 'camp_name' in response:
  182. self.camp_name = response['camp_name']
  183. if 'camp_slogan' in response:
  184. self.camp_slogan = response['camp_slogan']
  185. if 'camp_status' in response:
  186. self.camp_status = response['camp_status']
  187. if 'discount_dst_camp_prize_model' in response:
  188. self.discount_dst_camp_prize_model = response['discount_dst_camp_prize_model']
  189. if 'dst_camp_rule_model' in response:
  190. self.dst_camp_rule_model = response['dst_camp_rule_model']
  191. if 'dst_camp_sub_time_model_list' in response:
  192. self.dst_camp_sub_time_model_list = response['dst_camp_sub_time_model_list']
  193. if 'gmt_end' in response:
  194. self.gmt_end = response['gmt_end']
  195. if 'gmt_start' in response:
  196. self.gmt_start = response['gmt_start']
  197. if 'prize_type' in response:
  198. self.prize_type = response['prize_type']
  199. if 'random_discount_dst_camp_prize_model' in response:
  200. self.random_discount_dst_camp_prize_model = response['random_discount_dst_camp_prize_model']
  201. if 'reduce_dst_camp_prize_model' in response:
  202. self.reduce_dst_camp_prize_model = response['reduce_dst_camp_prize_model']
  203. if 'reduce_to_discount_dst_camp_prize_model' in response:
  204. self.reduce_to_discount_dst_camp_prize_model = response['reduce_to_discount_dst_camp_prize_model']
  205. if 'reset_zero_dst_camp_prize_model' in response:
  206. self.reset_zero_dst_camp_prize_model = response['reset_zero_dst_camp_prize_model']
  207. if 'single_dst_camp_prize_model' in response:
  208. self.single_dst_camp_prize_model = response['single_dst_camp_prize_model']
  209. if 'staged_discount_dst_camp_prize_model' in response:
  210. self.staged_discount_dst_camp_prize_model = response['staged_discount_dst_camp_prize_model']