Class OrderPricing

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

public class OrderPricing extends Object implements Serializable, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer
Pricing information for an Order.
See Also:
  • Constructor Details

    • OrderPricing

      public OrderPricing()
  • Method Details

    • getAdjustmentsTotal

      public javax.money.MonetaryAmount getAdjustmentsTotal()
    • getCurrency

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

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

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

      public javax.money.MonetaryAmount getSubtotal()
      The subtotal price of this Order. Typically calculated from summing the individual totals from Order.getOrderItems().
      Returns:
      The subtotal price of this Order.
    • getTotal

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

      public javax.money.MonetaryAmount getFeesTotal()
      The total fees of this Order. 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 Order.
    • getTaxIncludedType

      public String getTaxIncludedType()
      Indicates if any taxes are included in the subtotal.
      See Also:
      • TaxIncludedType
    • getIncludedTaxAmount

      public javax.money.MonetaryAmount getIncludedTaxAmount()
      The amount of taxes that are included in the subtotal (VAT).
    • setCurrency

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

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

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

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

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

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

      public void setFeesTotal(javax.money.MonetaryAmount feesTotal)
      The total fees of this Order. 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 Order.
    • setTaxIncludedType

      public void setTaxIncludedType(String taxIncludedType)
      Indicates if any taxes are included in the subtotal.
      See Also:
      • TaxIncludedType
    • 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