Class OrderTotals
java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.OrderTotals
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustTotals
(FulfillmentGroupAdjustment fgOfferAdjustment, javax.money.MonetaryAmount amount) void
adjustTotals
(OrderOfferAdjustment orderOfferAdjustment, javax.money.MonetaryAmount amount) void
adjustTotals
(Map<String, List<LineItemOfferDetail>> lineItemDetailMap, javax.money.MonetaryAmount amount) void
adjustTotalValue
(javax.money.MonetaryAmount amount) Total value can be adjusted by items that aren't part of the normal adjustments like voucherscopy()
javax.money.CurrencyUnit
javax.money.MonetaryAmount
javax.money.MonetaryAmount
The totalValue (score) of this permutation
-
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
-
getCurrency
public javax.money.CurrencyUnit getCurrency() -
getTotalValue
public javax.money.MonetaryAmount getTotalValue()The totalValue (score) of this permutation -
getTotalAdjustments
public javax.money.MonetaryAmount getTotalAdjustments()
-