AlipayInsAutoAutoinsprodQuoteApplyModel.py 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. from alipay.aop.api.domain.InsProduct import InsProduct
  6. from alipay.aop.api.domain.InsProduct import InsProduct
  7. class AlipayInsAutoAutoinsprodQuoteApplyModel(object):
  8. def __init__(self):
  9. self._business_product = None
  10. self._check_code = None
  11. self._check_code_id = None
  12. self._check_type = None
  13. self._company_id = None
  14. self._company_ids = None
  15. self._enquiry_biz_id = None
  16. self._force_product = None
  17. self._is_tong_rong = None
  18. self._quote_type = None
  19. self._tax_inst_code = None
  20. self._tax_inst_name = None
  21. self._tax_payment_code = None
  22. self._tax_payment_date = None
  23. self._tax_type = None
  24. @property
  25. def business_product(self):
  26. return self._business_product
  27. @business_product.setter
  28. def business_product(self, value):
  29. if isinstance(value, InsProduct):
  30. self._business_product = value
  31. else:
  32. self._business_product = InsProduct.from_alipay_dict(value)
  33. @property
  34. def check_code(self):
  35. return self._check_code
  36. @check_code.setter
  37. def check_code(self, value):
  38. self._check_code = value
  39. @property
  40. def check_code_id(self):
  41. return self._check_code_id
  42. @check_code_id.setter
  43. def check_code_id(self, value):
  44. self._check_code_id = value
  45. @property
  46. def check_type(self):
  47. return self._check_type
  48. @check_type.setter
  49. def check_type(self, value):
  50. self._check_type = value
  51. @property
  52. def company_id(self):
  53. return self._company_id
  54. @company_id.setter
  55. def company_id(self, value):
  56. self._company_id = value
  57. @property
  58. def company_ids(self):
  59. return self._company_ids
  60. @company_ids.setter
  61. def company_ids(self, value):
  62. if isinstance(value, list):
  63. self._company_ids = list()
  64. for i in value:
  65. self._company_ids.append(i)
  66. @property
  67. def enquiry_biz_id(self):
  68. return self._enquiry_biz_id
  69. @enquiry_biz_id.setter
  70. def enquiry_biz_id(self, value):
  71. self._enquiry_biz_id = value
  72. @property
  73. def force_product(self):
  74. return self._force_product
  75. @force_product.setter
  76. def force_product(self, value):
  77. if isinstance(value, InsProduct):
  78. self._force_product = value
  79. else:
  80. self._force_product = InsProduct.from_alipay_dict(value)
  81. @property
  82. def is_tong_rong(self):
  83. return self._is_tong_rong
  84. @is_tong_rong.setter
  85. def is_tong_rong(self, value):
  86. self._is_tong_rong = value
  87. @property
  88. def quote_type(self):
  89. return self._quote_type
  90. @quote_type.setter
  91. def quote_type(self, value):
  92. self._quote_type = value
  93. @property
  94. def tax_inst_code(self):
  95. return self._tax_inst_code
  96. @tax_inst_code.setter
  97. def tax_inst_code(self, value):
  98. self._tax_inst_code = value
  99. @property
  100. def tax_inst_name(self):
  101. return self._tax_inst_name
  102. @tax_inst_name.setter
  103. def tax_inst_name(self, value):
  104. self._tax_inst_name = value
  105. @property
  106. def tax_payment_code(self):
  107. return self._tax_payment_code
  108. @tax_payment_code.setter
  109. def tax_payment_code(self, value):
  110. self._tax_payment_code = value
  111. @property
  112. def tax_payment_date(self):
  113. return self._tax_payment_date
  114. @tax_payment_date.setter
  115. def tax_payment_date(self, value):
  116. self._tax_payment_date = value
  117. @property
  118. def tax_type(self):
  119. return self._tax_type
  120. @tax_type.setter
  121. def tax_type(self, value):
  122. self._tax_type = value
  123. def to_alipay_dict(self):
  124. params = dict()
  125. if self.business_product:
  126. if hasattr(self.business_product, 'to_alipay_dict'):
  127. params['business_product'] = self.business_product.to_alipay_dict()
  128. else:
  129. params['business_product'] = self.business_product
  130. if self.check_code:
  131. if hasattr(self.check_code, 'to_alipay_dict'):
  132. params['check_code'] = self.check_code.to_alipay_dict()
  133. else:
  134. params['check_code'] = self.check_code
  135. if self.check_code_id:
  136. if hasattr(self.check_code_id, 'to_alipay_dict'):
  137. params['check_code_id'] = self.check_code_id.to_alipay_dict()
  138. else:
  139. params['check_code_id'] = self.check_code_id
  140. if self.check_type:
  141. if hasattr(self.check_type, 'to_alipay_dict'):
  142. params['check_type'] = self.check_type.to_alipay_dict()
  143. else:
  144. params['check_type'] = self.check_type
  145. if self.company_id:
  146. if hasattr(self.company_id, 'to_alipay_dict'):
  147. params['company_id'] = self.company_id.to_alipay_dict()
  148. else:
  149. params['company_id'] = self.company_id
  150. if self.company_ids:
  151. if isinstance(self.company_ids, list):
  152. for i in range(0, len(self.company_ids)):
  153. element = self.company_ids[i]
  154. if hasattr(element, 'to_alipay_dict'):
  155. self.company_ids[i] = element.to_alipay_dict()
  156. if hasattr(self.company_ids, 'to_alipay_dict'):
  157. params['company_ids'] = self.company_ids.to_alipay_dict()
  158. else:
  159. params['company_ids'] = self.company_ids
  160. if self.enquiry_biz_id:
  161. if hasattr(self.enquiry_biz_id, 'to_alipay_dict'):
  162. params['enquiry_biz_id'] = self.enquiry_biz_id.to_alipay_dict()
  163. else:
  164. params['enquiry_biz_id'] = self.enquiry_biz_id
  165. if self.force_product:
  166. if hasattr(self.force_product, 'to_alipay_dict'):
  167. params['force_product'] = self.force_product.to_alipay_dict()
  168. else:
  169. params['force_product'] = self.force_product
  170. if self.is_tong_rong:
  171. if hasattr(self.is_tong_rong, 'to_alipay_dict'):
  172. params['is_tong_rong'] = self.is_tong_rong.to_alipay_dict()
  173. else:
  174. params['is_tong_rong'] = self.is_tong_rong
  175. if self.quote_type:
  176. if hasattr(self.quote_type, 'to_alipay_dict'):
  177. params['quote_type'] = self.quote_type.to_alipay_dict()
  178. else:
  179. params['quote_type'] = self.quote_type
  180. if self.tax_inst_code:
  181. if hasattr(self.tax_inst_code, 'to_alipay_dict'):
  182. params['tax_inst_code'] = self.tax_inst_code.to_alipay_dict()
  183. else:
  184. params['tax_inst_code'] = self.tax_inst_code
  185. if self.tax_inst_name:
  186. if hasattr(self.tax_inst_name, 'to_alipay_dict'):
  187. params['tax_inst_name'] = self.tax_inst_name.to_alipay_dict()
  188. else:
  189. params['tax_inst_name'] = self.tax_inst_name
  190. if self.tax_payment_code:
  191. if hasattr(self.tax_payment_code, 'to_alipay_dict'):
  192. params['tax_payment_code'] = self.tax_payment_code.to_alipay_dict()
  193. else:
  194. params['tax_payment_code'] = self.tax_payment_code
  195. if self.tax_payment_date:
  196. if hasattr(self.tax_payment_date, 'to_alipay_dict'):
  197. params['tax_payment_date'] = self.tax_payment_date.to_alipay_dict()
  198. else:
  199. params['tax_payment_date'] = self.tax_payment_date
  200. if self.tax_type:
  201. if hasattr(self.tax_type, 'to_alipay_dict'):
  202. params['tax_type'] = self.tax_type.to_alipay_dict()
  203. else:
  204. params['tax_type'] = self.tax_type
  205. return params
  206. @staticmethod
  207. def from_alipay_dict(d):
  208. if not d:
  209. return None
  210. o = AlipayInsAutoAutoinsprodQuoteApplyModel()
  211. if 'business_product' in d:
  212. o.business_product = d['business_product']
  213. if 'check_code' in d:
  214. o.check_code = d['check_code']
  215. if 'check_code_id' in d:
  216. o.check_code_id = d['check_code_id']
  217. if 'check_type' in d:
  218. o.check_type = d['check_type']
  219. if 'company_id' in d:
  220. o.company_id = d['company_id']
  221. if 'company_ids' in d:
  222. o.company_ids = d['company_ids']
  223. if 'enquiry_biz_id' in d:
  224. o.enquiry_biz_id = d['enquiry_biz_id']
  225. if 'force_product' in d:
  226. o.force_product = d['force_product']
  227. if 'is_tong_rong' in d:
  228. o.is_tong_rong = d['is_tong_rong']
  229. if 'quote_type' in d:
  230. o.quote_type = d['quote_type']
  231. if 'tax_inst_code' in d:
  232. o.tax_inst_code = d['tax_inst_code']
  233. if 'tax_inst_name' in d:
  234. o.tax_inst_name = d['tax_inst_name']
  235. if 'tax_payment_code' in d:
  236. o.tax_payment_code = d['tax_payment_code']
  237. if 'tax_payment_date' in d:
  238. o.tax_payment_date = d['tax_payment_date']
  239. if 'tax_type' in d:
  240. o.tax_type = d['tax_type']
  241. return o