AlipayMarketingCashlessticketTemplateCreateModel.py 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayMarketingCashlessticketTemplateCreateModel(object):
  6. def __init__(self):
  7. self._amount = None
  8. self._brand_name = None
  9. self._extension_info = None
  10. self._group_code = None
  11. self._memo = None
  12. self._notify_uri = None
  13. self._out_biz_no = None
  14. self._publish_end_time = None
  15. self._publish_start_time = None
  16. self._rule_conf = None
  17. self._ticket_available_time = None
  18. self._ticket_description = None
  19. self._ticket_quantity = None
  20. self._ticket_type = None
  21. self._ticket_valid_period = None
  22. self._total_amount = None
  23. @property
  24. def amount(self):
  25. return self._amount
  26. @amount.setter
  27. def amount(self, value):
  28. self._amount = value
  29. @property
  30. def brand_name(self):
  31. return self._brand_name
  32. @brand_name.setter
  33. def brand_name(self, value):
  34. self._brand_name = value
  35. @property
  36. def extension_info(self):
  37. return self._extension_info
  38. @extension_info.setter
  39. def extension_info(self, value):
  40. self._extension_info = value
  41. @property
  42. def group_code(self):
  43. return self._group_code
  44. @group_code.setter
  45. def group_code(self, value):
  46. self._group_code = value
  47. @property
  48. def memo(self):
  49. return self._memo
  50. @memo.setter
  51. def memo(self, value):
  52. self._memo = value
  53. @property
  54. def notify_uri(self):
  55. return self._notify_uri
  56. @notify_uri.setter
  57. def notify_uri(self, value):
  58. self._notify_uri = value
  59. @property
  60. def out_biz_no(self):
  61. return self._out_biz_no
  62. @out_biz_no.setter
  63. def out_biz_no(self, value):
  64. self._out_biz_no = value
  65. @property
  66. def publish_end_time(self):
  67. return self._publish_end_time
  68. @publish_end_time.setter
  69. def publish_end_time(self, value):
  70. self._publish_end_time = value
  71. @property
  72. def publish_start_time(self):
  73. return self._publish_start_time
  74. @publish_start_time.setter
  75. def publish_start_time(self, value):
  76. self._publish_start_time = value
  77. @property
  78. def rule_conf(self):
  79. return self._rule_conf
  80. @rule_conf.setter
  81. def rule_conf(self, value):
  82. self._rule_conf = value
  83. @property
  84. def ticket_available_time(self):
  85. return self._ticket_available_time
  86. @ticket_available_time.setter
  87. def ticket_available_time(self, value):
  88. self._ticket_available_time = value
  89. @property
  90. def ticket_description(self):
  91. return self._ticket_description
  92. @ticket_description.setter
  93. def ticket_description(self, value):
  94. self._ticket_description = value
  95. @property
  96. def ticket_quantity(self):
  97. return self._ticket_quantity
  98. @ticket_quantity.setter
  99. def ticket_quantity(self, value):
  100. self._ticket_quantity = value
  101. @property
  102. def ticket_type(self):
  103. return self._ticket_type
  104. @ticket_type.setter
  105. def ticket_type(self, value):
  106. self._ticket_type = value
  107. @property
  108. def ticket_valid_period(self):
  109. return self._ticket_valid_period
  110. @ticket_valid_period.setter
  111. def ticket_valid_period(self, value):
  112. self._ticket_valid_period = value
  113. @property
  114. def total_amount(self):
  115. return self._total_amount
  116. @total_amount.setter
  117. def total_amount(self, value):
  118. self._total_amount = value
  119. def to_alipay_dict(self):
  120. params = dict()
  121. if self.amount:
  122. if hasattr(self.amount, 'to_alipay_dict'):
  123. params['amount'] = self.amount.to_alipay_dict()
  124. else:
  125. params['amount'] = self.amount
  126. if self.brand_name:
  127. if hasattr(self.brand_name, 'to_alipay_dict'):
  128. params['brand_name'] = self.brand_name.to_alipay_dict()
  129. else:
  130. params['brand_name'] = self.brand_name
  131. if self.extension_info:
  132. if hasattr(self.extension_info, 'to_alipay_dict'):
  133. params['extension_info'] = self.extension_info.to_alipay_dict()
  134. else:
  135. params['extension_info'] = self.extension_info
  136. if self.group_code:
  137. if hasattr(self.group_code, 'to_alipay_dict'):
  138. params['group_code'] = self.group_code.to_alipay_dict()
  139. else:
  140. params['group_code'] = self.group_code
  141. if self.memo:
  142. if hasattr(self.memo, 'to_alipay_dict'):
  143. params['memo'] = self.memo.to_alipay_dict()
  144. else:
  145. params['memo'] = self.memo
  146. if self.notify_uri:
  147. if hasattr(self.notify_uri, 'to_alipay_dict'):
  148. params['notify_uri'] = self.notify_uri.to_alipay_dict()
  149. else:
  150. params['notify_uri'] = self.notify_uri
  151. if self.out_biz_no:
  152. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  153. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  154. else:
  155. params['out_biz_no'] = self.out_biz_no
  156. if self.publish_end_time:
  157. if hasattr(self.publish_end_time, 'to_alipay_dict'):
  158. params['publish_end_time'] = self.publish_end_time.to_alipay_dict()
  159. else:
  160. params['publish_end_time'] = self.publish_end_time
  161. if self.publish_start_time:
  162. if hasattr(self.publish_start_time, 'to_alipay_dict'):
  163. params['publish_start_time'] = self.publish_start_time.to_alipay_dict()
  164. else:
  165. params['publish_start_time'] = self.publish_start_time
  166. if self.rule_conf:
  167. if hasattr(self.rule_conf, 'to_alipay_dict'):
  168. params['rule_conf'] = self.rule_conf.to_alipay_dict()
  169. else:
  170. params['rule_conf'] = self.rule_conf
  171. if self.ticket_available_time:
  172. if hasattr(self.ticket_available_time, 'to_alipay_dict'):
  173. params['ticket_available_time'] = self.ticket_available_time.to_alipay_dict()
  174. else:
  175. params['ticket_available_time'] = self.ticket_available_time
  176. if self.ticket_description:
  177. if hasattr(self.ticket_description, 'to_alipay_dict'):
  178. params['ticket_description'] = self.ticket_description.to_alipay_dict()
  179. else:
  180. params['ticket_description'] = self.ticket_description
  181. if self.ticket_quantity:
  182. if hasattr(self.ticket_quantity, 'to_alipay_dict'):
  183. params['ticket_quantity'] = self.ticket_quantity.to_alipay_dict()
  184. else:
  185. params['ticket_quantity'] = self.ticket_quantity
  186. if self.ticket_type:
  187. if hasattr(self.ticket_type, 'to_alipay_dict'):
  188. params['ticket_type'] = self.ticket_type.to_alipay_dict()
  189. else:
  190. params['ticket_type'] = self.ticket_type
  191. if self.ticket_valid_period:
  192. if hasattr(self.ticket_valid_period, 'to_alipay_dict'):
  193. params['ticket_valid_period'] = self.ticket_valid_period.to_alipay_dict()
  194. else:
  195. params['ticket_valid_period'] = self.ticket_valid_period
  196. if self.total_amount:
  197. if hasattr(self.total_amount, 'to_alipay_dict'):
  198. params['total_amount'] = self.total_amount.to_alipay_dict()
  199. else:
  200. params['total_amount'] = self.total_amount
  201. return params
  202. @staticmethod
  203. def from_alipay_dict(d):
  204. if not d:
  205. return None
  206. o = AlipayMarketingCashlessticketTemplateCreateModel()
  207. if 'amount' in d:
  208. o.amount = d['amount']
  209. if 'brand_name' in d:
  210. o.brand_name = d['brand_name']
  211. if 'extension_info' in d:
  212. o.extension_info = d['extension_info']
  213. if 'group_code' in d:
  214. o.group_code = d['group_code']
  215. if 'memo' in d:
  216. o.memo = d['memo']
  217. if 'notify_uri' in d:
  218. o.notify_uri = d['notify_uri']
  219. if 'out_biz_no' in d:
  220. o.out_biz_no = d['out_biz_no']
  221. if 'publish_end_time' in d:
  222. o.publish_end_time = d['publish_end_time']
  223. if 'publish_start_time' in d:
  224. o.publish_start_time = d['publish_start_time']
  225. if 'rule_conf' in d:
  226. o.rule_conf = d['rule_conf']
  227. if 'ticket_available_time' in d:
  228. o.ticket_available_time = d['ticket_available_time']
  229. if 'ticket_description' in d:
  230. o.ticket_description = d['ticket_description']
  231. if 'ticket_quantity' in d:
  232. o.ticket_quantity = d['ticket_quantity']
  233. if 'ticket_type' in d:
  234. o.ticket_type = d['ticket_type']
  235. if 'ticket_valid_period' in d:
  236. o.ticket_valid_period = d['ticket_valid_period']
  237. if 'total_amount' in d:
  238. o.total_amount = d['total_amount']
  239. return o