Class: OneLogin::Api::Models::OneLoginToken

Inherits:
Object
  • Object
show all
Defined in:
lib/onelogin/api/models/onelogin_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ OneLoginToken

Returns a new instance of OneLoginToken.


9
10
11
12
13
14
15
16
# File 'lib/onelogin/api/models/onelogin_token.rb', line 9

def initialize(data)
  @access_token = data['access_token'].to_s
  @refresh_token = data['refresh_token'].to_s
  @account_id = data['account_id']
  @token_type = data['token_type']
  @created_at = Time.iso8601(data['created_at'])
  @expires_in = data['expires_in']
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.


7
8
9
# File 'lib/onelogin/api/models/onelogin_token.rb', line 7

def access_token
  @access_token
end

#account_idObject

Returns the value of attribute account_id.


7
8
9
# File 'lib/onelogin/api/models/onelogin_token.rb', line 7

def 
  @account_id
end

#created_atObject

Returns the value of attribute created_at.


7
8
9
# File 'lib/onelogin/api/models/onelogin_token.rb', line 7

def created_at
  @created_at
end

#expires_inObject

Returns the value of attribute expires_in.


7
8
9
# File 'lib/onelogin/api/models/onelogin_token.rb', line 7

def expires_in
  @expires_in
end

#refresh_tokenObject

Returns the value of attribute refresh_token.


7
8
9
# File 'lib/onelogin/api/models/onelogin_token.rb', line 7

def refresh_token
  @refresh_token
end

#token_typeObject

Returns the value of attribute token_type.


7
8
9
# File 'lib/onelogin/api/models/onelogin_token.rb', line 7

def token_type
  @token_type
end