Class: Toke::GetAccessTokenParams

Inherits:
Object
  • Object
show all
Defined in:
lib/toke/params/get_access_token_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ GetAccessTokenParams

Returns a new instance of GetAccessTokenParams.



5
6
7
8
9
10
11
# File 'lib/toke/params/get_access_token_params.rb', line 5

def initialize(params)
  @params = params

  @client_id     = normalize(:client_id)
  @client_secret = normalize(:client_secret)
  @refresh_token = normalize(:refresh_token)
end

Instance Attribute Details

#client_idObject (readonly)

Returns the value of attribute client_id.



3
4
5
# File 'lib/toke/params/get_access_token_params.rb', line 3

def client_id
  @client_id
end

#client_secretObject (readonly)

Returns the value of attribute client_secret.



3
4
5
# File 'lib/toke/params/get_access_token_params.rb', line 3

def client_secret
  @client_secret
end

#refresh_tokenObject (readonly)

Returns the value of attribute refresh_token.



3
4
5
# File 'lib/toke/params/get_access_token_params.rb', line 3

def refresh_token
  @refresh_token
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/toke/params/get_access_token_params.rb', line 13

def valid?
  !!(client_id && client_secret && refresh_token)
end