Class TaxCalculationRequest

java.lang.Object
com.broadleafcommerce.tax.domain.TaxCalculationRequest
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AdjustTaxTransactionRequest, CommitTaxRequest, ReverseTaxTransactionRequest, VoidTransactionRequest

public class TaxCalculationRequest extends Object implements Serializable
Author:
Kelly Tisdell (ktisdell)
See Also:
  • Constructor Details

    • TaxCalculationRequest

      public TaxCalculationRequest()
  • Method Details

    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
      Currency of the Cart.
    • getCartId

      public String getCartId()
      ID of the shopping cart.
    • getCustomer

      public String getCustomer()
      Identifier for the customer that these taxes will apply to.
      Returns:
      The customer that these taxes will apply to.
    • getCustomerTaxExemptionCode

      public String getCustomerTaxExemptionCode()
      Tax exemption code, if known, for the customer.
    • getVatRegistrationId

      public String getVatRegistrationId()
      Optional VAT registration ID. This is usually only set if the buyer is a business and has a VAT registration ID. This is generally only used for B2B transactions.
    • getTaxCalculationGroups

      public List<TaxCalculationGroup> getTaxCalculationGroups()
      Groups of shipping details for the purpose of tax calculation. Items being shipped to / from certain regions, states, provinces, or subdivisions may have different tax rates and tax reporting requirements. This allows us to group these details.
    • getProviderId

      public String getProviderId()
      This is simply a hint that can be provided by the client that indicates that taxes were previously calculated by a particular TaxProvider. Note that this is optional and is a hint that is used for selecting the appropriate TaxProvider for additional interactions (commit or adjust), or for logging details when a fallback (or no-op) method is executed. This should not be set if you don't know which TaxProvider previously calculated taxes for the given cartId.
    • getAttributes

      public Map<String,Object> getAttributes()
      Additional attributes for this tax request.
      Returns:
      Additional attributes for this tax request.
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      Currency of the Cart.
    • setCartId

      public void setCartId(String cartId)
      ID of the shopping cart.
    • setCustomer

      public void setCustomer(String customer)
      Identifier for the customer that these taxes will apply to.
      Parameters:
      customer - The customer that these taxes will apply to.
    • setCustomerTaxExemptionCode

      public void setCustomerTaxExemptionCode(String customerTaxExemptionCode)
      Tax exemption code, if known, for the customer.
    • setVatRegistrationId

      public void setVatRegistrationId(String vatRegistrationId)
      Optional VAT registration ID. This is usually only set if the buyer is a business and has a VAT registration ID. This is generally only used for B2B transactions.
    • setTaxCalculationGroups

      public void setTaxCalculationGroups(List<TaxCalculationGroup> taxCalculationGroups)
      Groups of shipping details for the purpose of tax calculation. Items being shipped to / from certain regions, states, provinces, or subdivisions may have different tax rates and tax reporting requirements. This allows us to group these details.
    • setProviderId

      public void setProviderId(String providerId)
      This is simply a hint that can be provided by the client that indicates that taxes were previously calculated by a particular TaxProvider. Note that this is optional and is a hint that is used for selecting the appropriate TaxProvider for additional interactions (commit or adjust), or for logging details when a fallback (or no-op) method is executed. This should not be set if you don't know which TaxProvider previously calculated taxes for the given cartId.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Additional attributes for this tax request.
      Parameters:
      attributes - Additional attributes for this tax request.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object