public class DefaultTaxRateLookup extends java.lang.Object implements TaxRateLookup
TaxRateLookup| Constructor and Description |
|---|
DefaultTaxRateLookup(java.util.List<TaxRateLookupFactory> addressFactories,
TaxRateLookupConfiguration configuration)
Constructor
|
DefaultTaxRateLookup(java.util.List<TaxRateLookupFactory> taxRateLookupFactories,
TaxRateLookupConfiguration configuration,
boolean onlyRemote)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes
TaxRateLookup |
TaxResponse |
lookupByAddress(TaxRateAddress address,
Preferences preferences)
Performs lookup by address
|
TaxResponse |
lookupByLocation(Location location,
Preferences preferences)
Performs lookup by location i.e.
|
public DefaultTaxRateLookup(java.util.List<TaxRateLookupFactory> taxRateLookupFactories, TaxRateLookupConfiguration configuration, boolean onlyRemote) throws TaxRateLookupException
taxRateLookupFactories - list of TaxRateLookupFactoryconfiguration - TaxRateLookupConfigurationonlyRemote - true if it is only remote or false otherwiseTaxRateLookupException - exception thrown when it fails constructingpublic DefaultTaxRateLookup(java.util.List<TaxRateLookupFactory> addressFactories, TaxRateLookupConfiguration configuration) throws TaxRateLookupException
addressFactories - list of TaxRateLookupFactoryconfiguration - TaxRateLookupConfiguration to useTaxRateLookupException - exception thrown when it fails constructingpublic 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