Class: SchwabRb::Auth::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/schwab_rb/auth/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token: nil, expires_in: nil, token_type: "Bearer", scope: nil, refresh_token: nil, id_token: nil, expires_at: nil) ⇒ Token

Returns a new instance of Token.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/schwab_rb/auth/token.rb', line 6

def initialize(
  token: nil,
  expires_in: nil,
  token_type: "Bearer",
  scope: nil,
  refresh_token: nil,
  id_token: nil,
  expires_at: nil
)
  @token = token
  @expires_in = expires_in
  @token_type = token_type
  @scope = scope
  @refresh_token = refresh_token
  @id_token = id_token
  @expires_at = expires_at
end

Instance Attribute Details

#expires_atObject (readonly)

Returns the value of attribute expires_at.



24
25
26
# File 'lib/schwab_rb/auth/token.rb', line 24

def expires_at
  @expires_at
end

#expires_inObject (readonly)

Returns the value of attribute expires_in.



24
25
26
# File 'lib/schwab_rb/auth/token.rb', line 24

def expires_in
  @expires_in
end

#id_tokenObject (readonly)

Returns the value of attribute id_token.



24
25
26
# File 'lib/schwab_rb/auth/token.rb', line 24

def id_token
  @id_token
end

#refresh_tokenObject (readonly)

Returns the value of attribute refresh_token.



24
25
26
# File 'lib/schwab_rb/auth/token.rb', line 24

def refresh_token
  @refresh_token
end

#scopeObject (readonly)

Returns the value of attribute scope.



24
25
26
# File 'lib/schwab_rb/auth/token.rb', line 24

def scope
  @scope
end

#tokenObject (readonly)

Returns the value of attribute token.



24
25
26
# File 'lib/schwab_rb/auth/token.rb', line 24

def token
  @token
end

#token_typeObject (readonly)

Returns the value of attribute token_type.



24
25
26
# File 'lib/schwab_rb/auth/token.rb', line 24

def token_type
  @token_type
end