See: Description
List dataSourceList = new ArrayList<>();
dataSourceList.add(new FileDataSource(Paths.get("/Data"))); // location where software should scan for SPD data
TaxRateLookupConfiguration configuration = new TaxRateLookupConfigurationBuilder()
.withData(dataSourceList)
.withResources(Paths.get("{directory}/geotax-dist-{version}/resources")) // runtime resources location bundled in release distribution
.build();
TaxRateLookup lookup = new TaxRateLookupBuilder()
.withConfiguration(configuration)
.build();
// creating preferences
Preferences preferences = new PreferencesBuilder()
.build();
TaxRateAddress address = new TaxRateAddress();
// setting up address
address.setAddressLines(Arrays.asList("1820 PAUL THOMAS BLVD BROWNSVILLE, PA"));
TaxResponse response = lookup.lookupByAddress(address, preferences);
if(Status.OK == response.getStatus()) {
// take action on address
}
// setting up location
Location location = new Location();
location.setGeometry(new Geometry());
location.getGeometry().setLatLongAltFmt("33.805638,-116.520949");
TaxResponse responseForlocation = lookup.lookupByLocation(location, preferences);
if(Status.OK == responseForlocation.getStatus()) {
// take action on address
}