KoubeiMemberDataOauthQueryModel.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiMemberDataOauthQueryModel(object):
  6. def __init__(self):
  7. self._auth_type = None
  8. self._code = None
  9. self._ext_info = None
  10. @property
  11. def auth_type(self):
  12. return self._auth_type
  13. @auth_type.setter
  14. def auth_type(self, value):
  15. self._auth_type = value
  16. @property
  17. def code(self):
  18. return self._code
  19. @code.setter
  20. def code(self, value):
  21. self._code = value
  22. @property
  23. def ext_info(self):
  24. return self._ext_info
  25. @ext_info.setter
  26. def ext_info(self, value):
  27. self._ext_info = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.auth_type:
  31. if hasattr(self.auth_type, 'to_alipay_dict'):
  32. params['auth_type'] = self.auth_type.to_alipay_dict()
  33. else:
  34. params['auth_type'] = self.auth_type
  35. if self.code:
  36. if hasattr(self.code, 'to_alipay_dict'):
  37. params['code'] = self.code.to_alipay_dict()
  38. else:
  39. params['code'] = self.code
  40. if self.ext_info:
  41. if hasattr(self.ext_info, 'to_alipay_dict'):
  42. params['ext_info'] = self.ext_info.to_alipay_dict()
  43. else:
  44. params['ext_info'] = self.ext_info
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = KoubeiMemberDataOauthQueryModel()
  51. if 'auth_type' in d:
  52. o.auth_type = d['auth_type']
  53. if 'code' in d:
  54. o.code = d['code']
  55. if 'ext_info' in d:
  56. o.ext_info = d['ext_info']
  57. return o