AlipayOpenAuthAppApplyResponse.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. class AlipayOpenAuthAppApplyResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipayOpenAuthAppApplyResponse, self).__init__()
  8. self._app_auth_token = None
  9. self._app_refresh_token = None
  10. @property
  11. def app_auth_token(self):
  12. return self._app_auth_token
  13. @app_auth_token.setter
  14. def app_auth_token(self, value):
  15. self._app_auth_token = value
  16. @property
  17. def app_refresh_token(self):
  18. return self._app_refresh_token
  19. @app_refresh_token.setter
  20. def app_refresh_token(self, value):
  21. self._app_refresh_token = value
  22. def parse_response_content(self, response_content):
  23. response = super(AlipayOpenAuthAppApplyResponse, self).parse_response_content(response_content)
  24. if 'app_auth_token' in response:
  25. self.app_auth_token = response['app_auth_token']
  26. if 'app_refresh_token' in response:
  27. self.app_refresh_token = response['app_refresh_token']