AlipayOpenAuthTokenAppQueryResponse.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipayOpenAuthTokenAppQueryResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipayOpenAuthTokenAppQueryResponse, self).__init__()
  8. self._auth_app_id = None
  9. self._auth_end = None
  10. self._auth_methods = None
  11. self._auth_start = None
  12. self._expires_in = None
  13. self._status = None
  14. self._user_id = None
  15. @property
  16. def auth_app_id(self):
  17. return self._auth_app_id
  18. @auth_app_id.setter
  19. def auth_app_id(self, value):
  20. self._auth_app_id = value
  21. @property
  22. def auth_end(self):
  23. return self._auth_end
  24. @auth_end.setter
  25. def auth_end(self, value):
  26. self._auth_end = value
  27. @property
  28. def auth_methods(self):
  29. return self._auth_methods
  30. @auth_methods.setter
  31. def auth_methods(self, value):
  32. if isinstance(value, list):
  33. self._auth_methods = list()
  34. for i in value:
  35. self._auth_methods.append(i)
  36. @property
  37. def auth_start(self):
  38. return self._auth_start
  39. @auth_start.setter
  40. def auth_start(self, value):
  41. self._auth_start = value
  42. @property
  43. def expires_in(self):
  44. return self._expires_in
  45. @expires_in.setter
  46. def expires_in(self, value):
  47. self._expires_in = value
  48. @property
  49. def status(self):
  50. return self._status
  51. @status.setter
  52. def status(self, value):
  53. self._status = value
  54. @property
  55. def user_id(self):
  56. return self._user_id
  57. @user_id.setter
  58. def user_id(self, value):
  59. self._user_id = value
  60. def parse_response_content(self, response_content):
  61. response = super(AlipayOpenAuthTokenAppQueryResponse, self).parse_response_content(response_content)
  62. if 'auth_app_id' in response:
  63. self.auth_app_id = response['auth_app_id']
  64. if 'auth_end' in response:
  65. self.auth_end = response['auth_end']
  66. if 'auth_methods' in response:
  67. self.auth_methods = response['auth_methods']
  68. if 'auth_start' in response:
  69. self.auth_start = response['auth_start']
  70. if 'expires_in' in response:
  71. self.expires_in = response['expires_in']
  72. if 'status' in response:
  73. self.status = response['status']
  74. if 'user_id' in response:
  75. self.user_id = response['user_id']