This is a Ruby sample demonstrating 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
Sample Files | |
---|---|
CancelTaxTest.rb | Demonstrates the CancelTax method used to void a document. |
EstimateTaxTest.rb | Demonstrates the EstimateTax method used for product- and line- indifferent tax estimates. |
GetTaxTest.rb | Demonstrates the GetTax method used for product- and line- specific calculation. |
PingTest.rb | Uses a hardcoded EstimateTax call to test connectivity and credential information. |
ValidateAddressTest.rb | Demonstrates the ValidateAddress method to normalize an address. |
Other Files | |
AvaTaxClasses/ | Contains the core classes that make the service calls. |
.gitattributes | - |
.gitignore | - |
LICENSE.md | - |
README.md | - |
- Ruby 1.9.2 or later
- Make sure to install any required gems by navigating to the root directory in the command line and running "bundle install".
- Authentication requires an valid Account Number and License Key, which should be entered in the test file (e.g. GetTaxTest.rb) you would like to run.
- If you do not have an AvaTax account, a free trial account can be acquired through our developer site