Class CartPricing

java.lang.Object
com.broadleafcommerce.cart.client.domain.CartPricing
All Implemented Interfaces:
com.broadleafcommerce.money.CurrencyConsumer, Serializable, javax.money.CurrencySupplier

public class CartPricing extends Object implements Serializable, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer
Pricing information for a Cart.
Author:
Chad Harchar (charchar)
See Also:
  • Constructor Details

    • CartPricing

      public CartPricing()
  • Method Details

    • getTaxIncludedType

      public String getTaxIncludedType()
      Indicates if any taxes are included in the subtotal. Getter returns default value for backward-compatability
      Returns:
      The TaxIncludedType that indicates if any taxes are included in the subtotal. Returns "NO" by default.
      See Also:
    • getIncludedTaxAmount

      public javax.money.MonetaryAmount getIncludedTaxAmount()
      The amount of taxes that are included in the subtotal (VAT). Getter returns default value for backward-compatability
      Returns:
      The amount of taxes that are included in the subtotal (VAT).
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
      The currency unit used for the pricing of this Cart.
      Specified by:
      getCurrency in interface javax.money.CurrencySupplier
      Returns:
      The currency unit used for the pricing of this Cart.
    • getTotalTax

      public javax.money.MonetaryAmount getTotalTax()
      The total tax amount for this Cart.
      Returns:
      The total tax amount for this Cart.
    • getFulfillmentTotal

      public javax.money.MonetaryAmount getFulfillmentTotal()
      The total fulfillment price of this Cart, including adjustments.
      Returns:
      The total fulfillment price of this Cart, including adjustments.
    • getSubtotal

      public javax.money.MonetaryAmount getSubtotal()
      The subtotal price of this Cart. Typically calculated from summing the individual totals from Cart.getCartItems().
      Returns:
      The subtotal price of this Cart.
    • getAdjustmentsTotal

      public javax.money.MonetaryAmount getAdjustmentsTotal()
      The total adjustment price for all adjustments of a Cart and its Cart.getCartItems(). This should not include fulfillment adjustments since those are already included in fulfillmentTotal.
      Returns:
      The total adjustment price for all adjustments of a Cart.
    • getTotal

      public javax.money.MonetaryAmount getTotal()
      The total price of this Cart. Typically calculated from getSubtotal() - getAdjustmentsTotal() + getTotalTax() + getFulfillmentTotal().
      Returns:
      The total price of this Cart.
    • getFeesTotal

      public javax.money.MonetaryAmount getFeesTotal()
      The total fees of this Cart. This would include the sum of all CartItem.getSubtotalWithDependentItems() for items of type CartItem.getType() of DefaultCartItemTypes.isExtraFee(String).
      Returns:
      The total fees of this Cart.
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      The currency unit used for the pricing of this Cart.
      Specified by:
      setCurrency in interface com.broadleafcommerce.money.CurrencyConsumer
      Parameters:
      currency - The currency unit used for the pricing of this Cart.
    • setTotalTax

      public void setTotalTax(javax.money.MonetaryAmount totalTax)
      The total tax amount for this Cart.
      Parameters:
      totalTax - The total tax amount for this Cart.
    • setFulfillmentTotal

      public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal)
      The total fulfillment price of this Cart, including adjustments.
      Parameters:
      totalFulfillmentPrice - The total fulfillment price of this Cart, including adjustments.
    • setSubtotal

      public void setSubtotal(javax.money.MonetaryAmount subtotal)
      The subtotal price of this Cart. Typically calculated from summing the individual totals from Cart.getCartItems().
      Parameters:
      subtotal - The subtotal price of this Cart.
    • setAdjustmentsTotal

      public void setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal)
      The total adjustment price for all adjustments of a Cart and its Cart.getCartItems(). This should not include fulfillment adjustments since those are already included in fulfillmentTotal.
      Parameters:
      adjustmentsTotal - The total adjustment price for all adjustments of a Cart.
    • setTotal

      public void setTotal(javax.money.MonetaryAmount total)
      The total price of this Cart. Typically calculated from getSubtotal() - getAdjustmentsTotal() + getTotalTax() + getFulfillmentTotal().
      Parameters:
      total - The total price of this Cart.
    • setFeesTotal

      public void setFeesTotal(javax.money.MonetaryAmount feesTotal)
      The total fees of this Cart. This would include the sum of all CartItem.getSubtotalWithDependentItems() for items of type CartItem.getType() of DefaultCartItemTypes.isExtraFee(String).
      Parameters:
      total - The total fees of this Cart.
    • setTaxIncludedType

      public void setTaxIncludedType(String taxIncludedType)
      Indicates if any taxes are included in the subtotal.
      See Also:
    • setIncludedTaxAmount

      public void setIncludedTaxAmount(javax.money.MonetaryAmount includedTaxAmount)
      The amount of taxes that are included in the subtotal (VAT).
    • 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