public class PooledTaxRateLookup extends java.lang.Object implements TaxRateLookup
TaxRateLookup| Constructor and Description |
|---|
PooledTaxRateLookup(PoolConfiguration poolConfiguration,
TaxRateLookupConfiguration configuration,
TaxRateLookupFactory addressFactory)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the pool of
TaxRateLookup |
TaxResponse |
lookupByAddress(TaxRateAddress address,
Preferences preferences)
Performs lookup by address
|
TaxResponse |
lookupByLocation(Location location,
Preferences preferences)
Performs lookup by location i.e.
|
public PooledTaxRateLookup(PoolConfiguration poolConfiguration, TaxRateLookupConfiguration configuration, TaxRateLookupFactory addressFactory)
poolConfiguration - PoolConfiguration to useconfiguration - TaxRateLookupConfiguration to useaddressFactory - TaxRateLookupFactory to usepublic TaxResponse lookupByAddress(TaxRateAddress address, Preferences preferences) throws TaxRateLookupException
lookupByAddress in interface TaxRateLookupaddress - address to use for lookuppreferences - Preferences to useTaxResponseTaxRateLookupException - exception thrown when it fails looking uppublic TaxResponse lookupByLocation(Location location, Preferences preferences) throws TaxRateLookupException
lookupByLocation in interface TaxRateLookuplocation - location o use for lookuppreferences - Preferences to useTaxResponseTaxRateLookupException - exception thrown when it fails looking uppublic void close()
throws java.lang.Exception
TaxRateLookupclose in interface java.lang.AutoCloseablejava.lang.Exception - exception thrown when it fails closing