Class: IntuitOAuth::ClientResponse
- Inherits:
-
Object
- Object
- IntuitOAuth::ClientResponse
- Defined in:
- lib/intuit-oauth/response.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#expires_in ⇒ Object
readonly
Returns the value of attribute expires_in.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#id_token ⇒ Object
readonly
Returns the value of attribute id_token.
-
#realm_id ⇒ Object
readonly
Returns the value of attribute realm_id.
-
#refresh_token ⇒ Object
readonly
Returns the value of attribute refresh_token.
-
#x_refresh_token_expires_in ⇒ Object
readonly
Returns the value of attribute x_refresh_token_expires_in.
Instance Method Summary collapse
-
#initialize(response) ⇒ ClientResponse
constructor
A new instance of ClientResponse.
Constructor Details
#initialize(response) ⇒ ClientResponse
Returns a new instance of ClientResponse.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/intuit-oauth/response.rb', line 20 def initialize(response) @access_token = response['access_token'] @expires_in = response['expires_in'] @refresh_token = response['refresh_token'] @x_refresh_token_expires_in = response['x_refresh_token_expires_in'] if response['id_token'] @id_token = response['id_token'] end if response['realmId'] @realm_id = response['realmId'] end @headers = response.headers @body = response @code = response.code end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def access_token @access_token end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def code @code end |
#expires_in ⇒ Object (readonly)
Returns the value of attribute expires_in.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def expires_in @expires_in end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def headers @headers end |
#id_token ⇒ Object (readonly)
Returns the value of attribute id_token.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def id_token @id_token end |
#realm_id ⇒ Object (readonly)
Returns the value of attribute realm_id.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def realm_id @realm_id end |
#refresh_token ⇒ Object (readonly)
Returns the value of attribute refresh_token.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def refresh_token @refresh_token end |
#x_refresh_token_expires_in ⇒ Object (readonly)
Returns the value of attribute x_refresh_token_expires_in.
17 18 19 |
# File 'lib/intuit-oauth/response.rb', line 17 def x_refresh_token_expires_in @x_refresh_token_expires_in end |