AlipayOpenPublicLifeaccountCreateModel.py 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOpenPublicLifeaccountCreateModel(object):
  6. def __init__(self):
  7. self._agreement = None
  8. self._background = None
  9. self._biz_license_no = None
  10. self._brand_authorization = None
  11. self._brief_introduction = None
  12. self._business_license = None
  13. self._category_id = None
  14. self._contact_email = None
  15. self._contact_name = None
  16. self._contact_tel = None
  17. self._customer_tel = None
  18. self._logo = None
  19. self._menu_info = None
  20. self._name = None
  21. self._platform_account_id = None
  22. self._platform_unique_id = None
  23. self._user_id = None
  24. @property
  25. def agreement(self):
  26. return self._agreement
  27. @agreement.setter
  28. def agreement(self, value):
  29. self._agreement = value
  30. @property
  31. def background(self):
  32. return self._background
  33. @background.setter
  34. def background(self, value):
  35. self._background = value
  36. @property
  37. def biz_license_no(self):
  38. return self._biz_license_no
  39. @biz_license_no.setter
  40. def biz_license_no(self, value):
  41. self._biz_license_no = value
  42. @property
  43. def brand_authorization(self):
  44. return self._brand_authorization
  45. @brand_authorization.setter
  46. def brand_authorization(self, value):
  47. if isinstance(value, list):
  48. self._brand_authorization = list()
  49. for i in value:
  50. self._brand_authorization.append(i)
  51. @property
  52. def brief_introduction(self):
  53. return self._brief_introduction
  54. @brief_introduction.setter
  55. def brief_introduction(self, value):
  56. self._brief_introduction = value
  57. @property
  58. def business_license(self):
  59. return self._business_license
  60. @business_license.setter
  61. def business_license(self, value):
  62. self._business_license = value
  63. @property
  64. def category_id(self):
  65. return self._category_id
  66. @category_id.setter
  67. def category_id(self, value):
  68. self._category_id = value
  69. @property
  70. def contact_email(self):
  71. return self._contact_email
  72. @contact_email.setter
  73. def contact_email(self, value):
  74. self._contact_email = value
  75. @property
  76. def contact_name(self):
  77. return self._contact_name
  78. @contact_name.setter
  79. def contact_name(self, value):
  80. self._contact_name = value
  81. @property
  82. def contact_tel(self):
  83. return self._contact_tel
  84. @contact_tel.setter
  85. def contact_tel(self, value):
  86. self._contact_tel = value
  87. @property
  88. def customer_tel(self):
  89. return self._customer_tel
  90. @customer_tel.setter
  91. def customer_tel(self, value):
  92. self._customer_tel = value
  93. @property
  94. def logo(self):
  95. return self._logo
  96. @logo.setter
  97. def logo(self, value):
  98. self._logo = value
  99. @property
  100. def menu_info(self):
  101. return self._menu_info
  102. @menu_info.setter
  103. def menu_info(self, value):
  104. self._menu_info = value
  105. @property
  106. def name(self):
  107. return self._name
  108. @name.setter
  109. def name(self, value):
  110. self._name = value
  111. @property
  112. def platform_account_id(self):
  113. return self._platform_account_id
  114. @platform_account_id.setter
  115. def platform_account_id(self, value):
  116. self._platform_account_id = value
  117. @property
  118. def platform_unique_id(self):
  119. return self._platform_unique_id
  120. @platform_unique_id.setter
  121. def platform_unique_id(self, value):
  122. self._platform_unique_id = value
  123. @property
  124. def user_id(self):
  125. return self._user_id
  126. @user_id.setter
  127. def user_id(self, value):
  128. self._user_id = value
  129. def to_alipay_dict(self):
  130. params = dict()
  131. if self.agreement:
  132. if hasattr(self.agreement, 'to_alipay_dict'):
  133. params['agreement'] = self.agreement.to_alipay_dict()
  134. else:
  135. params['agreement'] = self.agreement
  136. if self.background:
  137. if hasattr(self.background, 'to_alipay_dict'):
  138. params['background'] = self.background.to_alipay_dict()
  139. else:
  140. params['background'] = self.background
  141. if self.biz_license_no:
  142. if hasattr(self.biz_license_no, 'to_alipay_dict'):
  143. params['biz_license_no'] = self.biz_license_no.to_alipay_dict()
  144. else:
  145. params['biz_license_no'] = self.biz_license_no
  146. if self.brand_authorization:
  147. if isinstance(self.brand_authorization, list):
  148. for i in range(0, len(self.brand_authorization)):
  149. element = self.brand_authorization[i]
  150. if hasattr(element, 'to_alipay_dict'):
  151. self.brand_authorization[i] = element.to_alipay_dict()
  152. if hasattr(self.brand_authorization, 'to_alipay_dict'):
  153. params['brand_authorization'] = self.brand_authorization.to_alipay_dict()
  154. else:
  155. params['brand_authorization'] = self.brand_authorization
  156. if self.brief_introduction:
  157. if hasattr(self.brief_introduction, 'to_alipay_dict'):
  158. params['brief_introduction'] = self.brief_introduction.to_alipay_dict()
  159. else:
  160. params['brief_introduction'] = self.brief_introduction
  161. if self.business_license:
  162. if hasattr(self.business_license, 'to_alipay_dict'):
  163. params['business_license'] = self.business_license.to_alipay_dict()
  164. else:
  165. params['business_license'] = self.business_license
  166. if self.category_id:
  167. if hasattr(self.category_id, 'to_alipay_dict'):
  168. params['category_id'] = self.category_id.to_alipay_dict()
  169. else:
  170. params['category_id'] = self.category_id
  171. if self.contact_email:
  172. if hasattr(self.contact_email, 'to_alipay_dict'):
  173. params['contact_email'] = self.contact_email.to_alipay_dict()
  174. else:
  175. params['contact_email'] = self.contact_email
  176. if self.contact_name:
  177. if hasattr(self.contact_name, 'to_alipay_dict'):
  178. params['contact_name'] = self.contact_name.to_alipay_dict()
  179. else:
  180. params['contact_name'] = self.contact_name
  181. if self.contact_tel:
  182. if hasattr(self.contact_tel, 'to_alipay_dict'):
  183. params['contact_tel'] = self.contact_tel.to_alipay_dict()
  184. else:
  185. params['contact_tel'] = self.contact_tel
  186. if self.customer_tel:
  187. if hasattr(self.customer_tel, 'to_alipay_dict'):
  188. params['customer_tel'] = self.customer_tel.to_alipay_dict()
  189. else:
  190. params['customer_tel'] = self.customer_tel
  191. if self.logo:
  192. if hasattr(self.logo, 'to_alipay_dict'):
  193. params['logo'] = self.logo.to_alipay_dict()
  194. else:
  195. params['logo'] = self.logo
  196. if self.menu_info:
  197. if hasattr(self.menu_info, 'to_alipay_dict'):
  198. params['menu_info'] = self.menu_info.to_alipay_dict()
  199. else:
  200. params['menu_info'] = self.menu_info
  201. if self.name:
  202. if hasattr(self.name, 'to_alipay_dict'):
  203. params['name'] = self.name.to_alipay_dict()
  204. else:
  205. params['name'] = self.name
  206. if self.platform_account_id:
  207. if hasattr(self.platform_account_id, 'to_alipay_dict'):
  208. params['platform_account_id'] = self.platform_account_id.to_alipay_dict()
  209. else:
  210. params['platform_account_id'] = self.platform_account_id
  211. if self.platform_unique_id:
  212. if hasattr(self.platform_unique_id, 'to_alipay_dict'):
  213. params['platform_unique_id'] = self.platform_unique_id.to_alipay_dict()
  214. else:
  215. params['platform_unique_id'] = self.platform_unique_id
  216. if self.user_id:
  217. if hasattr(self.user_id, 'to_alipay_dict'):
  218. params['user_id'] = self.user_id.to_alipay_dict()
  219. else:
  220. params['user_id'] = self.user_id
  221. return params
  222. @staticmethod
  223. def from_alipay_dict(d):
  224. if not d:
  225. return None
  226. o = AlipayOpenPublicLifeaccountCreateModel()
  227. if 'agreement' in d:
  228. o.agreement = d['agreement']
  229. if 'background' in d:
  230. o.background = d['background']
  231. if 'biz_license_no' in d:
  232. o.biz_license_no = d['biz_license_no']
  233. if 'brand_authorization' in d:
  234. o.brand_authorization = d['brand_authorization']
  235. if 'brief_introduction' in d:
  236. o.brief_introduction = d['brief_introduction']
  237. if 'business_license' in d:
  238. o.business_license = d['business_license']
  239. if 'category_id' in d:
  240. o.category_id = d['category_id']
  241. if 'contact_email' in d:
  242. o.contact_email = d['contact_email']
  243. if 'contact_name' in d:
  244. o.contact_name = d['contact_name']
  245. if 'contact_tel' in d:
  246. o.contact_tel = d['contact_tel']
  247. if 'customer_tel' in d:
  248. o.customer_tel = d['customer_tel']
  249. if 'logo' in d:
  250. o.logo = d['logo']
  251. if 'menu_info' in d:
  252. o.menu_info = d['menu_info']
  253. if 'name' in d:
  254. o.name = d['name']
  255. if 'platform_account_id' in d:
  256. o.platform_account_id = d['platform_account_id']
  257. if 'platform_unique_id' in d:
  258. o.platform_unique_id = d['platform_unique_id']
  259. if 'user_id' in d:
  260. o.user_id = d['user_id']
  261. return o