Class OrderTotals
- 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:
OffersPermutation
-
-
Constructor Summary
Constructors Constructor Description OrderTotals()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjustTotals(javax.money.MonetaryAmount amount)Update subtotals and adjusted subtotals.voidadjustTotalValue(javax.money.MonetaryAmount amount)Total value can be adjusted by items that aren't part of the normal adjustments like vouchersOrderTotalscopy()javax.money.MonetaryAmountgetDiscountablePriceForOrder()javax.money.MonetaryAmountgetSubTotalWithAdjustments()javax.money.MonetaryAmountgetTotalAdjustments()javax.money.MonetaryAmountgetTotalValue()voidsetDiscountablePriceForOrder(javax.money.MonetaryAmount discountablePriceForOrder)voidsetSubTotalWithAdjustments(javax.money.MonetaryAmount subTotalWithAdjustments)voidsetTotalAdjustments(javax.money.MonetaryAmount totalAdjustments)
-
-
-
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-
-
copy
public OrderTotals copy()
-
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()
-
-