java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<P>
All Implemented Interfaces:
Serializable

public class OrderResponse<P extends ProratedItemOfferAdjustment> extends Object implements Serializable
A DTO structure that provides pricing information across a given order for offer adjustments. This information is a result of running an Order through the offer engine.
Author:
Chad Harchar (charchar)
See Also:
  • Constructor Details

    • OrderResponse

      public OrderResponse()
  • Method Details

    • getOrderNumber

      public String getOrderNumber()
      The orderNumber corresponding to the Order that this OrderResponse represents.
    • getAdjustedSubtotal

      public javax.money.MonetaryAmount getAdjustedSubtotal()
      The subtotal of all orderItemResponses with adjustments applied via the sum of all ItemResponse.getAdjustedTotal().
    • getOrderItemSavings

      public javax.money.MonetaryAmount getOrderItemSavings()
      The total savings from adjustments applied to order items via the sum of all ItemResponse.getSavings().
    • getAdjustedFulfillmentTotal

      public javax.money.MonetaryAmount getAdjustedFulfillmentTotal()
      The total of all fulfillmentGroupResponses with adjustments applied via the sum of all FulfillmentGroupResponse.getAdjustedTotal().
    • getFulfillmentSavings

      public javax.money.MonetaryAmount getFulfillmentSavings()
      The total savings from adjustments applied to fulfillment via the sum of all FulfillmentGroupResponse.getFulfillmentSavings().
    • getAdjustedTotal

      public javax.money.MonetaryAmount getAdjustedTotal()
      The total of all fulfillmentGroupResponses with adjustments applied.
    • getOrderSavings

      public javax.money.MonetaryAmount getOrderSavings()
      The savings from adjustments applied to the order via adjustments.
    • getTotalSavings

      public javax.money.MonetaryAmount getTotalSavings()
      The total savings from adjustments applied across all areas of the order.
    • getTotalFutureCredits

      public javax.money.MonetaryAmount getTotalFutureCredits()
      The total future credits from adjustments applied across all areas of the order. See OfferRef.isFutureCredit() for more info.
    • getOrderItemResponses

      public List<ItemResponse<P>> getOrderItemResponses()
      Adjustment information for each Order.getOrderLineItems() order item of the order}.
    • getFulfillmentGroupResponses

      public List<FulfillmentGroupResponse<P>> getFulfillmentGroupResponses()
      Adjustment information for each Order.getFulfillmentGroups() fulfillment group of the order}.
    • getAdjustments

      public List<Adjustment> getAdjustments()
      Adjustment information for this order.
    • getFreeGiftItems

      public List<FreeGiftItem> getFreeGiftItems()
      The FreeGiftItems to add from the free gift offers.
      Returns:
      the FreeGiftItems to add from the free gift offers
    • getVouchers

      public List<Voucher> getVouchers()
      The Vouchers that this order is qualified for.
    • getCodeResponseMap

      public Map<String,CodeResponse> getCodeResponseMap()
      A map of codes to responses detailing why a potential offer did not apply.
    • setOrderNumber

      public void setOrderNumber(String orderNumber)
      The orderNumber corresponding to the Order that this OrderResponse represents.
    • setAdjustedSubtotal

      public void setAdjustedSubtotal(javax.money.MonetaryAmount adjustedSubtotal)
      The subtotal of all orderItemResponses with adjustments applied via the sum of all ItemResponse.getAdjustedTotal().
    • setOrderItemSavings

      public void setOrderItemSavings(javax.money.MonetaryAmount orderItemSavings)
      The total savings from adjustments applied to order items via the sum of all ItemResponse.getSavings().
    • setAdjustedFulfillmentTotal

      public void setAdjustedFulfillmentTotal(javax.money.MonetaryAmount adjustedFulfillmentTotal)
      The total of all fulfillmentGroupResponses with adjustments applied via the sum of all FulfillmentGroupResponse.getAdjustedTotal().
    • setFulfillmentSavings

      public void setFulfillmentSavings(javax.money.MonetaryAmount fulfillmentSavings)
      The total savings from adjustments applied to fulfillment via the sum of all FulfillmentGroupResponse.getFulfillmentSavings().
    • setAdjustedTotal

      public void setAdjustedTotal(javax.money.MonetaryAmount adjustedTotal)
      The total of all fulfillmentGroupResponses with adjustments applied.
    • setOrderSavings

      public void setOrderSavings(javax.money.MonetaryAmount orderSavings)
      The savings from adjustments applied to the order via adjustments.
    • setTotalSavings

      public void setTotalSavings(javax.money.MonetaryAmount totalSavings)
      The total savings from adjustments applied across all areas of the order.
    • setTotalFutureCredits

      public void setTotalFutureCredits(javax.money.MonetaryAmount totalFutureCredits)
      The total future credits from adjustments applied across all areas of the order. See OfferRef.isFutureCredit() for more info.
    • setOrderItemResponses

      public void setOrderItemResponses(List<ItemResponse<P>> orderItemResponses)
      Adjustment information for each Order.getOrderLineItems() order item of the order}.
    • setFulfillmentGroupResponses

      public void setFulfillmentGroupResponses(List<FulfillmentGroupResponse<P>> fulfillmentGroupResponses)
      Adjustment information for each Order.getFulfillmentGroups() fulfillment group of the order}.
    • setAdjustments

      public void setAdjustments(List<Adjustment> adjustments)
      Adjustment information for this order.
    • setFreeGiftItems

      public void setFreeGiftItems(List<FreeGiftItem> freeGiftItems)
      The FreeGiftItems to add from the free gift offers.
      Parameters:
      freeGiftItems - the FreeGiftItems to add from the free gift offers
    • setVouchers

      public void setVouchers(List<Voucher> vouchers)
      The Vouchers that this order is qualified for.
    • setCodeResponseMap

      public void setCodeResponseMap(Map<String,CodeResponse> codeResponseMap)
      A map of codes to responses detailing why a potential offer did not apply.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object