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

Library is not using latest API base version / minor version #122

Closed ybakos closed 1 year ago

ybakos commented 1 year ago

According to the QBO API documentation, when we do not specify a minor version, the API will behave according to the current "base version" which is the latest minor version. That is 65, at the time of this writing.

However, when QboApi.minor_version is false, I am not observing behavior present in the latest minor version on the QBO side.

For example, when I query :item, I expect to see Sku in the response payload. But it is not present. If I specify the QboApi.minor_version as 4, when the Item.Sku property was introduced, then I do see Sku in the response.

Similarly, when I specify the QboApi.minor_version as 65, I also see Sku in the response.

Shouldn't the qbo_api gem be using the most recent minor version by default? It is not. What is the default minor version?

Can we document what this default minor version is in the README?

ybakos commented 1 year ago

Or is the QBO default base version actually minor version 1 ?

Or is the qbo_api default minor_version 1?

ybakos commented 1 year ago

@minimul Is the default minor version actually minor version 1 ?

minimul commented 1 year ago

A request does not send the minorversion param by default, so yes, that would be minorversion=1? I think.

According to the QBO API documentation, when we do not specify a minor version, the API will behave according to the current "base version" which is the latest minor version.

Can you provide a reference link to this statement?

ybakos commented 1 year ago

Thanks @minimul .

Here we see:

  1. If you don’t use a minor version, you’ll use the base versions of APIs by default. The base version has no minor version changes applied to it.
  2. If you’re using an SDK to develop your app, you’re automatically using the latest version of the API schema.
  3. If you’re not developing with an SDK, you can manually set the minor version in your code.

And "Unless you’re referencing a specific minor version, you’ll use the latest version associated with the SDK"

Perhaps I had considered qbo_api to "be an SDK" and therefore assumed that the default would be minor version 65 (the latest at the time of this writing). In addition, I may have confused what QBO means by "base version" vs latest minor version. Item 1) above seems to state that the base version by default will be minor version 1 (or really "version N.0").

I had been assuming that qbo_api would be using the latest API version, matching the latest API specs in the QBO documentation. A statement in the README would be valuable.

Shall I send a PR for this addition to the README?

minimul commented 1 year ago

Yes, qbo_api is not considered an SDK, only the official Intuit libraries are (I think).

A statement in the README would be valuable.

Yes, I agree, please do send in a PR.

ybakos commented 1 year ago

Thanks @minimul for a great API client.