Class ItemOfferPermutationResult

java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.ItemOfferPermutationResult

public class ItemOfferPermutationResult extends Object
DTO containing results of the evaluation of a permutation of item offers.
See Also:
  • 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

      public void populateItemDetailStructures(List<LineItemOfferDetail> itemDetails)
    • containsDiscountsAcrossMultipleSegments

      public boolean containsDiscountsAcrossMultipleSegments()
    • getSegmentsWithAdjustmentsList

      public Set<String> getSegmentsWithAdjustmentsList()
    • buildAppliedItemOffersMap

      protected Map<Offer,Integer> buildAppliedItemOffersMap(List<LineItemOfferDetail> details)
    • buildItemOfferDetailMap

      protected Map<String,List<LineItemOfferDetail>> buildItemOfferDetailMap(List<LineItemOfferDetail> details)
    • calculateTotalAdjustmentsValue

      protected javax.money.MonetaryAmount calculateTotalAdjustmentsValue(List<LineItemOfferDetail> details)
    • isLessValueThan

      public boolean isLessValueThan(ItemOfferPermutationResult other)
    • isEqualTo

      public boolean isEqualTo(ItemOfferPermutationResult other)
    • 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

      public void updateCodesResponses(Set<OfferCode> offerCodes, com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse response)
    • getPermutationTotals

      public OrderTotals getPermutationTotals()
    • setPermutationTotals

      public void setPermutationTotals(OrderTotals permutationTotals)
    • getTotalAdjustmentValue

      public javax.money.MonetaryAmount getTotalAdjustmentValue()
    • getTotalFreeGiftsValue

      public javax.money.MonetaryAmount getTotalFreeGiftsValue()
    • getAppliedItemOffers

      public Map<Offer,Integer> getAppliedItemOffers()
    • getCodeResponseMap

      public Map<String,com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse> getCodeResponseMap()
    • setCodeResponseMap

      public void setCodeResponseMap(Map<String,com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse> codeResponseMap)
    • getLineItemDetails

      public List<LineItemOfferDetail> getLineItemDetails()
    • getLineItemDetailMap

      public Map<String,List<LineItemOfferDetail>> getLineItemDetailMap()
    • getFreeGiftItems

      public List<com.broadleafcommerce.promotion.offer.client.web.context.info.FreeGiftItem> getFreeGiftItems()
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()