Nearsighted Paramecium Multiverse
    Wondering what’s next for npm?Check out our public roadmap! »

    angular-avatax

    0.0.2 • Public • Published

    Angular Avatax API

    Build Status

    Unofficial Angular service to communicate with Avalara Avatax API

    Installation

    Bower

    bower install --save angular-avatax

    npm

    npm install --save angular-avatax

    yarn

    yarn add angular-avatax

    Usage

    Include avalara into your angular module

    angular.module('app', ['avalara'])

    Configure Avatax by using AvataxProvider. You can choose to supply username/password or accountId/licenseKey as well as environment (sandbox/ production). If no environment is provided, it will default to production.

    E.g. Sandbox environment using usernam/password

    angular.module('app').config(AppConfig);
     
    /* @ngInject */
    function AppConfig(AvataxProvider) {
      AvataxProvider.init({
          username: '<YOUR USERNAME>',
          password: '<YOUR PASSWORD>',
          env: 'sandbox'
      });
    }

    E.g. Production environment using accountId/licenseKey

    angular.module('app').config(AppConfig);
     
    /* @ngInject */
    function AppConfig(AvataxProvider) {
      AvataxProvider.init({
          accountId: '<YOUR ACCOUNT ID>',
          licenseKey: '<YOUR LICENSE KEY>'
      });
    }

    Use Avatax from a controller or service.

    angular.module('app').controller('taxController', taxController);
     
    /* @ngInject */
    function taxController(Avatax) {
      Avatax.transactions
        .createTransactions({...})
        .then(function (response) {
          //do with response
        });
    }

    Keywords

    none

    Install

    npm i angular-avatax

    DownloadsWeekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • avatar