KoubeiMerchantOperatorUnfreezeModel.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiMerchantOperatorUnfreezeModel(object):
  6. def __init__(self):
  7. self._auth_code = None
  8. self._operator_id = None
  9. @property
  10. def auth_code(self):
  11. return self._auth_code
  12. @auth_code.setter
  13. def auth_code(self, value):
  14. self._auth_code = value
  15. @property
  16. def operator_id(self):
  17. return self._operator_id
  18. @operator_id.setter
  19. def operator_id(self, value):
  20. self._operator_id = value
  21. def to_alipay_dict(self):
  22. params = dict()
  23. if self.auth_code:
  24. if hasattr(self.auth_code, 'to_alipay_dict'):
  25. params['auth_code'] = self.auth_code.to_alipay_dict()
  26. else:
  27. params['auth_code'] = self.auth_code
  28. if self.operator_id:
  29. if hasattr(self.operator_id, 'to_alipay_dict'):
  30. params['operator_id'] = self.operator_id.to_alipay_dict()
  31. else:
  32. params['operator_id'] = self.operator_id
  33. return params
  34. @staticmethod
  35. def from_alipay_dict(d):
  36. if not d:
  37. return None
  38. o = KoubeiMerchantOperatorUnfreezeModel()
  39. if 'auth_code' in d:
  40. o.auth_code = d['auth_code']
  41. if 'operator_id' in d:
  42. o.operator_id = d['operator_id']
  43. return o