Project

sales_tax

0.0
No commit activity in last 3 years
No release in over 3 years
Look up sales tax rates by zip code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.4.2
~> 3.4.0
~> 0.15.9
 Project Readme

sales_tax

Interface to the public Avalara TaxRates database for sales taxes in the United States of America. Easily look up combined, state, and county rates by zip code.

Notice: This is a development tool only; it is not intended for use as tax compliance software and should not be relied upon for financial decisions. As detailed in the LICENSE, use of this software is at your own risk. The author(s) disclaim all warranties and by your use of this software you agree to waive the author(s) of any and all liabilities. You should consult with a tax professional before collecting or paying taxes.

Build Status

Installation

Install via Rubygems or add the dependency via Bundler:

# Rubygems directly
gem install sales_tax

# In your Gemfile
gem 'sales_tax'

After installation you will need to download the publicly available CSV data from Avalara's taxrates.com:

# Ensure the gem is loaded when `rake` is called (this is done automatically
# if you're using Rails and the gem is in your Gemfile)
bundle exec rake sales_tax:download

Basic usage

You can look up the tax rates via zip code:

SalesTax['94107']
# => <struct SalesTax::Rate region_name="SAN FRANCISCO COUNTY",
#                           region_code="AIUQ",
#                           combined_rate=0.0875,
#                           state_rate=0.065,
#                           county_rate=0.01,
#                           city_rate=0.0,
#                           special_rate=0.0125>

License

Licensed under the MIT license. See LICENSE for details.