Class TaxDetail.TaxDetailBuilder

java.lang.Object
com.broadleafcommerce.tax.domain.TaxDetail.TaxDetailBuilder
Enclosing class:
TaxDetail

public static class TaxDetail.TaxDetailBuilder extends Object
  • Method Details

    • 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

      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)
      Declares whether the taxes were included in the provided subtotal. Note: this is a known misnomer & its value should always align with that of TaxInfo.isTaxIncluded().
      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()
    • toString

      public String toString()
      Overrides:
      toString in class Object