Class ItemOfferPermutationResult
java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.ItemOfferPermutationResult
DTO containing results of the evaluation of a permutation of item offers.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionItemOfferPermutationResult(ItemOfferPermutationResult result, OrderTotals initialTotals, String segmentToExclude) ItemOfferPermutationResult(ItemOfferPermutationResult result, OrderTotals initialTotals, Set<LineItemOfferDetail> detailsToReset, com.broadleafcommerce.common.extension.TypeFactory offerFactory) Clone this ItemOfferPermutationResult and reset the passed in details to remove any adjustments.ItemOfferPermutationResult(javax.money.CurrencyUnit currency) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFreeGiftItem(com.broadleafcommerce.promotion.offer.client.web.context.info.FreeGiftItem freeGiftItem, javax.money.MonetaryAmount estimatedValue) buildAppliedItemOffersMap(List<LineItemOfferDetail> details) protected Map<String,List<LineItemOfferDetail>> buildItemOfferDetailMap(List<LineItemOfferDetail> details) protected javax.money.MonetaryAmountbooleanjavax.money.CurrencyUnitList<com.broadleafcommerce.promotion.offer.client.web.context.info.FreeGiftItem>javax.money.MonetaryAmountjavax.money.MonetaryAmountbooleanbooleanbooleanvoidpopulateItemDetailStructures(List<LineItemOfferDetail> itemDetails) voidsetCodeResponseMap(Map<String, com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse> codeResponseMap) voidsetPermutationTotals(OrderTotals permutationTotals) voidupdateCodeResponse(String code, com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse response) voidupdateCodesResponses(Set<OfferCode> offerCodes, com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse response)
-
Constructor Details
-
ItemOfferPermutationResult
public ItemOfferPermutationResult(javax.money.CurrencyUnit currency) -
ItemOfferPermutationResult
public ItemOfferPermutationResult(ItemOfferPermutationResult result, OrderTotals initialTotals, String segmentToExclude) -
ItemOfferPermutationResult
public ItemOfferPermutationResult(ItemOfferPermutationResult result, OrderTotals initialTotals, Set<LineItemOfferDetail> detailsToReset, com.broadleafcommerce.common.extension.TypeFactory offerFactory) Clone this ItemOfferPermutationResult and reset the passed in details to remove any adjustments.- Parameters:
result-initialTotals-detailsToReset-
-
-
Method Details
-
populateItemDetailStructures
-
containsDiscountsAcrossMultipleSegments
public boolean containsDiscountsAcrossMultipleSegments() -
getSegmentsWithAdjustmentsList
-
buildAppliedItemOffersMap
-
buildItemOfferDetailMap
protected Map<String,List<LineItemOfferDetail>> buildItemOfferDetailMap(List<LineItemOfferDetail> details) -
calculateTotalAdjustmentsValue
protected javax.money.MonetaryAmount calculateTotalAdjustmentsValue(List<LineItemOfferDetail> details) -
isLessValueThan
-
isEqualTo
-
hasDetails
public boolean hasDetails() -
addFreeGiftItem
public void addFreeGiftItem(com.broadleafcommerce.promotion.offer.client.web.context.info.FreeGiftItem freeGiftItem, @Nonnull javax.money.MonetaryAmount estimatedValue) -
updateCodeResponse
public void updateCodeResponse(String code, com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse response) -
updateCodesResponses
-
getPermutationTotals
-
setPermutationTotals
-
getTotalAdjustmentValue
public javax.money.MonetaryAmount getTotalAdjustmentValue() -
getTotalFreeGiftsValue
public javax.money.MonetaryAmount getTotalFreeGiftsValue() -
getAppliedItemOffers
-
getCodeResponseMap
-
setCodeResponseMap
-
getLineItemDetails
-
getLineItemDetailMap
-
getFreeGiftItems
public List<com.broadleafcommerce.promotion.offer.client.web.context.info.FreeGiftItem> getFreeGiftItems() -
getCurrency
public javax.money.CurrencyUnit getCurrency()
-