This is a Ruby client library for the AvaTax REST API methods: tax/get POST, tax/get GET, tax/cancel POST, and address/validate GET.
For more information on the use of these methods and the AvaTax product, please visit our developer site or homepage
avatax
gem to your Gemfile with gem 'avatax'
bundle install
to retrieve avatax
and all its dependenciescredentials.yml.example
), or$ AVATAX_ACCOUNT_NUMBER=1234567890 AVATAX_LICENSE_KEY=A1B2C3D4E5F6G7H8 AVATAX_SERVICE_URL=https://development.avalara.net bundle exec ruby examples/PingTest.rb
AvaTax.configure_from 'credentials.yml.example'
AvaTax.configure do
account_number '1234567890'
license_key 'A1B2C3D4E5F6G7H8'
service_url 'https://development.avalara.net'
end
Filename | Description |
---|---|
CancelTaxTest.rb | Demonstrates AvaTax::TaxService.cancel used to void a document |
EstimateTaxTest.rb | Demonstrates the AvaTax::TaxService.estimate method used for product- and line- indifferent tax estimates. |
GetTaxTest.rb | Demonstrates the AvaTax::TaxService.get method used for product- and line- specific calculation. NOTE: This will generate a new transaction/document each time. |
PingTest.rb | Uses a hardcoded AvaTax::TaxService.estimate call to test connectivity and credential information. |
ValidateTest.rb | Demonstrates the AvaTax::AddressService.validate method to normalize an address. |