Class: RubyLokaliseApi::OAuth2::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_lokalise_api/oauth2/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_params) ⇒ Token

Returns a new instance of Token.



8
9
10
11
12
13
# File 'lib/ruby_lokalise_api/oauth2/token.rb', line 8

def initialize(raw_params)
  @access_token = raw_params['access_token']
  @refresh_token = raw_params['refresh_token']
  @expires_in = raw_params['expires_in']
  @token_type = raw_params['token_type']
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



6
7
8
# File 'lib/ruby_lokalise_api/oauth2/token.rb', line 6

def access_token
  @access_token
end

#expires_inObject (readonly)

Returns the value of attribute expires_in.



6
7
8
# File 'lib/ruby_lokalise_api/oauth2/token.rb', line 6

def expires_in
  @expires_in
end

#refresh_tokenObject (readonly)

Returns the value of attribute refresh_token.



6
7
8
# File 'lib/ruby_lokalise_api/oauth2/token.rb', line 6

def refresh_token
  @refresh_token
end

#token_typeObject (readonly)

Returns the value of attribute token_type.



6
7
8
# File 'lib/ruby_lokalise_api/oauth2/token.rb', line 6

def token_type
  @token_type
end