taxjar / taxjar-node

Sales Tax API Client for Node
https://developers.taxjar.com/api/reference/?javascript
MIT License
54 stars 24 forks source link

Incorrect type for TaxForOrderRes.tax.jurisdictions #58

Closed brannondorsey closed 3 years ago

brannondorsey commented 3 years ago

According to the Taxjar API docs, the POST /v2/taxes endpoint returns a tax object with jurisdictions property which contains an object with key, value pairs.

Screen Shot 2021-01-25 at 2 26 22 PM Screen Shot 2021-01-25 at 2 26 28 PM

However, the TaxForOrderRes.tax.jurisdictions type definition in this module contradicts the API docs (and the live results in my experience) by declaring this value contains an array of jurisdiction objects.

Screen Shot 2021-01-25 at 2 30 52 PM

Is this type definition wrong? Should the [] at the end of the type deceleration by omitted?

fastdivision commented 3 years ago

@brannondorsey Good catch, this should be an object and not an array. Removed [].