AlipayOpenOperationPartnerSettleSignModel.py 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOpenOperationPartnerSettleSignModel(object):
  6. def __init__(self):
  7. self._address = None
  8. self._channel_id = None
  9. self._city_code = None
  10. self._company_name = None
  11. self._contact_email = None
  12. self._contact_name = None
  13. self._contact_phone = None
  14. self._district_code = None
  15. self._province_code = None
  16. self._remark = None
  17. self._roles = None
  18. @property
  19. def address(self):
  20. return self._address
  21. @address.setter
  22. def address(self, value):
  23. self._address = value
  24. @property
  25. def channel_id(self):
  26. return self._channel_id
  27. @channel_id.setter
  28. def channel_id(self, value):
  29. self._channel_id = value
  30. @property
  31. def city_code(self):
  32. return self._city_code
  33. @city_code.setter
  34. def city_code(self, value):
  35. self._city_code = value
  36. @property
  37. def company_name(self):
  38. return self._company_name
  39. @company_name.setter
  40. def company_name(self, value):
  41. self._company_name = value
  42. @property
  43. def contact_email(self):
  44. return self._contact_email
  45. @contact_email.setter
  46. def contact_email(self, value):
  47. self._contact_email = value
  48. @property
  49. def contact_name(self):
  50. return self._contact_name
  51. @contact_name.setter
  52. def contact_name(self, value):
  53. self._contact_name = value
  54. @property
  55. def contact_phone(self):
  56. return self._contact_phone
  57. @contact_phone.setter
  58. def contact_phone(self, value):
  59. self._contact_phone = value
  60. @property
  61. def district_code(self):
  62. return self._district_code
  63. @district_code.setter
  64. def district_code(self, value):
  65. self._district_code = value
  66. @property
  67. def province_code(self):
  68. return self._province_code
  69. @province_code.setter
  70. def province_code(self, value):
  71. self._province_code = value
  72. @property
  73. def remark(self):
  74. return self._remark
  75. @remark.setter
  76. def remark(self, value):
  77. self._remark = value
  78. @property
  79. def roles(self):
  80. return self._roles
  81. @roles.setter
  82. def roles(self, value):
  83. if isinstance(value, list):
  84. self._roles = list()
  85. for i in value:
  86. self._roles.append(i)
  87. def to_alipay_dict(self):
  88. params = dict()
  89. if self.address:
  90. if hasattr(self.address, 'to_alipay_dict'):
  91. params['address'] = self.address.to_alipay_dict()
  92. else:
  93. params['address'] = self.address
  94. if self.channel_id:
  95. if hasattr(self.channel_id, 'to_alipay_dict'):
  96. params['channel_id'] = self.channel_id.to_alipay_dict()
  97. else:
  98. params['channel_id'] = self.channel_id
  99. if self.city_code:
  100. if hasattr(self.city_code, 'to_alipay_dict'):
  101. params['city_code'] = self.city_code.to_alipay_dict()
  102. else:
  103. params['city_code'] = self.city_code
  104. if self.company_name:
  105. if hasattr(self.company_name, 'to_alipay_dict'):
  106. params['company_name'] = self.company_name.to_alipay_dict()
  107. else:
  108. params['company_name'] = self.company_name
  109. if self.contact_email:
  110. if hasattr(self.contact_email, 'to_alipay_dict'):
  111. params['contact_email'] = self.contact_email.to_alipay_dict()
  112. else:
  113. params['contact_email'] = self.contact_email
  114. if self.contact_name:
  115. if hasattr(self.contact_name, 'to_alipay_dict'):
  116. params['contact_name'] = self.contact_name.to_alipay_dict()
  117. else:
  118. params['contact_name'] = self.contact_name
  119. if self.contact_phone:
  120. if hasattr(self.contact_phone, 'to_alipay_dict'):
  121. params['contact_phone'] = self.contact_phone.to_alipay_dict()
  122. else:
  123. params['contact_phone'] = self.contact_phone
  124. if self.district_code:
  125. if hasattr(self.district_code, 'to_alipay_dict'):
  126. params['district_code'] = self.district_code.to_alipay_dict()
  127. else:
  128. params['district_code'] = self.district_code
  129. if self.province_code:
  130. if hasattr(self.province_code, 'to_alipay_dict'):
  131. params['province_code'] = self.province_code.to_alipay_dict()
  132. else:
  133. params['province_code'] = self.province_code
  134. if self.remark:
  135. if hasattr(self.remark, 'to_alipay_dict'):
  136. params['remark'] = self.remark.to_alipay_dict()
  137. else:
  138. params['remark'] = self.remark
  139. if self.roles:
  140. if isinstance(self.roles, list):
  141. for i in range(0, len(self.roles)):
  142. element = self.roles[i]
  143. if hasattr(element, 'to_alipay_dict'):
  144. self.roles[i] = element.to_alipay_dict()
  145. if hasattr(self.roles, 'to_alipay_dict'):
  146. params['roles'] = self.roles.to_alipay_dict()
  147. else:
  148. params['roles'] = self.roles
  149. return params
  150. @staticmethod
  151. def from_alipay_dict(d):
  152. if not d:
  153. return None
  154. o = AlipayOpenOperationPartnerSettleSignModel()
  155. if 'address' in d:
  156. o.address = d['address']
  157. if 'channel_id' in d:
  158. o.channel_id = d['channel_id']
  159. if 'city_code' in d:
  160. o.city_code = d['city_code']
  161. if 'company_name' in d:
  162. o.company_name = d['company_name']
  163. if 'contact_email' in d:
  164. o.contact_email = d['contact_email']
  165. if 'contact_name' in d:
  166. o.contact_name = d['contact_name']
  167. if 'contact_phone' in d:
  168. o.contact_phone = d['contact_phone']
  169. if 'district_code' in d:
  170. o.district_code = d['district_code']
  171. if 'province_code' in d:
  172. o.province_code = d['province_code']
  173. if 'remark' in d:
  174. o.remark = d['remark']
  175. if 'roles' in d:
  176. o.roles = d['roles']
  177. return o