Class: OmniAuth::GustoOauth2::TokenClient::TokenResult
- Inherits:
-
Object
- Object
- OmniAuth::GustoOauth2::TokenClient::TokenResult
- Defined in:
- lib/omniauth/gusto_oauth2/token_client.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#expires_in ⇒ Object
readonly
Returns the value of attribute expires_in.
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
-
#refresh_token ⇒ Object
readonly
Returns the value of attribute refresh_token.
Instance Method Summary collapse
- #failure? ⇒ Boolean
-
#initialize(success:, access_token: nil, refresh_token: nil, expires_at: nil, expires_in: nil, error: nil, raw_response: nil) ⇒ TokenResult
constructor
A new instance of TokenResult.
- #success? ⇒ Boolean
Constructor Details
#initialize(success:, access_token: nil, refresh_token: nil, expires_at: nil, expires_in: nil, error: nil, raw_response: nil) ⇒ TokenResult
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 32 def initialize(success:, access_token: nil, refresh_token: nil, expires_at: nil, expires_in: nil, error: nil, raw_response: nil) @success = success @access_token = access_token @refresh_token = refresh_token @expires_at = expires_at @expires_in = expires_in @error = error @raw_response = raw_response end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
30 31 32 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 30 def access_token @access_token end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
30 31 32 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 30 def error @error end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
30 31 32 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 30 def expires_at @expires_at end |
#expires_in ⇒ Object (readonly)
Returns the value of attribute expires_in.
30 31 32 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 30 def expires_in @expires_in end |
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
30 31 32 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 30 def raw_response @raw_response end |
#refresh_token ⇒ Object (readonly)
Returns the value of attribute refresh_token.
30 31 32 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 30 def refresh_token @refresh_token end |
Instance Method Details
#failure? ⇒ Boolean
47 48 49 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 47 def failure? !@success end |
#success? ⇒ Boolean
43 44 45 |
# File 'lib/omniauth/gusto_oauth2/token_client.rb', line 43 def success? @success end |