Skip to content

TaxQuery

For some (especially local) tax jurisdictions, the TaxNamesForZip method does not provide enough granularity to precisely identify tax names. For such situations, this method calls the TaxQuery Docker container, which returns a comma-delimited string just like that of TaxNamesForZip, but with greater precision.

Syntax

value = object. ( WorkAddress, HomeAddress, NexusStates )

  • object - A TaxControl object.
  • value - A string result.
  • WorkAddress - A string expression indicating the employee's workplace address.
  • HomeAddress - A string expression indicating the employee's residence address.
  • NexusStates - A string expression indicating the states where the employer has nexus (loosely, a physical presence, such as office space). This should be in the form of a space-delimited list of 2-letter USPS state abbreviations. For example, 'CA NV OR WA'. Default value is the workplace state.

Note: This method requires a running instance of the TaxQuery Docker container. See the TaxQuery page on the Docker hub for more information.

On a machine with Docker installed, enter the following:

Terminal window
docker run -p 8443:8443 calibertechnology/taxquery

Now call the TaxQuery method. For example, if the container is running on the same machine as your application:

// using TaxControls;
CTaxControl tc = new CTaxControl();
String taxes = tc.TaxQuery(
"101 1st Ave, PA 15001",
"102 2nd Ave, PA 15003",
"https://localhost:8443",
"NJ MD PA");
//import com.boondocks.taxcontrols.*;
TaxControl tc = new TaxControl();
String taxes = tc.TaxQuery(
"101 1st Ave, PA 15001",
"102 2nd Ave, PA 15003",
"https://localhost:8443",
"NJ MD PA");