Package com.broadleafcommerce.tax.simple
Class SimpleTaxConfig
- java.lang.Object
-
- com.broadleafcommerce.tax.simple.SimpleTaxConfig
-
- All Implemented Interfaces:
Serializable
public class SimpleTaxConfig extends Object implements Serializable
Tax configuration read from a file viaSimpleTaxProvider#getTaxInfo(BigDecimal, TaxItem).- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleTaxConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)SimpleTaxRecordgetDefaultRate()The default rate if no matching ingetTaxTables()found.Map<String,List<SimpleTaxRecord>>getTaxTables()Map of a tax code to a list of tax records for that jurisdiction.inthashCode()booleanisSampleConfig()Whether this configuration is the out-of-the-box sample.voidsetDefaultRate(SimpleTaxRecord defaultRate)The default rate if no matching ingetTaxTables()found.voidsetSampleConfig(boolean sampleConfig)Whether this configuration is the out-of-the-box sample.voidsetTaxTables(Map<String,List<SimpleTaxRecord>> taxTables)Map of a tax code to a list of tax records for that jurisdiction.StringtoString()
-
-
-
Method Detail
-
isSampleConfig
public boolean isSampleConfig()
Whether this configuration is the out-of-the-box sample. If true, a warning will be logged.- Returns:
- Whether this configuration is the out-of-the-box sample.
-
getDefaultRate
public SimpleTaxRecord getDefaultRate()
The default rate if no matching ingetTaxTables()found.- Returns:
- The default rate if no matching in
getTaxTables()found.
-
getTaxTables
public Map<String,List<SimpleTaxRecord>> getTaxTables()
Map of a tax code to a list of tax records for that jurisdiction. TheSimpleTaxProvidersupports alpha-2 country codes as tax codes.- Returns:
- Map of tax code to a list of tax records for that country.
-
setSampleConfig
public void setSampleConfig(boolean sampleConfig)
Whether this configuration is the out-of-the-box sample. If true, a warning will be logged.- Parameters:
sampleConfig- Whether this configuration is the out-of-the-box sample.
-
setDefaultRate
public void setDefaultRate(SimpleTaxRecord defaultRate)
The default rate if no matching ingetTaxTables()found.- Parameters:
defaultRate- The default rate if no matching ingetTaxTables()found.
-
setTaxTables
public void setTaxTables(Map<String,List<SimpleTaxRecord>> taxTables)
Map of a tax code to a list of tax records for that jurisdiction. TheSimpleTaxProvidersupports alpha-2 country codes as tax codes.- Parameters:
taxTables- Map of tax code to a list of tax records for that country.
-
canEqual
protected boolean canEqual(Object other)
-
-