Package com.broadleafcommerce.tax.simple
Class SimpleTaxRecord
- java.lang.Object
 - 
- com.broadleafcommerce.tax.simple.SimpleTaxRecord
 
 
- 
- All Implemented Interfaces:
 Serializable
public class SimpleTaxRecord extends Object implements Serializable
A single configuration of a tax rate according to a location. Used bySimpleTaxProvider.calculateTaxes(List, ContextInfo)to find the correct rate for a givenTaxAddress.- Author:
 - Chad Harchar (charchar)
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description SimpleTaxRecord() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)BooleangetAllowTaxExemption()Indicates if a Tax exemption is allowed.StringgetCity()This city for this record.BooleangetCountryDefault()Whether this record is the default for the mapped country.StringgetPostalCode()This postal code for this record.DoublegetRate()The rate for this record.StringgetStateProvinceRegion()This state, province, or region for this record.BooleangetVat()True if this is a VAT taxinthashCode()voidsetAllowTaxExemption(Boolean allowTaxExemption)Indicates if a Tax exemption is allowed.voidsetCity(String city)This city for this record.voidsetCountryDefault(Boolean countryDefault)Whether this record is the default for the mapped country.voidsetPostalCode(String postalCode)This postal code for this record.voidsetRate(Double rate)The rate for this record.voidsetStateProvinceRegion(String stateProvinceRegion)This state, province, or region for this record.voidsetVat(Boolean vat)True if this is a VAT taxStringtoString() 
 - 
 
- 
- 
Method Detail
- 
getCountryDefault
public Boolean getCountryDefault()
Whether this record is the default for the mapped country.- Returns:
 - Whether this record is the default for the mapped country.
 
 
- 
getAllowTaxExemption
public Boolean 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
public Boolean getVat()
True if this is a VAT tax 
- 
getStateProvinceRegion
public String getStateProvinceRegion()
This state, province, or region for this record.- Returns:
 - This state, province, or region for this record.
 
 
- 
getCity
public String getCity()
This city for this record.- Returns:
 - This city for this record.
 
 
- 
getPostalCode
public String getPostalCode()
This postal code for this record.- Returns:
 - This postal code for this record.
 
 
- 
getRate
public Double 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
public void setCountryDefault(Boolean countryDefault)
Whether this record is the default for the mapped country.- Parameters:
 countryDefault- Whether this record is the default for the mapped country.
 
- 
setAllowTaxExemption
public void setAllowTaxExemption(Boolean allowTaxExemption)
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
public void setVat(Boolean vat)
True if this is a VAT tax 
- 
setStateProvinceRegion
public void setStateProvinceRegion(String stateProvinceRegion)
This state, province, or region for this record.- Parameters:
 stateProvinceRegion- This state, province, or region for this record.
 
- 
setCity
public void setCity(String city)
This city for this record.- Parameters:
 city- This city for this record.
 
- 
setPostalCode
public void setPostalCode(String postalCode)
This postal code for this record.- Parameters:
 postalCode- This postal code for this record.
 
- 
setRate
public void setRate(Double rate)
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.
 
- 
canEqual
protected boolean canEqual(Object other)
 
 - 
 
 -