AlipayAppTokenGetResponse.py 1.0 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 AlipayAppTokenGetResponse(AlipayResponse):
  6. def __init__(self):
  7. super(AlipayAppTokenGetResponse, self).__init__()
  8. self._app_access_token = None
  9. self._expires_in = None
  10. @property
  11. def app_access_token(self):
  12. return self._app_access_token
  13. @app_access_token.setter
  14. def app_access_token(self, value):
  15. self._app_access_token = value
  16. @property
  17. def expires_in(self):
  18. return self._expires_in
  19. @expires_in.setter
  20. def expires_in(self, value):
  21. self._expires_in = value
  22. def parse_response_content(self, response_content):
  23. response = super(AlipayAppTokenGetResponse, self).parse_response_content(response_content)
  24. if 'app_access_token' in response:
  25. self.app_access_token = response['app_access_token']
  26. if 'expires_in' in response:
  27. self.expires_in = response['expires_in']