Class: Quickbooks::Service::Responses::OAuthHttpResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/quickbooks/service/responses/oauth_http_response.rb

Overview

This class just proxies and returns a wrapped response so that callers can invoke a common interface

Direct Known Subclasses

OAuth1HttpResponse

Class Method Summary collapse

Class Method Details

.wrap(response) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/quickbooks/service/responses/oauth_http_response.rb', line 9

def self.wrap(response)
  if response.is_a?(OAuth2::Response)
    Quickbooks::Service::Responses::OAuth2HttpResponse.new(response)
  else
    Quickbooks::Service::Responses::OAuth1HttpResponse.new(response)
  end
end