KoubeiMerchantDepartmentModifyModel.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiMerchantDepartmentModifyModel(object):
  6. def __init__(self):
  7. self._auth_code = None
  8. self._dept_id = None
  9. self._dept_name = None
  10. self._label_code = None
  11. self._parent_dept_id = None
  12. @property
  13. def auth_code(self):
  14. return self._auth_code
  15. @auth_code.setter
  16. def auth_code(self, value):
  17. self._auth_code = value
  18. @property
  19. def dept_id(self):
  20. return self._dept_id
  21. @dept_id.setter
  22. def dept_id(self, value):
  23. self._dept_id = value
  24. @property
  25. def dept_name(self):
  26. return self._dept_name
  27. @dept_name.setter
  28. def dept_name(self, value):
  29. self._dept_name = value
  30. @property
  31. def label_code(self):
  32. return self._label_code
  33. @label_code.setter
  34. def label_code(self, value):
  35. self._label_code = value
  36. @property
  37. def parent_dept_id(self):
  38. return self._parent_dept_id
  39. @parent_dept_id.setter
  40. def parent_dept_id(self, value):
  41. self._parent_dept_id = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.auth_code:
  45. if hasattr(self.auth_code, 'to_alipay_dict'):
  46. params['auth_code'] = self.auth_code.to_alipay_dict()
  47. else:
  48. params['auth_code'] = self.auth_code
  49. if self.dept_id:
  50. if hasattr(self.dept_id, 'to_alipay_dict'):
  51. params['dept_id'] = self.dept_id.to_alipay_dict()
  52. else:
  53. params['dept_id'] = self.dept_id
  54. if self.dept_name:
  55. if hasattr(self.dept_name, 'to_alipay_dict'):
  56. params['dept_name'] = self.dept_name.to_alipay_dict()
  57. else:
  58. params['dept_name'] = self.dept_name
  59. if self.label_code:
  60. if hasattr(self.label_code, 'to_alipay_dict'):
  61. params['label_code'] = self.label_code.to_alipay_dict()
  62. else:
  63. params['label_code'] = self.label_code
  64. if self.parent_dept_id:
  65. if hasattr(self.parent_dept_id, 'to_alipay_dict'):
  66. params['parent_dept_id'] = self.parent_dept_id.to_alipay_dict()
  67. else:
  68. params['parent_dept_id'] = self.parent_dept_id
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = KoubeiMerchantDepartmentModifyModel()
  75. if 'auth_code' in d:
  76. o.auth_code = d['auth_code']
  77. if 'dept_id' in d:
  78. o.dept_id = d['dept_id']
  79. if 'dept_name' in d:
  80. o.dept_name = d['dept_name']
  81. if 'label_code' in d:
  82. o.label_code = d['label_code']
  83. if 'parent_dept_id' in d:
  84. o.parent_dept_id = d['parent_dept_id']
  85. return o