Package com.broadleafcommerce.tax.domain
Class TaxDetail.TaxDetailBuilder
java.lang.Object
com.broadleafcommerce.tax.domain.TaxDetail.TaxDetailBuilder
- Enclosing class:
- TaxDetail
-
Method Summary
Modifier and TypeMethodDescriptionattributes
(Map<String, Object> attributes) Additional attributes for this tax detailbuild()
The country for this tax.isExempt
(boolean isExempt) Indicates if this is exempt from taxes, usually based on a tax exemption code.isVat
(boolean isVat) Declares whether the taxes were included in the provided subtotal.jurisdictionName
(String jurisdictionName) The jurisdiction name.jurisdictionType
(String jurisdictionType) The jurisdiction type, e.g.rate
(BigDecimal rate) The rate of this tax.The region for this tax.taxableAmount
(javax.money.MonetaryAmount taxableAmount) The amount that was taxable to determine the calculated tax.taxCalculated
(javax.money.MonetaryAmount taxCalculated) The calculated tax for this detail.The name of the tax.toString()
transactionId
(String transactionId) The transaction ID for this tax detail.
-
Method Details
-
country
The country for this tax.- Parameters:
country
- The country for this tax.- Returns:
this
.
-
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.- Returns:
this
.
-
jurisdictionName
The jurisdiction name. This may be a state, city, county, etc.- Parameters:
jurisdictionName
- The tax jurisdiction name.- Returns:
this
.
-
jurisdictionType
The jurisdiction type, e.g. city, state, county, etc.- Returns:
this
.
-
taxName
The name of the tax.- Parameters:
taxName
- The name of the tax.- Returns:
this
.
-
taxableAmount
The amount that was taxable to determine the calculated tax.- Parameters:
taxableAmount
- The amount that was taxable to determine the calculated tax.- Returns:
this
.
-
rate
The rate of this tax.- Parameters:
The
- rate of this tax.- Returns:
this
.
-
taxCalculated
The calculated tax for this detail.- Parameters:
taxCalculated
- The calculated tax for this detail.- Returns:
this
.
-
transactionId
The transaction ID for this tax detail. Used to reconcile this tax detail with a specific transaction when using an external tax provider.- Returns:
this
.
-
attributes
Additional attributes for this tax detail- Returns:
this
.
-
isVat
Declares whether the taxes were included in the provided subtotal. Note: this is a known misnomer & its value should always align with that ofTaxInfo.isTaxIncluded()
.- Returns:
this
.
-
isExempt
Indicates if this is exempt from taxes, usually based on a tax exemption code.- Returns:
this
.
-
build
-
toString
-