Closed varun43in closed 4 years ago
IntuitOAuth::Client
is your app? Thats nothing from the gem. Can you post stacktrace?
I'm used this gem as recommended by QBO article: https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/oauth-2.0#download-the-oauth-library
gem 'intuit-oauth'
Stack trace:
NoMethodError (undefined method `connection=' for #<IntuitOAuth::Client:0x007ff4c86c2ea0>):
app/controllers/quickbooks_controller.rb:432:in `test_api_3'
NoMethodError (undefined method `connection=' for #<IntuitOAuth::Client:0x007ff4c86c2ea0>):
app/controllers/quickbooks_controller.rb:432:in `test_api_3'
Rendered /Users/varunaggarwal/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_source.erb (6.9ms)
Rendered /Users/varunaggarwal/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_source.erb (6.9ms)
Rendered /Users/varunaggarwal/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (4.5ms)
Rendered /Users/varunaggarwal/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (4.5ms)
Rendered /Users/varunaggarwal/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.5ms)
Rendered /Users/varunaggarwal/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.5ms)
Rendered /Users/varunaggarwal/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (217.9ms)
Rendered /Users/varunaggarwal/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (217.9ms)
If you're using this gem (quickbooks-ruby) then you don't need that gem. Well, perhaps you could've used it just for migrating tokens, but once you've done that, it shouldn't be necessary
So after i've migrated the tokens, I should remove the intuit-oauth gem And then my current code, which is using only the quickbooks-ruby gem, will work using the new oAuth 2 tokens?
You are right. It's working for me now. Thanks man!!
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 #
Please see my code below:
I'm using the latest gem version
gem "quickbooks-ruby", '1.0.1'
Thanks for your help!