Class: SirvRestApi::TokenResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/sirv_rest_api/models.rb

Overview

Token response from authentication

Instance Attribute Summary collapse

Instance Method Summary collapse

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_inObject

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

#scopeObject

Returns the value of attribute scope.



6
7
8
# File 'lib/sirv_rest_api/models.rb', line 6

def scope
  @scope
end

#tokenObject

Returns the value of attribute token.



6
7
8
# File 'lib/sirv_rest_api/models.rb', line 6

def token
  @token
end