Class: Quickbooks::Service::Responses::OAuth1HttpResponse

Inherits:
OAuthHttpResponse show all
Defined in:
lib/quickbooks/service/responses/oauth1_http_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OAuthHttpResponse

wrap

Constructor Details

#initialize(response) ⇒ OAuth1HttpResponse

net/http response



10
11
12
# File 'lib/quickbooks/service/responses/oauth1_http_response.rb', line 10

def initialize(response)
  @real_response = response
end

Instance Attribute Details

#real_responseObject

Returns the value of attribute real_response.



7
8
9
# File 'lib/quickbooks/service/responses/oauth1_http_response.rb', line 7

def real_response
  @real_response
end

Instance Method Details

#codeObject



18
19
20
# File 'lib/quickbooks/service/responses/oauth1_http_response.rb', line 18

def code
  @real_response.code.to_i
end

#headersObject



30
31
32
33
34
35
36
# File 'lib/quickbooks/service/responses/oauth1_http_response.rb', line 30

def headers
  if @real_response.respond_to?(:headers)
    @real_response.headers
  else
    nil
  end
end

#plain_bodyObject



22
23
24
25
26
27
28
# File 'lib/quickbooks/service/responses/oauth1_http_response.rb', line 22

def plain_body
  if @real_response.respond_to?(:plain_body)
    @real_response.plain_body
  else
    nil
  end
end

#versionObject



14
15
16
# File 'lib/quickbooks/service/responses/oauth1_http_response.rb', line 14

def version
  1
end