Package com.broadleafcommerce.tax.simple
Class SimpleTaxConfig
java.lang.Object
com.broadleafcommerce.tax.simple.SimpleTaxConfig
- All Implemented Interfaces:
Serializable
Tax configuration read from a file.
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The default rate if no matching ingetTaxTables()
found.Map of a tax code to a list of tax records for that jurisdiction.int
hashCode()
boolean
Whether this configuration is the out-of-the-box sample or is otherwise marked as a sample.void
setDefaultRate
(SimpleTaxRecord defaultRate) The default rate if no matching ingetTaxTables()
found.void
setSampleConfig
(boolean sampleConfig) Whether this configuration is the out-of-the-box sample or is otherwise marked as a sample.void
setTaxTables
(Map<String, List<SimpleTaxRecord>> taxTables) Map of a tax code to a list of tax records for that jurisdiction.toString()
-
Constructor Details
-
SimpleTaxConfig
public SimpleTaxConfig()
-
-
Method Details
-
isSampleConfig
public boolean isSampleConfig()Whether this configuration is the out-of-the-box sample or is otherwise marked as a sample. If true, a warning will be logged.- Returns:
- Whether this configuration is the out-of-the-box sample.
-
getDefaultRate
The default rate if no matching ingetTaxTables()
found.- Returns:
- The default rate if no matching in
getTaxTables()
found.
-
getTaxTables
Map of a tax code to a list of tax records for that jurisdiction. TheSimpleTaxProvider
supports 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 or is otherwise marked as a sample. If true, a warning will be logged.- Parameters:
sampleConfig
- Whether this configuration is the out-of-the-box sample.
-
setDefaultRate
The default rate if no matching ingetTaxTables()
found.- Parameters:
defaultRate
- The default rate if no matching ingetTaxTables()
found.
-
setTaxTables
Map of a tax code to a list of tax records for that jurisdiction. TheSimpleTaxProvider
supports alpha-2 country codes as tax codes.- Parameters:
taxTables
- Map of tax code to a list of tax records for that country.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-