Package com.broadleafcommerce.tax.domain
Class TaxDetail.TaxDetailBuilder
- java.lang.Object
-
- com.broadleafcommerce.tax.domain.TaxDetail.TaxDetailBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaxDetail.TaxDetailBuilder
attributes(Map<String,Object> attributes)
Additional attributes for this tax detailTaxDetail
build()
TaxDetail.TaxDetailBuilder
country(String country)
The country for this tax.TaxDetail.TaxDetailBuilder
isExempt(boolean isExempt)
Indicates if this is exempt from taxes, usually based on a tax exemption code.TaxDetail.TaxDetailBuilder
isVat(boolean isVat)
Indicates if this is VAT taxTaxDetail.TaxDetailBuilder
jurisdictionName(String jurisdictionName)
The jurisdiction name.TaxDetail.TaxDetailBuilder
jurisdictionType(String jurisdictionType)
The jurisdiction type, e.g.TaxDetail.TaxDetailBuilder
rate(BigDecimal rate)
The rate of this tax.TaxDetail.TaxDetailBuilder
region(String region)
The region for this tax.TaxDetail.TaxDetailBuilder
taxableAmount(javax.money.MonetaryAmount taxableAmount)
The amount that was taxable to determine the calculated tax.TaxDetail.TaxDetailBuilder
taxCalculated(javax.money.MonetaryAmount taxCalculated)
The calculated tax for this detail.TaxDetail.TaxDetailBuilder
taxName(String taxName)
The name of the tax.String
toString()
TaxDetail.TaxDetailBuilder
transactionId(String transactionId)
The transaction ID for this tax detail.
-
-
-
Method Detail
-
country
public TaxDetail.TaxDetailBuilder country(String country)
The country for this tax.- Parameters:
country
- The country for this tax.- Returns:
this
.
-
region
public TaxDetail.TaxDetailBuilder region(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.- Returns:
this
.
-
jurisdictionName
public TaxDetail.TaxDetailBuilder jurisdictionName(String jurisdictionName)
The jurisdiction name. This may be a state, city, county, etc.- Parameters:
jurisdictionName
- The tax jurisdiction name.- Returns:
this
.
-
jurisdictionType
public TaxDetail.TaxDetailBuilder jurisdictionType(String jurisdictionType)
The jurisdiction type, e.g. city, state, county, etc.- Returns:
this
.
-
taxName
public TaxDetail.TaxDetailBuilder taxName(String taxName)
The name of the tax.- Parameters:
taxName
- The name of the tax.- Returns:
this
.
-
taxableAmount
public TaxDetail.TaxDetailBuilder taxableAmount(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.- Returns:
this
.
-
rate
public TaxDetail.TaxDetailBuilder rate(BigDecimal rate)
The rate of this tax.- Parameters:
The
- rate of this tax.- Returns:
this
.
-
taxCalculated
public TaxDetail.TaxDetailBuilder taxCalculated(javax.money.MonetaryAmount taxCalculated)
The calculated tax for this detail.- Parameters:
taxCalculated
- The calculated tax for this detail.- Returns:
this
.
-
transactionId
public TaxDetail.TaxDetailBuilder transactionId(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.- Returns:
this
.
-
attributes
public TaxDetail.TaxDetailBuilder attributes(Map<String,Object> attributes)
Additional attributes for this tax detail- Returns:
this
.
-
isVat
public TaxDetail.TaxDetailBuilder isVat(boolean isVat)
Indicates if this is VAT tax- Returns:
this
.
-
isExempt
public TaxDetail.TaxDetailBuilder isExempt(boolean isExempt)
Indicates if this is exempt from taxes, usually based on a tax exemption code.- Returns:
this
.
-
build
public TaxDetail build()
-
-