Install the package with:
# using npm
npm install avatax
# using yarn
yarn add avatax
Please see the GitHub releases for in-depth release notes.
As of version 22.11.0, TypeScript support is included in the SDK. Models and enums are included in addition to typing for all of the API methods and parameters. The team welcomes any feedback on this feature.
Models and enums can be imported into TypeScript projects as follows:
import { AddressResolutionModel } from 'avatax/models';
import { AddressCategoryId } from 'avatax/enums';
Running integration tests will hit the deployed lower environment.
Test credentials are resolved in the following order:
The following environment variables will get loaded as test credentials:
SANDBOX_USERNAME="your-username"
SANDBOX_PASSWORD="your-password"
You can also add a local credentials file to the the path "<project_root>/local_creds.json". This file will be ignored with .gitignore.
{
"username": "your-username",
"password": "your-password"
}
The mocked values are used for unit tests via 'nock'.
The test credentials helper can be found here.
# assuming a tag of v17.5.2 and a remote of 'upstream'
git push upstream v17.5.2