ActiveTax
A Ruby gem for retrieving local sales tax rates from various government APIs. Currently only supports Washington State sales tax, but feel free to write your own state's implementations and do pull requests.
Installation
Add this line to your application's Gemfile:
gem 'active_tax', '~> 1.1.0'
Usage
tax = ActiveTax::Tax.new({
address: "6500 Linderson Way",
city: "Tumwater",
state: "WA", # must be two-letter state abbreviation
zip: "98501",
})
# tax is an object with #rate, #location_code, and #result_code properties.
puts tax.rate #=> 0.087
puts tax.location_code #=> "3406"
puts tax.result_code #=> "0"
Contributing
Contributions are very welcome!
- Fork it
- Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
MIT