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
ConstructorDescriptionItemOfferPermutationResult
(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 TypeMethodDescriptionvoid
addFreeGiftItem
(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.MonetaryAmount
boolean
javax.money.CurrencyUnit
List<com.broadleafcommerce.promotion.offer.client.web.context.info.FreeGiftItem>
javax.money.MonetaryAmount
javax.money.MonetaryAmount
boolean
boolean
boolean
void
populateItemDetailStructures
(List<LineItemOfferDetail> itemDetails) void
setCodeResponseMap
(Map<String, com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse> codeResponseMap) void
setPermutationTotals
(OrderTotals permutationTotals) void
updateCodeResponse
(String code, com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse response) void
updateCodesResponses
(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()
-