Package com.broadleafcommerce.tax.simple
Class SimpleTaxRecord
java.lang.Object
com.broadleafcommerce.tax.simple.SimpleTaxRecord
- All Implemented Interfaces:
Serializable
A single configuration of a tax rate according to a location. Used by
SimpleTaxProvider.calculateTaxes(List, ContextInfo)
to find the correct rate for a given
TaxAddress
.- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Indicates if a Tax exemption is allowed.getCity()
This city for this record.Whether this record is the default for the mapped country.This postal code for this record.getRate()
The rate for this record.This state, province, or region for this record.getVat()
True if this is a VAT taxint
hashCode()
void
setAllowTaxExemption
(Boolean allowTaxExemption) Indicates if a Tax exemption is allowed.void
This city for this record.void
setCountryDefault
(Boolean countryDefault) Whether this record is the default for the mapped country.void
setPostalCode
(String postalCode) This postal code for this record.void
The rate for this record.void
setStateProvinceRegion
(String stateProvinceRegion) This state, province, or region for this record.void
True if this is a VAT taxtoString()
-
Constructor Details
-
SimpleTaxRecord
public SimpleTaxRecord()
-
-
Method Details
-
getCountryDefault
Whether this record is the default for the mapped country.- Returns:
- Whether this record is the default for the mapped country.
-
getAllowTaxExemption
Indicates if a Tax exemption is allowed. Tax exemptions are applied if the Tax request contains a taxExemptionCode. By default, the taxExemptionCode is trusted. If it exists, and this field is true (default), then a tax rate of 0 will be applied.- Returns:
- Whether a tax exemption is allowed
-
getVat
True if this is a VAT tax -
getStateProvinceRegion
This state, province, or region for this record.- Returns:
- This state, province, or region for this record.
-
getCity
This city for this record.- Returns:
- This city for this record.
-
getPostalCode
This postal code for this record.- Returns:
- This postal code for this record.
-
getRate
The rate for this record. Used to calculate taxes for an item.- Returns:
- The rate for this record. Used to calculate taxes for an item.
-
setCountryDefault
Whether this record is the default for the mapped country.- Parameters:
countryDefault
- Whether this record is the default for the mapped country.
-
setAllowTaxExemption
Indicates if a Tax exemption is allowed. Tax exemptions are applied if the Tax request contains a taxExemptionCode. By default, the taxExemptionCode is trusted. If it exists, and this field is true (default), then a tax rate of 0 will be applied.- Parameters:
allowTaxExemption
- Whether a tax exemption is allowed
-
setVat
True if this is a VAT tax -
setStateProvinceRegion
This state, province, or region for this record.- Parameters:
stateProvinceRegion
- This state, province, or region for this record.
-
setCity
This city for this record.- Parameters:
city
- This city for this record.
-
setPostalCode
This postal code for this record.- Parameters:
postalCode
- This postal code for this record.
-
setRate
The rate for this record. Used to calculate taxes for an item.- Parameters:
rate
- The rate for this record. Used to calculate taxes for an item.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-