Class: Toke::GetAccessTokenParams
- Inherits:
-
Object
- Object
- Toke::GetAccessTokenParams
- Defined in:
- lib/toke/params/get_access_token_params.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#refresh_token ⇒ Object
readonly
Returns the value of attribute refresh_token.
Instance Method Summary collapse
-
#initialize(params) ⇒ GetAccessTokenParams
constructor
A new instance of GetAccessTokenParams.
- #valid? ⇒ Boolean
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_id ⇒ Object (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_secret ⇒ Object (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_token ⇒ Object (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
13 14 15 |
# File 'lib/toke/params/get_access_token_params.rb', line 13 def valid? !!(client_id && client_secret && refresh_token) end |