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