Class: SirvRestApi::TokenResponse
- Inherits:
-
Object
- Object
- SirvRestApi::TokenResponse
- Defined in:
- lib/sirv_rest_api/models.rb
Overview
Token response from authentication
Instance Attribute Summary collapse
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ TokenResponse
constructor
A new instance of TokenResponse.
Constructor Details
#initialize(data = {}) ⇒ TokenResponse
Returns a new instance of TokenResponse.
8 9 10 11 12 |
# File 'lib/sirv_rest_api/models.rb', line 8 def initialize(data = {}) @token = data["token"] @expires_in = data["expiresIn"] @scope = data["scope"] || [] end |
Instance Attribute Details
#expires_in ⇒ Object
Returns the value of attribute expires_in.
6 7 8 |
# File 'lib/sirv_rest_api/models.rb', line 6 def expires_in @expires_in end |
#scope ⇒ Object
Returns the value of attribute scope.
6 7 8 |
# File 'lib/sirv_rest_api/models.rb', line 6 def scope @scope end |
#token ⇒ Object
Returns the value of attribute token.
6 7 8 |
# File 'lib/sirv_rest_api/models.rb', line 6 def token @token end |