Class: Quickbooks::Service::Responses::OAuth2HttpResponse
- Inherits:
-
Object
- Object
- Quickbooks::Service::Responses::OAuth2HttpResponse
- Includes:
- Methods
- Defined in:
- lib/quickbooks/service/responses/oauth2_http_response.rb
Instance Attribute Summary collapse
-
#real_response ⇒ Object
Returns the value of attribute real_response.
Instance Method Summary collapse
- #body ⇒ Object
- #code ⇒ Object
- #headers ⇒ Object
-
#initialize(response) ⇒ OAuth2HttpResponse
constructor
response : Faraday response.
- #plain_body ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(response) ⇒ OAuth2HttpResponse
response : Faraday response
11 12 13 |
# File 'lib/quickbooks/service/responses/oauth2_http_response.rb', line 11 def initialize(response) @real_response = response end |
Instance Attribute Details
#real_response ⇒ Object
Returns the value of attribute real_response.
8 9 10 |
# File 'lib/quickbooks/service/responses/oauth2_http_response.rb', line 8 def real_response @real_response end |
Instance Method Details
#body ⇒ Object
19 20 21 |
# File 'lib/quickbooks/service/responses/oauth2_http_response.rb', line 19 def body @real_response.body end |
#code ⇒ Object
27 28 29 |
# File 'lib/quickbooks/service/responses/oauth2_http_response.rb', line 27 def code @real_response.status.to_i end |
#headers ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/quickbooks/service/responses/oauth2_http_response.rb', line 31 def headers if @real_response.respond_to?(:headers) @real_response.headers else nil end end |
#plain_body ⇒ Object
23 24 25 |
# File 'lib/quickbooks/service/responses/oauth2_http_response.rb', line 23 def plain_body body end |
#version ⇒ Object
15 16 17 |
# File 'lib/quickbooks/service/responses/oauth2_http_response.rb', line 15 def version 2 end |