Class ItemResponse<P extends ProratedItemOfferAdjustment>
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<P>
- All Implemented Interfaces:
Serializable
public class ItemResponse<P extends ProratedItemOfferAdjustment>
extends Object
implements Serializable
A DTO structure that provides pricing information for a given
LineItem via offer
adjustments. These adjustments are 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 final price of this item with adjustments applied.javax.money.MonetaryAmountThe original unadjusted price for each item.The original unadjusted recurring price for each item used for discount calculations.javax.money.MonetaryAmountThe future credit savings acrossitemResponseDetails, indicated byAdjustment.isFutureCredit().The id for theLineItemthat thisItemResponserepresents.Detailed pricing information for this item.Prorated adjustment information for this line item.intThe total quantity across all price variations of this item.javax.money.MonetaryAmountThe final recurring (a.k.a., subscription) price of this item with adjustments applied.javax.money.MonetaryAmountThe savings to apply to recurring (a.k.a., subscription) prices.javax.money.MonetaryAmountThe total savings across allitemResponseDetails.inthashCode()booleanWhether the sale price or the standard price was adjusted.booleanWhether the sale recurring price or the standard recurring price was adjusted.booleanWhether a free trial offer was applied.voidsetAdjustedTotal(javax.money.MonetaryAmount adjustedTotal) The total final price of this item with adjustments applied.voidsetAppliedToSalePrice(boolean appliedToSalePrice) Whether the sale price or the standard price was adjusted.voidsetAppliedToSaleRecurringPrice(boolean appliedToSaleRecurringPrice) Whether the sale recurring price or the standard recurring price was adjusted.voidsetBasePricePerItem(javax.money.MonetaryAmount basePricePerItem) The original unadjusted price for each item.voidsetBaseRecurringPricePerItem(RecurringPriceDetail baseRecurringPricePerItem) The original unadjusted recurring price for each item used for discount calculations.voidsetFreeTrialApplied(boolean freeTrialApplied) Whether a free trial offer was applied.voidsetFutureCreditSavings(javax.money.MonetaryAmount futureCreditSavings) The future credit savings acrossitemResponseDetails, indicated byAdjustment.isFutureCredit().voidThe id for theLineItemthat thisItemResponserepresents.voidsetItemResponseDetails(List<ItemResponseDetail<P>> itemResponseDetails) Detailed pricing information for this item.voidsetProratedAdjustments(List<ProratedOfferAdjustment> proratedAdjustments) Prorated adjustment information for this line item.voidsetQuantity(int quantity) The total quantity across all price variations of this item.voidsetRecurringAdjustedTotal(javax.money.MonetaryAmount recurringAdjustedTotal) The final recurring (a.k.a., subscription) price of this item with adjustments applied.voidsetRecurringSavings(javax.money.MonetaryAmount recurringSavings) The savings to apply to recurring (a.k.a., subscription) prices.voidsetSavings(javax.money.MonetaryAmount savings) The total savings across allitemResponseDetails.toString()
-
Constructor Details
-
ItemResponse
public ItemResponse()
-
-
Method Details
-
getItemId
The id for theLineItemthat thisItemResponserepresents. -
getItemResponseDetails
Detailed pricing information for this item. SeeItemResponseDetailfor more info. -
getProratedAdjustments
Prorated adjustment information for this line item. The prorated adjustments typically come from order or fulfillment group level offers. -
getBasePricePerItem
public javax.money.MonetaryAmount getBasePricePerItem()The original unadjusted price for each item. -
getBaseRecurringPricePerItem
The original unadjusted recurring price for each item used for discount calculations.- Since:
- Offer Client 2.0.2
-
isAppliedToSalePrice
public boolean isAppliedToSalePrice()Whether the sale price or the standard price was adjusted.- Since:
- Offer Client 2.0.2
-
isAppliedToSaleRecurringPrice
public boolean isAppliedToSaleRecurringPrice()Whether the sale recurring price or the standard recurring price was adjusted.- Since:
- Offer Client 2.0.2
-
getQuantity
public int getQuantity()The total quantity across all price variations of this item. -
getSavings
public javax.money.MonetaryAmount getSavings()The total savings across allitemResponseDetails. This does not includefutureCreditSavings. -
getAdjustedTotal
public javax.money.MonetaryAmount getAdjustedTotal()The total final price of this item with adjustments applied. -
getRecurringAdjustedTotal
public javax.money.MonetaryAmount getRecurringAdjustedTotal()The final recurring (a.k.a., subscription) price of this item with adjustments applied.- Since:
- Offer Client 2.0.2
-
getFutureCreditSavings
public javax.money.MonetaryAmount getFutureCreditSavings()The future credit savings acrossitemResponseDetails, indicated byAdjustment.isFutureCredit(). -
getRecurringSavings
public javax.money.MonetaryAmount getRecurringSavings()The savings to apply to recurring (a.k.a., subscription) prices.- Since:
- Offer Client 2.0.2
-
isFreeTrialApplied
public boolean isFreeTrialApplied()Whether a free trial offer was applied.- Since:
- Offer Client 2.0.2
-
setItemId
The id for theLineItemthat thisItemResponserepresents. -
setItemResponseDetails
Detailed pricing information for this item. SeeItemResponseDetailfor more info. -
setProratedAdjustments
Prorated adjustment information for this line item. The prorated adjustments typically come from order or fulfillment group level offers. -
setBasePricePerItem
public void setBasePricePerItem(javax.money.MonetaryAmount basePricePerItem) The original unadjusted price for each item. -
setBaseRecurringPricePerItem
The original unadjusted recurring price for each item used for discount calculations.- Since:
- Offer Client 2.0.2
-
setAppliedToSalePrice
public void setAppliedToSalePrice(boolean appliedToSalePrice) Whether the sale price or the standard price was adjusted.- Since:
- Offer Client 2.0.2
-
setAppliedToSaleRecurringPrice
public void setAppliedToSaleRecurringPrice(boolean appliedToSaleRecurringPrice) Whether the sale recurring price or the standard recurring price was adjusted.- Since:
- Offer Client 2.0.2
-
setQuantity
public void setQuantity(int quantity) The total quantity across all price variations of this item. -
setSavings
public void setSavings(javax.money.MonetaryAmount savings) The total savings across allitemResponseDetails. This does not includefutureCreditSavings. -
setAdjustedTotal
public void setAdjustedTotal(javax.money.MonetaryAmount adjustedTotal) The total final price of this item with adjustments applied. -
setRecurringAdjustedTotal
public void setRecurringAdjustedTotal(javax.money.MonetaryAmount recurringAdjustedTotal) The final recurring (a.k.a., subscription) price of this item with adjustments applied.- Since:
- Offer Client 2.0.2
-
setFutureCreditSavings
public void setFutureCreditSavings(javax.money.MonetaryAmount futureCreditSavings) The future credit savings acrossitemResponseDetails, indicated byAdjustment.isFutureCredit(). -
setRecurringSavings
public void setRecurringSavings(javax.money.MonetaryAmount recurringSavings) The savings to apply to recurring (a.k.a., subscription) prices.- Since:
- Offer Client 2.0.2
-
setFreeTrialApplied
public void setFreeTrialApplied(boolean freeTrialApplied) Whether a free trial offer was applied.- Since:
- Offer Client 2.0.2
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-