AlipayMarketingExchangevoucherTemplateCreateModel.py 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayMarketingExchangevoucherTemplateCreateModel(object):
  6. def __init__(self):
  7. self._brand_name = None
  8. self._extension_info = None
  9. self._notify_uri = None
  10. self._out_biz_no = None
  11. self._publish_end_time = None
  12. self._publish_start_time = None
  13. self._use_type = None
  14. self._voucher_available_time = None
  15. self._voucher_description = None
  16. self._voucher_name = None
  17. self._voucher_quantity = None
  18. self._voucher_type = None
  19. self._voucher_valid_period = None
  20. @property
  21. def brand_name(self):
  22. return self._brand_name
  23. @brand_name.setter
  24. def brand_name(self, value):
  25. self._brand_name = value
  26. @property
  27. def extension_info(self):
  28. return self._extension_info
  29. @extension_info.setter
  30. def extension_info(self, value):
  31. self._extension_info = value
  32. @property
  33. def notify_uri(self):
  34. return self._notify_uri
  35. @notify_uri.setter
  36. def notify_uri(self, value):
  37. self._notify_uri = value
  38. @property
  39. def out_biz_no(self):
  40. return self._out_biz_no
  41. @out_biz_no.setter
  42. def out_biz_no(self, value):
  43. self._out_biz_no = value
  44. @property
  45. def publish_end_time(self):
  46. return self._publish_end_time
  47. @publish_end_time.setter
  48. def publish_end_time(self, value):
  49. self._publish_end_time = value
  50. @property
  51. def publish_start_time(self):
  52. return self._publish_start_time
  53. @publish_start_time.setter
  54. def publish_start_time(self, value):
  55. self._publish_start_time = value
  56. @property
  57. def use_type(self):
  58. return self._use_type
  59. @use_type.setter
  60. def use_type(self, value):
  61. self._use_type = value
  62. @property
  63. def voucher_available_time(self):
  64. return self._voucher_available_time
  65. @voucher_available_time.setter
  66. def voucher_available_time(self, value):
  67. self._voucher_available_time = value
  68. @property
  69. def voucher_description(self):
  70. return self._voucher_description
  71. @voucher_description.setter
  72. def voucher_description(self, value):
  73. self._voucher_description = value
  74. @property
  75. def voucher_name(self):
  76. return self._voucher_name
  77. @voucher_name.setter
  78. def voucher_name(self, value):
  79. self._voucher_name = value
  80. @property
  81. def voucher_quantity(self):
  82. return self._voucher_quantity
  83. @voucher_quantity.setter
  84. def voucher_quantity(self, value):
  85. self._voucher_quantity = value
  86. @property
  87. def voucher_type(self):
  88. return self._voucher_type
  89. @voucher_type.setter
  90. def voucher_type(self, value):
  91. self._voucher_type = value
  92. @property
  93. def voucher_valid_period(self):
  94. return self._voucher_valid_period
  95. @voucher_valid_period.setter
  96. def voucher_valid_period(self, value):
  97. self._voucher_valid_period = value
  98. def to_alipay_dict(self):
  99. params = dict()
  100. if self.brand_name:
  101. if hasattr(self.brand_name, 'to_alipay_dict'):
  102. params['brand_name'] = self.brand_name.to_alipay_dict()
  103. else:
  104. params['brand_name'] = self.brand_name
  105. if self.extension_info:
  106. if hasattr(self.extension_info, 'to_alipay_dict'):
  107. params['extension_info'] = self.extension_info.to_alipay_dict()
  108. else:
  109. params['extension_info'] = self.extension_info
  110. if self.notify_uri:
  111. if hasattr(self.notify_uri, 'to_alipay_dict'):
  112. params['notify_uri'] = self.notify_uri.to_alipay_dict()
  113. else:
  114. params['notify_uri'] = self.notify_uri
  115. if self.out_biz_no:
  116. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  117. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  118. else:
  119. params['out_biz_no'] = self.out_biz_no
  120. if self.publish_end_time:
  121. if hasattr(self.publish_end_time, 'to_alipay_dict'):
  122. params['publish_end_time'] = self.publish_end_time.to_alipay_dict()
  123. else:
  124. params['publish_end_time'] = self.publish_end_time
  125. if self.publish_start_time:
  126. if hasattr(self.publish_start_time, 'to_alipay_dict'):
  127. params['publish_start_time'] = self.publish_start_time.to_alipay_dict()
  128. else:
  129. params['publish_start_time'] = self.publish_start_time
  130. if self.use_type:
  131. if hasattr(self.use_type, 'to_alipay_dict'):
  132. params['use_type'] = self.use_type.to_alipay_dict()
  133. else:
  134. params['use_type'] = self.use_type
  135. if self.voucher_available_time:
  136. if hasattr(self.voucher_available_time, 'to_alipay_dict'):
  137. params['voucher_available_time'] = self.voucher_available_time.to_alipay_dict()
  138. else:
  139. params['voucher_available_time'] = self.voucher_available_time
  140. if self.voucher_description:
  141. if hasattr(self.voucher_description, 'to_alipay_dict'):
  142. params['voucher_description'] = self.voucher_description.to_alipay_dict()
  143. else:
  144. params['voucher_description'] = self.voucher_description
  145. if self.voucher_name:
  146. if hasattr(self.voucher_name, 'to_alipay_dict'):
  147. params['voucher_name'] = self.voucher_name.to_alipay_dict()
  148. else:
  149. params['voucher_name'] = self.voucher_name
  150. if self.voucher_quantity:
  151. if hasattr(self.voucher_quantity, 'to_alipay_dict'):
  152. params['voucher_quantity'] = self.voucher_quantity.to_alipay_dict()
  153. else:
  154. params['voucher_quantity'] = self.voucher_quantity
  155. if self.voucher_type:
  156. if hasattr(self.voucher_type, 'to_alipay_dict'):
  157. params['voucher_type'] = self.voucher_type.to_alipay_dict()
  158. else:
  159. params['voucher_type'] = self.voucher_type
  160. if self.voucher_valid_period:
  161. if hasattr(self.voucher_valid_period, 'to_alipay_dict'):
  162. params['voucher_valid_period'] = self.voucher_valid_period.to_alipay_dict()
  163. else:
  164. params['voucher_valid_period'] = self.voucher_valid_period
  165. return params
  166. @staticmethod
  167. def from_alipay_dict(d):
  168. if not d:
  169. return None
  170. o = AlipayMarketingExchangevoucherTemplateCreateModel()
  171. if 'brand_name' in d:
  172. o.brand_name = d['brand_name']
  173. if 'extension_info' in d:
  174. o.extension_info = d['extension_info']
  175. if 'notify_uri' in d:
  176. o.notify_uri = d['notify_uri']
  177. if 'out_biz_no' in d:
  178. o.out_biz_no = d['out_biz_no']
  179. if 'publish_end_time' in d:
  180. o.publish_end_time = d['publish_end_time']
  181. if 'publish_start_time' in d:
  182. o.publish_start_time = d['publish_start_time']
  183. if 'use_type' in d:
  184. o.use_type = d['use_type']
  185. if 'voucher_available_time' in d:
  186. o.voucher_available_time = d['voucher_available_time']
  187. if 'voucher_description' in d:
  188. o.voucher_description = d['voucher_description']
  189. if 'voucher_name' in d:
  190. o.voucher_name = d['voucher_name']
  191. if 'voucher_quantity' in d:
  192. o.voucher_quantity = d['voucher_quantity']
  193. if 'voucher_type' in d:
  194. o.voucher_type = d['voucher_type']
  195. if 'voucher_valid_period' in d:
  196. o.voucher_valid_period = d['voucher_valid_period']
  197. return o