The Washington Sales Tax Rate Library (WSRL) source code provides a sales tax rate lookup feature using the Department of Revenue's downloadable address and rate files. Its purpose is to provide a means of looking up tax rates using our downloadable files and can be used as a starting point for adding destination-based sales tax rate lookups to your application. For web applications such as shopping carts, you will need to develop a rate lookup service or extend the library to use a disk-based indexing scheme.
Requirements
Setup
Follow these steps to add the library to your Microsoft Visual Studio solution:
- From the File menu, add the library project to your solution by choosing File->Add->Add Existing Project.
- Navigate to the directory containing the WaRateFiles library and select the project file.
- In the Solution Explorer, right click on your project and select "Add Reference".
- Click on the project tab and add the WaRateFiles project.
To use the rate lookup library in your program, add "using WaRateFiles" to the file header. The rate lookup class is constructed as follows:
RateLookup lookup = new RateLookup(addressfileName, ratefileName, zipfileName, RateLookupEngine.STANDARDIZER, useShortcutEval);
Parameters
| addressfileName |
the path and filename of the address file. |
| ratefileName |
the path and filename of the rate file. |
| zipfileName |
the path and filename of the ZIP+4 file |
| RateLookupEngine |
This enumeration has the values of SCAN, INDEX, or STANDARIZER. For SCAN and INDEX, the input address must be standardized to USPS format. |
| useShortcutEval |
If true, the STANDARIZER lookup engine will not fully evaluate an address if all of the data for a ZIP or street have the same location code. |
Download
| WaRateFileLookup |
| .zip |
Version |
Size |
Date |
|
 |
1.05
|
832k |
8/5/2011 |
The check for available updated database files is now case insensitive. |
|
 |
1.04
|
831k |
8/8/2008 |
An optimization was made with the file updates check to reduce the number of calls to the file download page. |
|
 |
1.03
|
833k |
7/31/2008 |
The service will no longer halt if there is a problem with the update thread contacting the DOR GIS data download web page. ZIP codes of the form "-3" now return invalid argument instead of throwing an exception. |
|
 |
1.02 |
853k |
7/16/2008 |
Fixes bugs related to addresses with trailing single characters, ZIP codes with spaces, and the short cut evaluation configuration settings. See the ChangeLog for details. |
|
 |
1.01 |
853k |
7/8/2008 |
Although non-standard, unencoding of plus signs "+" to spaces now works. Trailing spaces in the "addr" service URL parameter are now properly discarded. |
|
 |
1.0RC2 |
831k |
7/1/2008 |
Fixes parsing of addresses like "OLD INLAND EMPIRE HWY", updates the unit tests for quarter 3, and the test applications default to not using "shortcut" rate lookups. |
|
 |
1.0RC1 |
848k |
6/16/2008 |
The changes in this release are mostly related to the service example. Result codes are more consistent and in some cases additional debugging information is returned. Custom perfmon performance counters can be enabled in the app.config file. Server statistic such as up time and requests processed can optional be remotely accessed. |
|
 |
0.6 |
842k |
6/13/2008 |
Adds automatic download and updating of the address and rate files from our web site. |
|
 |
0.5 |
147k |
6/11/2008 |
Adds support for the PO box data, some additional logging, and some additional documentation. |
|
 |
0.4 |
149k |
6/2/2008 |
|
License
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.