Class 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:
    OffersPermutation
    • Constructor Detail

      • OrderTotals

        public OrderTotals()
    • Method Detail

      • adjustTotals

        public void adjustTotals​(javax.money.MonetaryAmount amount)
        Update subtotals and adjusted subtotals.
        Parameters:
        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 -
      • getSubTotalWithAdjustments

        public javax.money.MonetaryAmount getSubTotalWithAdjustments()
      • setSubTotalWithAdjustments

        public void setSubTotalWithAdjustments​(javax.money.MonetaryAmount subTotalWithAdjustments)
      • getDiscountablePriceForOrder

        public javax.money.MonetaryAmount getDiscountablePriceForOrder()
      • setDiscountablePriceForOrder

        public void setDiscountablePriceForOrder​(javax.money.MonetaryAmount discountablePriceForOrder)
      • getTotalAdjustments

        public javax.money.MonetaryAmount getTotalAdjustments()
      • setTotalAdjustments

        public void setTotalAdjustments​(javax.money.MonetaryAmount totalAdjustments)
      • getTotalValue

        public javax.money.MonetaryAmount getTotalValue()