This code sample shows how to set an address as an input to receive the details such as latitude and longitude, jurisdiction type, or district.
TaxRateLookupConfiguration configuration
= new TaxRateLookupConfigurationBuilder().withData(dataSourceList)
.withResources(Paths.get("/resources/taxing-resources"))
.build();
TaxRateLookup lookup
= new TaxRateLookupBuilder().withConfiguration(configuration)
.register(new SDKTaxLookupFactory())
.build();
OutputPreference outputPreference = new OutputPreference();
outputPreference.setOutputCasing("upper");
outputPreference.setTaxDistrict("Spd");
Preferences preferences = new PreferencesBuilder().withOutputPreferences(outputPreference)
.build();
TaxRateAddress address = new TaxRateAddress();
address.setAddressLines(Arrays.asList("25 Boyce Ln,Fort Rucker, AL 36362"));
TaxResponse response = lookup.lookupByAddress(address, preferences);
try {
lookup.close();
} catch (Exception e) {
e.printStackTrace();
}