KoubeiMerchantOperatorModifyModel.py 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiMerchantOperatorModifyModel(object):
  6. def __init__(self):
  7. self._auth_code = None
  8. self._department_id = None
  9. self._discount_limit_unit = None
  10. self._discount_limit_value = None
  11. self._free_limit_unit = None
  12. self._free_limit_value = None
  13. self._gender = None
  14. self._job_type = None
  15. self._mobile = None
  16. self._operator_id = None
  17. self._operator_name = None
  18. self._role_id = None
  19. @property
  20. def auth_code(self):
  21. return self._auth_code
  22. @auth_code.setter
  23. def auth_code(self, value):
  24. self._auth_code = value
  25. @property
  26. def department_id(self):
  27. return self._department_id
  28. @department_id.setter
  29. def department_id(self, value):
  30. self._department_id = value
  31. @property
  32. def discount_limit_unit(self):
  33. return self._discount_limit_unit
  34. @discount_limit_unit.setter
  35. def discount_limit_unit(self, value):
  36. self._discount_limit_unit = value
  37. @property
  38. def discount_limit_value(self):
  39. return self._discount_limit_value
  40. @discount_limit_value.setter
  41. def discount_limit_value(self, value):
  42. self._discount_limit_value = value
  43. @property
  44. def free_limit_unit(self):
  45. return self._free_limit_unit
  46. @free_limit_unit.setter
  47. def free_limit_unit(self, value):
  48. self._free_limit_unit = value
  49. @property
  50. def free_limit_value(self):
  51. return self._free_limit_value
  52. @free_limit_value.setter
  53. def free_limit_value(self, value):
  54. self._free_limit_value = value
  55. @property
  56. def gender(self):
  57. return self._gender
  58. @gender.setter
  59. def gender(self, value):
  60. self._gender = value
  61. @property
  62. def job_type(self):
  63. return self._job_type
  64. @job_type.setter
  65. def job_type(self, value):
  66. self._job_type = value
  67. @property
  68. def mobile(self):
  69. return self._mobile
  70. @mobile.setter
  71. def mobile(self, value):
  72. self._mobile = value
  73. @property
  74. def operator_id(self):
  75. return self._operator_id
  76. @operator_id.setter
  77. def operator_id(self, value):
  78. self._operator_id = value
  79. @property
  80. def operator_name(self):
  81. return self._operator_name
  82. @operator_name.setter
  83. def operator_name(self, value):
  84. self._operator_name = value
  85. @property
  86. def role_id(self):
  87. return self._role_id
  88. @role_id.setter
  89. def role_id(self, value):
  90. self._role_id = value
  91. def to_alipay_dict(self):
  92. params = dict()
  93. if self.auth_code:
  94. if hasattr(self.auth_code, 'to_alipay_dict'):
  95. params['auth_code'] = self.auth_code.to_alipay_dict()
  96. else:
  97. params['auth_code'] = self.auth_code
  98. if self.department_id:
  99. if hasattr(self.department_id, 'to_alipay_dict'):
  100. params['department_id'] = self.department_id.to_alipay_dict()
  101. else:
  102. params['department_id'] = self.department_id
  103. if self.discount_limit_unit:
  104. if hasattr(self.discount_limit_unit, 'to_alipay_dict'):
  105. params['discount_limit_unit'] = self.discount_limit_unit.to_alipay_dict()
  106. else:
  107. params['discount_limit_unit'] = self.discount_limit_unit
  108. if self.discount_limit_value:
  109. if hasattr(self.discount_limit_value, 'to_alipay_dict'):
  110. params['discount_limit_value'] = self.discount_limit_value.to_alipay_dict()
  111. else:
  112. params['discount_limit_value'] = self.discount_limit_value
  113. if self.free_limit_unit:
  114. if hasattr(self.free_limit_unit, 'to_alipay_dict'):
  115. params['free_limit_unit'] = self.free_limit_unit.to_alipay_dict()
  116. else:
  117. params['free_limit_unit'] = self.free_limit_unit
  118. if self.free_limit_value:
  119. if hasattr(self.free_limit_value, 'to_alipay_dict'):
  120. params['free_limit_value'] = self.free_limit_value.to_alipay_dict()
  121. else:
  122. params['free_limit_value'] = self.free_limit_value
  123. if self.gender:
  124. if hasattr(self.gender, 'to_alipay_dict'):
  125. params['gender'] = self.gender.to_alipay_dict()
  126. else:
  127. params['gender'] = self.gender
  128. if self.job_type:
  129. if hasattr(self.job_type, 'to_alipay_dict'):
  130. params['job_type'] = self.job_type.to_alipay_dict()
  131. else:
  132. params['job_type'] = self.job_type
  133. if self.mobile:
  134. if hasattr(self.mobile, 'to_alipay_dict'):
  135. params['mobile'] = self.mobile.to_alipay_dict()
  136. else:
  137. params['mobile'] = self.mobile
  138. if self.operator_id:
  139. if hasattr(self.operator_id, 'to_alipay_dict'):
  140. params['operator_id'] = self.operator_id.to_alipay_dict()
  141. else:
  142. params['operator_id'] = self.operator_id
  143. if self.operator_name:
  144. if hasattr(self.operator_name, 'to_alipay_dict'):
  145. params['operator_name'] = self.operator_name.to_alipay_dict()
  146. else:
  147. params['operator_name'] = self.operator_name
  148. if self.role_id:
  149. if hasattr(self.role_id, 'to_alipay_dict'):
  150. params['role_id'] = self.role_id.to_alipay_dict()
  151. else:
  152. params['role_id'] = self.role_id
  153. return params
  154. @staticmethod
  155. def from_alipay_dict(d):
  156. if not d:
  157. return None
  158. o = KoubeiMerchantOperatorModifyModel()
  159. if 'auth_code' in d:
  160. o.auth_code = d['auth_code']
  161. if 'department_id' in d:
  162. o.department_id = d['department_id']
  163. if 'discount_limit_unit' in d:
  164. o.discount_limit_unit = d['discount_limit_unit']
  165. if 'discount_limit_value' in d:
  166. o.discount_limit_value = d['discount_limit_value']
  167. if 'free_limit_unit' in d:
  168. o.free_limit_unit = d['free_limit_unit']
  169. if 'free_limit_value' in d:
  170. o.free_limit_value = d['free_limit_value']
  171. if 'gender' in d:
  172. o.gender = d['gender']
  173. if 'job_type' in d:
  174. o.job_type = d['job_type']
  175. if 'mobile' in d:
  176. o.mobile = d['mobile']
  177. if 'operator_id' in d:
  178. o.operator_id = d['operator_id']
  179. if 'operator_name' in d:
  180. o.operator_name = d['operator_name']
  181. if 'role_id' in d:
  182. o.role_id = d['role_id']
  183. return o