I am trying to use the QuickBooks API using oAuth 2.0. My app currently runs perfectly using oAuth 1.0
I am using the quickbooks-ruby gem
gem "quickbooks-ruby", '1.0.1'
I have successfully migrated a client form oAuth 1.0 to oAuth 2.0 and received the access_token and refresh_token.
Now i'm trying to get the company preferences using oAuth 2.0, and getting an error. undefined method 'connection=' for #IntuitOAuth::Client:
Please see my code below:
access_token = OAuth2::AccessToken.new($oauth2_client, access_token, :refresh_token => refresh_token)
service = Quickbooks::Service::Preferences.new
service.company_id = realm_id
service.access_token = access_token
preferences = service.query("Select * from Preferences")
Thanks for your help!
connection = ...
anywhere? the code you show doesn't look like the code the error must by pointing. – arieljuod