AntMerchantExpandIsvShopCreateModel.py 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  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.ShopBusinessTime import ShopBusinessTime
  6. class AntMerchantExpandIsvShopCreateModel(object):
  7. def __init__(self):
  8. self._address = None
  9. self._address_memo = None
  10. self._attachment_list = None
  11. self._biz_type = None
  12. self._business_time = None
  13. self._campus_id = None
  14. self._campus_name = None
  15. self._category_label = None
  16. self._city_code = None
  17. self._contact_mobile = None
  18. self._contact_phone = None
  19. self._district_code = None
  20. self._isv_contact_mobile = None
  21. self._isv_contact_name = None
  22. self._memo = None
  23. self._pid = None
  24. self._province_code = None
  25. self._qualification_proof_list = None
  26. self._qualification_proof_type = None
  27. self._shop_category = None
  28. self._shop_name = None
  29. self._shop_type = None
  30. self._store_id = None
  31. @property
  32. def address(self):
  33. return self._address
  34. @address.setter
  35. def address(self, value):
  36. self._address = value
  37. @property
  38. def address_memo(self):
  39. return self._address_memo
  40. @address_memo.setter
  41. def address_memo(self, value):
  42. self._address_memo = value
  43. @property
  44. def attachment_list(self):
  45. return self._attachment_list
  46. @attachment_list.setter
  47. def attachment_list(self, value):
  48. self._attachment_list = value
  49. @property
  50. def biz_type(self):
  51. return self._biz_type
  52. @biz_type.setter
  53. def biz_type(self, value):
  54. self._biz_type = value
  55. @property
  56. def business_time(self):
  57. return self._business_time
  58. @business_time.setter
  59. def business_time(self, value):
  60. if isinstance(value, list):
  61. self._business_time = list()
  62. for i in value:
  63. if isinstance(i, ShopBusinessTime):
  64. self._business_time.append(i)
  65. else:
  66. self._business_time.append(ShopBusinessTime.from_alipay_dict(i))
  67. @property
  68. def campus_id(self):
  69. return self._campus_id
  70. @campus_id.setter
  71. def campus_id(self, value):
  72. self._campus_id = value
  73. @property
  74. def campus_name(self):
  75. return self._campus_name
  76. @campus_name.setter
  77. def campus_name(self, value):
  78. self._campus_name = value
  79. @property
  80. def category_label(self):
  81. return self._category_label
  82. @category_label.setter
  83. def category_label(self, value):
  84. self._category_label = value
  85. @property
  86. def city_code(self):
  87. return self._city_code
  88. @city_code.setter
  89. def city_code(self, value):
  90. self._city_code = value
  91. @property
  92. def contact_mobile(self):
  93. return self._contact_mobile
  94. @contact_mobile.setter
  95. def contact_mobile(self, value):
  96. self._contact_mobile = value
  97. @property
  98. def contact_phone(self):
  99. return self._contact_phone
  100. @contact_phone.setter
  101. def contact_phone(self, value):
  102. self._contact_phone = value
  103. @property
  104. def district_code(self):
  105. return self._district_code
  106. @district_code.setter
  107. def district_code(self, value):
  108. self._district_code = value
  109. @property
  110. def isv_contact_mobile(self):
  111. return self._isv_contact_mobile
  112. @isv_contact_mobile.setter
  113. def isv_contact_mobile(self, value):
  114. self._isv_contact_mobile = value
  115. @property
  116. def isv_contact_name(self):
  117. return self._isv_contact_name
  118. @isv_contact_name.setter
  119. def isv_contact_name(self, value):
  120. self._isv_contact_name = value
  121. @property
  122. def memo(self):
  123. return self._memo
  124. @memo.setter
  125. def memo(self, value):
  126. self._memo = value
  127. @property
  128. def pid(self):
  129. return self._pid
  130. @pid.setter
  131. def pid(self, value):
  132. self._pid = value
  133. @property
  134. def province_code(self):
  135. return self._province_code
  136. @province_code.setter
  137. def province_code(self, value):
  138. self._province_code = value
  139. @property
  140. def qualification_proof_list(self):
  141. return self._qualification_proof_list
  142. @qualification_proof_list.setter
  143. def qualification_proof_list(self, value):
  144. self._qualification_proof_list = value
  145. @property
  146. def qualification_proof_type(self):
  147. return self._qualification_proof_type
  148. @qualification_proof_type.setter
  149. def qualification_proof_type(self, value):
  150. self._qualification_proof_type = value
  151. @property
  152. def shop_category(self):
  153. return self._shop_category
  154. @shop_category.setter
  155. def shop_category(self, value):
  156. self._shop_category = value
  157. @property
  158. def shop_name(self):
  159. return self._shop_name
  160. @shop_name.setter
  161. def shop_name(self, value):
  162. self._shop_name = value
  163. @property
  164. def shop_type(self):
  165. return self._shop_type
  166. @shop_type.setter
  167. def shop_type(self, value):
  168. self._shop_type = value
  169. @property
  170. def store_id(self):
  171. return self._store_id
  172. @store_id.setter
  173. def store_id(self, value):
  174. self._store_id = value
  175. def to_alipay_dict(self):
  176. params = dict()
  177. if self.address:
  178. if hasattr(self.address, 'to_alipay_dict'):
  179. params['address'] = self.address.to_alipay_dict()
  180. else:
  181. params['address'] = self.address
  182. if self.address_memo:
  183. if hasattr(self.address_memo, 'to_alipay_dict'):
  184. params['address_memo'] = self.address_memo.to_alipay_dict()
  185. else:
  186. params['address_memo'] = self.address_memo
  187. if self.attachment_list:
  188. if hasattr(self.attachment_list, 'to_alipay_dict'):
  189. params['attachment_list'] = self.attachment_list.to_alipay_dict()
  190. else:
  191. params['attachment_list'] = self.attachment_list
  192. if self.biz_type:
  193. if hasattr(self.biz_type, 'to_alipay_dict'):
  194. params['biz_type'] = self.biz_type.to_alipay_dict()
  195. else:
  196. params['biz_type'] = self.biz_type
  197. if self.business_time:
  198. if isinstance(self.business_time, list):
  199. for i in range(0, len(self.business_time)):
  200. element = self.business_time[i]
  201. if hasattr(element, 'to_alipay_dict'):
  202. self.business_time[i] = element.to_alipay_dict()
  203. if hasattr(self.business_time, 'to_alipay_dict'):
  204. params['business_time'] = self.business_time.to_alipay_dict()
  205. else:
  206. params['business_time'] = self.business_time
  207. if self.campus_id:
  208. if hasattr(self.campus_id, 'to_alipay_dict'):
  209. params['campus_id'] = self.campus_id.to_alipay_dict()
  210. else:
  211. params['campus_id'] = self.campus_id
  212. if self.campus_name:
  213. if hasattr(self.campus_name, 'to_alipay_dict'):
  214. params['campus_name'] = self.campus_name.to_alipay_dict()
  215. else:
  216. params['campus_name'] = self.campus_name
  217. if self.category_label:
  218. if hasattr(self.category_label, 'to_alipay_dict'):
  219. params['category_label'] = self.category_label.to_alipay_dict()
  220. else:
  221. params['category_label'] = self.category_label
  222. if self.city_code:
  223. if hasattr(self.city_code, 'to_alipay_dict'):
  224. params['city_code'] = self.city_code.to_alipay_dict()
  225. else:
  226. params['city_code'] = self.city_code
  227. if self.contact_mobile:
  228. if hasattr(self.contact_mobile, 'to_alipay_dict'):
  229. params['contact_mobile'] = self.contact_mobile.to_alipay_dict()
  230. else:
  231. params['contact_mobile'] = self.contact_mobile
  232. if self.contact_phone:
  233. if hasattr(self.contact_phone, 'to_alipay_dict'):
  234. params['contact_phone'] = self.contact_phone.to_alipay_dict()
  235. else:
  236. params['contact_phone'] = self.contact_phone
  237. if self.district_code:
  238. if hasattr(self.district_code, 'to_alipay_dict'):
  239. params['district_code'] = self.district_code.to_alipay_dict()
  240. else:
  241. params['district_code'] = self.district_code
  242. if self.isv_contact_mobile:
  243. if hasattr(self.isv_contact_mobile, 'to_alipay_dict'):
  244. params['isv_contact_mobile'] = self.isv_contact_mobile.to_alipay_dict()
  245. else:
  246. params['isv_contact_mobile'] = self.isv_contact_mobile
  247. if self.isv_contact_name:
  248. if hasattr(self.isv_contact_name, 'to_alipay_dict'):
  249. params['isv_contact_name'] = self.isv_contact_name.to_alipay_dict()
  250. else:
  251. params['isv_contact_name'] = self.isv_contact_name
  252. if self.memo:
  253. if hasattr(self.memo, 'to_alipay_dict'):
  254. params['memo'] = self.memo.to_alipay_dict()
  255. else:
  256. params['memo'] = self.memo
  257. if self.pid:
  258. if hasattr(self.pid, 'to_alipay_dict'):
  259. params['pid'] = self.pid.to_alipay_dict()
  260. else:
  261. params['pid'] = self.pid
  262. if self.province_code:
  263. if hasattr(self.province_code, 'to_alipay_dict'):
  264. params['province_code'] = self.province_code.to_alipay_dict()
  265. else:
  266. params['province_code'] = self.province_code
  267. if self.qualification_proof_list:
  268. if hasattr(self.qualification_proof_list, 'to_alipay_dict'):
  269. params['qualification_proof_list'] = self.qualification_proof_list.to_alipay_dict()
  270. else:
  271. params['qualification_proof_list'] = self.qualification_proof_list
  272. if self.qualification_proof_type:
  273. if hasattr(self.qualification_proof_type, 'to_alipay_dict'):
  274. params['qualification_proof_type'] = self.qualification_proof_type.to_alipay_dict()
  275. else:
  276. params['qualification_proof_type'] = self.qualification_proof_type
  277. if self.shop_category:
  278. if hasattr(self.shop_category, 'to_alipay_dict'):
  279. params['shop_category'] = self.shop_category.to_alipay_dict()
  280. else:
  281. params['shop_category'] = self.shop_category
  282. if self.shop_name:
  283. if hasattr(self.shop_name, 'to_alipay_dict'):
  284. params['shop_name'] = self.shop_name.to_alipay_dict()
  285. else:
  286. params['shop_name'] = self.shop_name
  287. if self.shop_type:
  288. if hasattr(self.shop_type, 'to_alipay_dict'):
  289. params['shop_type'] = self.shop_type.to_alipay_dict()
  290. else:
  291. params['shop_type'] = self.shop_type
  292. if self.store_id:
  293. if hasattr(self.store_id, 'to_alipay_dict'):
  294. params['store_id'] = self.store_id.to_alipay_dict()
  295. else:
  296. params['store_id'] = self.store_id
  297. return params
  298. @staticmethod
  299. def from_alipay_dict(d):
  300. if not d:
  301. return None
  302. o = AntMerchantExpandIsvShopCreateModel()
  303. if 'address' in d:
  304. o.address = d['address']
  305. if 'address_memo' in d:
  306. o.address_memo = d['address_memo']
  307. if 'attachment_list' in d:
  308. o.attachment_list = d['attachment_list']
  309. if 'biz_type' in d:
  310. o.biz_type = d['biz_type']
  311. if 'business_time' in d:
  312. o.business_time = d['business_time']
  313. if 'campus_id' in d:
  314. o.campus_id = d['campus_id']
  315. if 'campus_name' in d:
  316. o.campus_name = d['campus_name']
  317. if 'category_label' in d:
  318. o.category_label = d['category_label']
  319. if 'city_code' in d:
  320. o.city_code = d['city_code']
  321. if 'contact_mobile' in d:
  322. o.contact_mobile = d['contact_mobile']
  323. if 'contact_phone' in d:
  324. o.contact_phone = d['contact_phone']
  325. if 'district_code' in d:
  326. o.district_code = d['district_code']
  327. if 'isv_contact_mobile' in d:
  328. o.isv_contact_mobile = d['isv_contact_mobile']
  329. if 'isv_contact_name' in d:
  330. o.isv_contact_name = d['isv_contact_name']
  331. if 'memo' in d:
  332. o.memo = d['memo']
  333. if 'pid' in d:
  334. o.pid = d['pid']
  335. if 'province_code' in d:
  336. o.province_code = d['province_code']
  337. if 'qualification_proof_list' in d:
  338. o.qualification_proof_list = d['qualification_proof_list']
  339. if 'qualification_proof_type' in d:
  340. o.qualification_proof_type = d['qualification_proof_type']
  341. if 'shop_category' in d:
  342. o.shop_category = d['shop_category']
  343. if 'shop_name' in d:
  344. o.shop_name = d['shop_name']
  345. if 'shop_type' in d:
  346. o.shop_type = d['shop_type']
  347. if 'store_id' in d:
  348. o.store_id = d['store_id']
  349. return o