AvaTax-REST-V2-JS-SDK icon indicating copy to clipboard operation
AvaTax-REST-V2-JS-SDK copied to clipboard

NexusModel[] returned by queryNexus has incorrect date types

Open scmilee opened this issue 9 months ago • 1 comments

Version: 25.1.0

When using the client with the new enableStrictTypeConversion set to true or false the date types being returned on the model are strings bu the types themselves are listed as Date objects.

Colorado nexus example:

[{"id":21400345,"companyId":838439,"country":"US","region":"CO","jurisTypeId":"STA","jurisdictionTypeId":"State","jurisCode":"08","jurisName":"COLORADO","effectiveDate":"2018-05-08","shortName":"COLORADO","signatureCode":"","stateAssignedNo":"","nexusTypeId":"SalesOrSellersUseTax","hasLocalNexus":false,"localNexusTypeId":"Selected","hasPermanentEstablishment":true,"streamlinedSalesTax":false,"isSSTActive":false,"createdDate":"2019-05-08T20:20:41.497","createdUserId":341738,"modifiedDate":"2019-05-08T20:20:41.497","modifiedUserId":341738,"taxTypeGroup":"SalesAndUse","nexusTaxTypeGroup":"SalesAndUse","isSellerImporterOfRecord":false}]"

Type: https://github.com/avadev/AvaTax-REST-V2-JS-SDK/blob/14519972424d3471ae533152e4edfa20d057683d/lib/models/NexusModel.ts#L92

Is there additional config to convert the dates to match the model types?

scmilee avatar Feb 11 '25 00:02 scmilee

@scmilee I have identified the issue and will be fixing this in the next release. Will update when its published. Nice find sir.

svc-developer avatar Apr 11 '25 19:04 svc-developer

Released in version 25.5.1

svc-developer avatar May 28 '25 14:05 svc-developer