java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.OrderTotals

public class OrderTotals extends Object
DTO containing relevant totals such as the order subtotal, discountable subtotals, and other totals needed to determine the best offer. The intended use of this class in when scoring an OfferPermutation. The following process occurs in the default flow. AdjustedTotals are set based on the order. Item offers processing runs and for each selected permutation, the Totals are reduced based on the item adjustments before running the order (and other) adjustments.
See Also:
  • Constructor Details

    • OrderTotals

      public OrderTotals(javax.money.CurrencyUnit currency)
  • Method Details

    • adjustTotals

      public void adjustTotals(FulfillmentGroupAdjustment fgOfferAdjustment, javax.money.MonetaryAmount amount)
    • adjustTotals

      public void adjustTotals(OrderOfferAdjustment orderOfferAdjustment, javax.money.MonetaryAmount amount)
    • adjustTotals

      public void adjustTotals(Map<String,List<LineItemOfferDetail>> lineItemDetailMap, javax.money.MonetaryAmount amount)
    • adjustTotalValue

      public void adjustTotalValue(javax.money.MonetaryAmount amount)
      Total value can be adjusted by items that aren't part of the normal adjustments like vouchers
      Parameters:
      amount -
    • copy

      public OrderTotals copy()
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
    • getTotalValue

      public javax.money.MonetaryAmount getTotalValue()
      The totalValue (score) of this permutation
    • getTotalAdjustments

      public javax.money.MonetaryAmount getTotalAdjustments()