Class OrderResponse<P extends ProratedItemOfferAdjustment>
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanjavax.money.MonetaryAmountThe total of allfulfillmentGroupResponseswith adjustments applied via the sum of allFulfillmentGroupResponse.getAdjustedTotal().javax.money.MonetaryAmountThe subtotal of allorderItemResponseswith adjustments applied via the sum of allItemResponse.getAdjustedTotal().javax.money.MonetaryAmountThe total of allfulfillmentGroupResponseswith adjustments applied.Adjustment information for this order.A map of codes to responses detailing why a potential offer did not apply.TheFreeGiftItemsto add from the free gift offers.Adjustment information for eachOrder.getFulfillmentGroups()fulfillment group of the order}.javax.money.MonetaryAmountThe total savings from adjustments applied to fulfillment via the sum of allFulfillmentGroupResponse.getFulfillmentSavings().Adjustment information for eachOrder.getOrderLineItems()order item of the order}.javax.money.MonetaryAmountThe total savings from adjustments applied to order items via the sum of allItemResponse.getSavings().The orderNumber corresponding to theOrderthat thisOrderResponserepresents.javax.money.MonetaryAmountThe savings from adjustments applied to the order viaadjustments.javax.money.MonetaryAmountThe total future credits from adjustments applied across all areas of the order.javax.money.MonetaryAmountThe total savings from adjustments applied across all areas of the order.TheVouchersthat this order is qualified for.inthashCode()voidsetAdjustedFulfillmentTotal(javax.money.MonetaryAmount adjustedFulfillmentTotal) The total of allfulfillmentGroupResponseswith adjustments applied via the sum of allFulfillmentGroupResponse.getAdjustedTotal().voidsetAdjustedSubtotal(javax.money.MonetaryAmount adjustedSubtotal) The subtotal of allorderItemResponseswith adjustments applied via the sum of allItemResponse.getAdjustedTotal().voidsetAdjustedTotal(javax.money.MonetaryAmount adjustedTotal) The total of allfulfillmentGroupResponseswith adjustments applied.voidsetAdjustments(List<Adjustment> adjustments) Adjustment information for this order.voidsetCodeResponseMap(Map<String, CodeResponse> codeResponseMap) A map of codes to responses detailing why a potential offer did not apply.voidsetFreeGiftItems(List<FreeGiftItem> freeGiftItems) TheFreeGiftItemsto add from the free gift offers.voidsetFulfillmentGroupResponses(List<FulfillmentGroupResponse<P>> fulfillmentGroupResponses) Adjustment information for eachOrder.getFulfillmentGroups()fulfillment group of the order}.voidsetFulfillmentSavings(javax.money.MonetaryAmount fulfillmentSavings) The total savings from adjustments applied to fulfillment via the sum of allFulfillmentGroupResponse.getFulfillmentSavings().voidsetOrderItemResponses(List<ItemResponse<P>> orderItemResponses) Adjustment information for eachOrder.getOrderLineItems()order item of the order}.voidsetOrderItemSavings(javax.money.MonetaryAmount orderItemSavings) The total savings from adjustments applied to order items via the sum of allItemResponse.getSavings().voidsetOrderNumber(String orderNumber) The orderNumber corresponding to theOrderthat thisOrderResponserepresents.voidsetOrderSavings(javax.money.MonetaryAmount orderSavings) The savings from adjustments applied to the order viaadjustments.voidsetTotalFutureCredits(javax.money.MonetaryAmount totalFutureCredits) The total future credits from adjustments applied across all areas of the order.voidsetTotalSavings(javax.money.MonetaryAmount totalSavings) The total savings from adjustments applied across all areas of the order.voidsetVouchers(List<Voucher> vouchers) TheVouchersthat this order is qualified for.toString()
-
Constructor Details
-
OrderResponse
public OrderResponse()
-
-
Method Details
-
getOrderNumber
The orderNumber corresponding to theOrderthat thisOrderResponserepresents. -
getAdjustedSubtotal
public javax.money.MonetaryAmount getAdjustedSubtotal()The subtotal of allorderItemResponseswith adjustments applied via the sum of allItemResponse.getAdjustedTotal(). -
getOrderItemSavings
public javax.money.MonetaryAmount getOrderItemSavings()The total savings from adjustments applied to order items via the sum of allItemResponse.getSavings(). -
getAdjustedFulfillmentTotal
public javax.money.MonetaryAmount getAdjustedFulfillmentTotal()The total of allfulfillmentGroupResponseswith adjustments applied via the sum of allFulfillmentGroupResponse.getAdjustedTotal(). -
getFulfillmentSavings
public javax.money.MonetaryAmount getFulfillmentSavings()The total savings from adjustments applied to fulfillment via the sum of allFulfillmentGroupResponse.getFulfillmentSavings(). -
getAdjustedTotal
public javax.money.MonetaryAmount getAdjustedTotal()The total of allfulfillmentGroupResponseswith adjustments applied. -
getOrderSavings
public javax.money.MonetaryAmount getOrderSavings()The savings from adjustments applied to the order viaadjustments. -
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. SeeOfferRef.isFutureCredit()for more info. -
getOrderItemResponses
Adjustment information for eachOrder.getOrderLineItems()order item of the order}. -
getFulfillmentGroupResponses
Adjustment information for eachOrder.getFulfillmentGroups()fulfillment group of the order}. -
getAdjustments
Adjustment information for this order. -
getFreeGiftItems
TheFreeGiftItemsto add from the free gift offers.- Returns:
- the
FreeGiftItemsto add from the free gift offers
-
getVouchers
TheVouchersthat this order is qualified for. -
getCodeResponseMap
A map of codes to responses detailing why a potential offer did not apply. -
setOrderNumber
The orderNumber corresponding to theOrderthat thisOrderResponserepresents. -
setAdjustedSubtotal
public void setAdjustedSubtotal(javax.money.MonetaryAmount adjustedSubtotal) The subtotal of allorderItemResponseswith adjustments applied via the sum of allItemResponse.getAdjustedTotal(). -
setOrderItemSavings
public void setOrderItemSavings(javax.money.MonetaryAmount orderItemSavings) The total savings from adjustments applied to order items via the sum of allItemResponse.getSavings(). -
setAdjustedFulfillmentTotal
public void setAdjustedFulfillmentTotal(javax.money.MonetaryAmount adjustedFulfillmentTotal) The total of allfulfillmentGroupResponseswith adjustments applied via the sum of allFulfillmentGroupResponse.getAdjustedTotal(). -
setFulfillmentSavings
public void setFulfillmentSavings(javax.money.MonetaryAmount fulfillmentSavings) The total savings from adjustments applied to fulfillment via the sum of allFulfillmentGroupResponse.getFulfillmentSavings(). -
setAdjustedTotal
public void setAdjustedTotal(javax.money.MonetaryAmount adjustedTotal) The total of allfulfillmentGroupResponseswith adjustments applied. -
setOrderSavings
public void setOrderSavings(javax.money.MonetaryAmount orderSavings) The savings from adjustments applied to the order viaadjustments. -
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. SeeOfferRef.isFutureCredit()for more info. -
setOrderItemResponses
Adjustment information for eachOrder.getOrderLineItems()order item of the order}. -
setFulfillmentGroupResponses
public void setFulfillmentGroupResponses(List<FulfillmentGroupResponse<P>> fulfillmentGroupResponses) Adjustment information for eachOrder.getFulfillmentGroups()fulfillment group of the order}. -
setAdjustments
Adjustment information for this order. -
setFreeGiftItems
TheFreeGiftItemsto add from the free gift offers.- Parameters:
freeGiftItems- theFreeGiftItemsto add from the free gift offers
-
setVouchers
TheVouchersthat this order is qualified for. -
setCodeResponseMap
A map of codes to responses detailing why a potential offer did not apply. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-