Package com.broadleafcommerce.tax.domain
Class TaxInfo
- java.lang.Object
-
- com.broadleafcommerce.tax.domain.TaxInfo
-
- All Implemented Interfaces:
Serializable
public class TaxInfo extends Object implements Serializable
Tax information returned from aTaxProvider
for a single line item.- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.money.MonetaryAmount
exemptionAmount
The amount of this item that is not taxable.
-
Constructor Summary
Constructors Constructor Description TaxInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
Map<String,Object>
getAttributes()
Additional attributes for this tax infojavax.money.MonetaryAmount
getExemptionAmount()
The amount of this item that is not taxable.String
getItemId()
The id of the line item for this tax info.BigDecimal
getRate()
The rate that the item was taxed at.String
getSkuCode()
The sku code for the item.javax.money.MonetaryAmount
getTaxableAmount()
The amount of this item that is taxable and was used to determine the calculated tax.javax.money.MonetaryAmount
getTaxCalculated()
The tax calculated for the item.String
getTaxCode()
The tax code for the item.List<TaxDetail>
getTaxDetails()
Breakdown of taxes for this item.int
hashCode()
boolean
isEstimated()
Whether the calculated tax is an estimate.boolean
isExempt()
Indicates if this is exempt from taxes, usually based on a tax exemption code.boolean
isTaxable()
Whether the item is taxable.boolean
isVat()
Whether this is a VAT tax.void
setAttributes(Map<String,Object> attributes)
Additional attributes for this tax infovoid
setEstimated(boolean isEstimated)
Whether the calculated tax is an estimate.void
setExempt(boolean isExempt)
Indicates if this is exempt from taxes, usually based on a tax exemption code.void
setExemptionAmount(javax.money.MonetaryAmount exemptionAmount)
The amount of this item that is not taxable.void
setItemId(String itemId)
The id of the line item for this tax info.void
setRate(BigDecimal rate)
The rate that the item was taxed at.void
setSkuCode(String skuCode)
The sku code for the item.void
setTaxable(boolean isTaxable)
Whether the item is taxable.void
setTaxableAmount(javax.money.MonetaryAmount taxableAmount)
The amount of this item that is taxable and was used to determine the calculated tax.void
setTaxCalculated(javax.money.MonetaryAmount taxCalculated)
The tax calculated for the item.void
setTaxCode(String taxCode)
The tax code for the item.void
setTaxDetails(List<TaxDetail> taxDetails)
Breakdown of taxes for this item.void
setVat(boolean isVat)
Whether this is a VAT tax.String
toString()
-
-
-
Method Detail
-
getItemId
public String getItemId()
The id of the line item for this tax info.- Returns:
- The id of the line item for this tax info.
-
getSkuCode
public String getSkuCode()
The sku code for the item.- Returns:
- The sku code for the item.
-
getTaxCode
public String getTaxCode()
The tax code for the item.- Returns:
- The tax code for the item.
-
isVat
public boolean isVat()
Whether this is a VAT tax.
-
isExempt
public boolean isExempt()
Indicates if this is exempt from taxes, usually based on a tax exemption code.
-
isTaxable
public boolean isTaxable()
Whether the item is taxable.- Returns:
- Whether the item is taxable.
-
isEstimated
public boolean isEstimated()
Whether the calculated tax is an estimate.- Returns:
- Whether the calculated tax is an estimate.
-
getTaxableAmount
public javax.money.MonetaryAmount getTaxableAmount()
The amount of this item that is taxable and was used to determine the calculated tax.- Returns:
- The amount of this item that is taxable and was used to determine the calculated tax.
-
getExemptionAmount
public javax.money.MonetaryAmount getExemptionAmount()
The amount of this item that is not taxable.- Returns:
- The amount of this item that is not taxable.
-
getRate
public BigDecimal getRate()
The rate that the item was taxed at.- Returns:
- The rate that the item was taxed at.
-
getTaxCalculated
public javax.money.MonetaryAmount getTaxCalculated()
The tax calculated for the item.- Returns:
- The tax calculated for the item.
-
getTaxDetails
public List<TaxDetail> getTaxDetails()
Breakdown of taxes for this item.- Returns:
- Breakdown of taxes for this item.
-
setItemId
public void setItemId(String itemId)
The id of the line item for this tax info.- Parameters:
itemId
- The id of the line item for this tax info.
-
setSkuCode
public void setSkuCode(String skuCode)
The sku code for the item.- Parameters:
skuCode
- The sku code for the item.
-
setTaxCode
public void setTaxCode(String taxCode)
The tax code for the item.- Parameters:
taxCode
- The tax code for the item.
-
setVat
public void setVat(boolean isVat)
Whether this is a VAT tax.
-
setExempt
public void setExempt(boolean isExempt)
Indicates if this is exempt from taxes, usually based on a tax exemption code.
-
setTaxable
public void setTaxable(boolean isTaxable)
Whether the item is taxable.- Parameters:
taxable
- Whether the item is taxable.
-
setEstimated
public void setEstimated(boolean isEstimated)
Whether the calculated tax is an estimate.- Parameters:
estimated
- Whether the calculated tax is an estimate.
-
setTaxableAmount
public void setTaxableAmount(javax.money.MonetaryAmount taxableAmount)
The amount of this item that is taxable and was used to determine the calculated tax.- Parameters:
taxableAmount
- The amount of this item that is taxable and was used to determine the calculated tax.
-
setExemptionAmount
public void setExemptionAmount(javax.money.MonetaryAmount exemptionAmount)
The amount of this item that is not taxable.- Parameters:
exemptionAmount
- The amount of this item that is not taxable.
-
setRate
public void setRate(BigDecimal rate)
The rate that the item was taxed at.- Parameters:
rate
- The rate that the item was taxed at.
-
setTaxCalculated
public void setTaxCalculated(javax.money.MonetaryAmount taxCalculated)
The tax calculated for the item.- Parameters:
taxCalculated
- The tax calculated for the item.
-
setTaxDetails
public void setTaxDetails(List<TaxDetail> taxDetails)
Breakdown of taxes for this item.- Parameters:
taxDetails
- Breakdown of taxes for this item.
-
setAttributes
public void setAttributes(Map<String,Object> attributes)
Additional attributes for this tax info
-
canEqual
protected boolean canEqual(Object other)
-
-