Package com.broadleafcommerce.tax.domain
Class TaxDetail
- java.lang.Object
-
- com.broadleafcommerce.tax.domain.TaxDetail
-
- All Implemented Interfaces:
Serializable
public class TaxDetail extends Object implements Serializable
Detailed tax information for a item, viaTaxInfo. There would be separateTaxDetailfor every tax, i.e., state sales tax, city sales tax.- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTaxDetail.TaxDetailBuilder
-
Constructor Summary
Constructors Modifier Constructor Description TaxDetail()protectedTaxDetail(String country, String region, String jurisdictionName, String jurisdictionType, String taxName, javax.money.MonetaryAmount taxableAmount, BigDecimal rate, javax.money.MonetaryAmount taxCalculated, String transactionId, Map<String,Object> attributes, boolean isVat)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TaxDetail.TaxDetailBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)Map<String,Object>getAttributes()Additional attributes for this tax detailStringgetCountry()The country for this tax.StringgetJurisdictionName()The jurisdiction name.StringgetJurisdictionType()The jurisdiction type, e.g.BigDecimalgetRate()The rate of this tax.StringgetRegion()The region for this tax.javax.money.MonetaryAmountgetTaxableAmount()The amount that was taxable to determine the calculated tax.javax.money.MonetaryAmountgetTaxCalculated()The calculated tax for this detail.StringgetTaxName()The name of the tax.StringgetTransactionId()The transaction ID for this tax detail.inthashCode()booleanisVat()voidsetAttributes(Map<String,Object> attributes)Additional attributes for this tax detailvoidsetCountry(String country)The country for this tax.voidsetJurisdictionName(String jurisdictionName)The jurisdiction name.voidsetJurisdictionType(String jurisdictionType)The jurisdiction type, e.g.voidsetRate(BigDecimal rate)The rate of this tax.voidsetRegion(String region)The region for this tax.voidsetTaxableAmount(javax.money.MonetaryAmount taxableAmount)The amount that was taxable to determine the calculated tax.voidsetTaxCalculated(javax.money.MonetaryAmount taxCalculated)The calculated tax for this detail.voidsetTaxName(String taxName)The name of the tax.voidsetTransactionId(String transactionId)The transaction ID for this tax detail.voidsetVat(boolean isVat)StringtoString()
-
-
-
Method Detail
-
builder
public static TaxDetail.TaxDetailBuilder builder()
-
getCountry
public String getCountry()
The country for this tax.- Returns:
- The country for this tax.
-
getRegion
public String getRegion()
The region for this tax. This is often something like a two digit state code, e.g. (CA, TX, NY, etc.)- Returns:
- The region for this tax.
-
getJurisdictionName
public String getJurisdictionName()
The jurisdiction name. This may be a state, city, county, etc.- Returns:
- The tax jurisdiction name.
-
getJurisdictionType
public String getJurisdictionType()
The jurisdiction type, e.g. city, state, county, etc.
-
getTaxName
public String getTaxName()
The name of the tax.- Returns:
- The name of the tax.
-
getTaxableAmount
public javax.money.MonetaryAmount getTaxableAmount()
The amount that was taxable to determine the calculated tax.- Returns:
- The amount that was taxable to determine the calculated tax.
-
getRate
public BigDecimal getRate()
The rate of this tax.- Returns:
- The rate of this tax.
-
getTaxCalculated
public javax.money.MonetaryAmount getTaxCalculated()
The calculated tax for this detail.- Returns:
- The calculated tax for this detail.
-
getTransactionId
public String getTransactionId()
The transaction ID for this tax detail. Used to reconcile this tax detail with a specific transaction when using an external tax provider.
-
isVat
public boolean isVat()
-
setCountry
public void setCountry(String country)
The country for this tax.- Parameters:
country- The country for this tax.
-
setRegion
public void setRegion(String region)
The region for this tax. This is often something like a two digit state code, e.g. (CA, TX, NY, etc.)- Parameters:
region- The region for this tax.
-
setJurisdictionName
public void setJurisdictionName(String jurisdictionName)
The jurisdiction name. This may be a state, city, county, etc.- Parameters:
jurisdictionName- The tax jurisdiction name.
-
setJurisdictionType
public void setJurisdictionType(String jurisdictionType)
The jurisdiction type, e.g. city, state, county, etc.
-
setTaxName
public void setTaxName(String taxName)
The name of the tax.- Parameters:
taxName- The name of the tax.
-
setTaxableAmount
public void setTaxableAmount(javax.money.MonetaryAmount taxableAmount)
The amount that was taxable to determine the calculated tax.- Parameters:
taxableAmount- The amount that was taxable to determine the calculated tax.
-
setRate
public void setRate(BigDecimal rate)
The rate of this tax.- Parameters:
The- rate of this tax.
-
setTaxCalculated
public void setTaxCalculated(javax.money.MonetaryAmount taxCalculated)
The calculated tax for this detail.- Parameters:
taxCalculated- The calculated tax for this detail.
-
setTransactionId
public void setTransactionId(String transactionId)
The transaction ID for this tax detail. Used to reconcile this tax detail with a specific transaction when using an external tax provider.
-
setAttributes
public void setAttributes(Map<String,Object> attributes)
Additional attributes for this tax detail
-
setVat
public void setVat(boolean isVat)
-
canEqual
protected boolean canEqual(Object other)
-
-