minimul / qbo_api

Ruby JSON-only client for QuickBooks Online API v3. Built on top of the Faraday gem.
MIT License
85 stars 46 forks source link

QboApi::COMSUMER_KEY and QboApi::CONSUMER_SECRET not being read as defaults #87

Closed ntippie closed 4 years ago

ntippie commented 6 years ago

The method inheritance for QboApi::Connection::OAuth1#default_attributes isn't working, since included modules don't supersede or overwrite existing methods. I have a commit coming shortly that will fix this by using prepend Connection instead of include Connection, but also want to throw it over to @bf4 in case you want to solve it in another manner.

bf4 commented 6 years ago

Looking at

https://github.com/minimul/qbo_api/blob/v1.8.3/lib/qbo_api/connection/oauth1.rb#L16-L22

and

https://github.com/minimul/qbo_api/blob/v1.8.3/lib/qbo_api/connection.rb#L132-L135

I had thought I separated the code but didn't change the behavior of default attributes. I thought I tested this too but maybe not having an oauth1 connection available is why I missed it. Can you record a failing test maybe?

until then, it's simple enough to pass in the variables yourself.

Does that mean https://github.com/minimul/qbo_api/blob/v1.8.3/example/oauth.rb#L20-L21 doesn't work for you? Again, I was unable to test it, but that's how I might debug it

minimul commented 4 years ago

No longer relevant. FYI. I just pushed a branch that among other things, rips out all OAuth1 code. Will be released soon as 2.0.0.