Project

active_tax

0.01
No commit activity in last 3 years
No release in over 3 years
A Ruby gem for retrieving local sales tax rates from various government APIs. Currently only supports Washington State tax, but feel free to submit pull requests.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

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!

  1. Fork it
  2. Commit your changes (git commit -am 'Added some feature')
  3. Push to the branch (git push origin my-new-feature)
  4. Create new Pull Request

License

MIT