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 boolean
boolean
javax.money.MonetaryAmount
The total of allfulfillmentGroupResponses
with adjustments applied via the sum of allFulfillmentGroupResponse.getAdjustedTotal()
.javax.money.MonetaryAmount
The subtotal of allorderItemResponses
with adjustments applied via the sum of allItemResponse.getAdjustedTotal()
.javax.money.MonetaryAmount
The total of allfulfillmentGroupResponses
with adjustments applied.Adjustment information for this order.A map of codes to responses detailing why a potential offer did not apply.TheFreeGiftItems
to add from the free gift offers.Adjustment information for eachOrder.getFulfillmentGroups()
fulfillment group of the order}.javax.money.MonetaryAmount
The 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.MonetaryAmount
The total savings from adjustments applied to order items via the sum of allItemResponse.getSavings()
.The orderNumber corresponding to theOrder
that thisOrderResponse
represents.javax.money.MonetaryAmount
The savings from adjustments applied to the order viaadjustments
.javax.money.MonetaryAmount
The total future credits from adjustments applied across all areas of the order.javax.money.MonetaryAmount
The total savings from adjustments applied across all areas of the order.TheVouchers
that this order is qualified for.int
hashCode()
void
setAdjustedFulfillmentTotal
(javax.money.MonetaryAmount adjustedFulfillmentTotal) The total of allfulfillmentGroupResponses
with adjustments applied via the sum of allFulfillmentGroupResponse.getAdjustedTotal()
.void
setAdjustedSubtotal
(javax.money.MonetaryAmount adjustedSubtotal) The subtotal of allorderItemResponses
with adjustments applied via the sum of allItemResponse.getAdjustedTotal()
.void
setAdjustedTotal
(javax.money.MonetaryAmount adjustedTotal) The total of allfulfillmentGroupResponses
with adjustments applied.void
setAdjustments
(List<Adjustment> adjustments) Adjustment information for this order.void
setCodeResponseMap
(Map<String, CodeResponse> codeResponseMap) A map of codes to responses detailing why a potential offer did not apply.void
setFreeGiftItems
(List<FreeGiftItem> freeGiftItems) TheFreeGiftItems
to add from the free gift offers.void
setFulfillmentGroupResponses
(List<FulfillmentGroupResponse<P>> fulfillmentGroupResponses) Adjustment information for eachOrder.getFulfillmentGroups()
fulfillment group of the order}.void
setFulfillmentSavings
(javax.money.MonetaryAmount fulfillmentSavings) The total savings from adjustments applied to fulfillment via the sum of allFulfillmentGroupResponse.getFulfillmentSavings()
.void
setOrderItemResponses
(List<ItemResponse<P>> orderItemResponses) Adjustment information for eachOrder.getOrderLineItems()
order item of the order}.void
setOrderItemSavings
(javax.money.MonetaryAmount orderItemSavings) The total savings from adjustments applied to order items via the sum of allItemResponse.getSavings()
.void
setOrderNumber
(String orderNumber) The orderNumber corresponding to theOrder
that thisOrderResponse
represents.void
setOrderSavings
(javax.money.MonetaryAmount orderSavings) The savings from adjustments applied to the order viaadjustments
.void
setTotalFutureCredits
(javax.money.MonetaryAmount totalFutureCredits) The total future credits from adjustments applied across all areas of the order.void
setTotalSavings
(javax.money.MonetaryAmount totalSavings) The total savings from adjustments applied across all areas of the order.void
setVouchers
(List<Voucher> vouchers) TheVouchers
that this order is qualified for.toString()
-
Constructor Details
-
OrderResponse
public OrderResponse()
-
-
Method Details
-
getOrderNumber
The orderNumber corresponding to theOrder
that thisOrderResponse
represents. -
getAdjustedSubtotal
public javax.money.MonetaryAmount getAdjustedSubtotal()The subtotal of allorderItemResponses
with 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 allfulfillmentGroupResponses
with 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 allfulfillmentGroupResponses
with 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
TheFreeGiftItems
to add from the free gift offers.- Returns:
- the
FreeGiftItems
to add from the free gift offers
-
getVouchers
TheVouchers
that 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 theOrder
that thisOrderResponse
represents. -
setAdjustedSubtotal
public void setAdjustedSubtotal(javax.money.MonetaryAmount adjustedSubtotal) The subtotal of allorderItemResponses
with 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 allfulfillmentGroupResponses
with 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 allfulfillmentGroupResponses
with 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
TheFreeGiftItems
to add from the free gift offers.- Parameters:
freeGiftItems
- theFreeGiftItems
to add from the free gift offers
-
setVouchers
TheVouchers
that 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
-