Class ItemResponseDetail<P extends ProratedItemOfferAdjustment>
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponseDetail<P>
- All Implemented Interfaces:
Serializable
public class ItemResponseDetail<P extends ProratedItemOfferAdjustment>
extends Object
implements Serializable
Collection of pricing details for an
ItemResponse.
When item discounting results in an item having multiple prices like in a buy-one-get-one free example, the item will get an additional ItemPriceDetail.
Generally, an item will have one ItemResponseDetail record for each uniquely priced
version of the item.
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanjavax.money.MonetaryAmountThe final price of this item with adjustments applied.intDeprecated.No longer valid as more than one subscription discount may be applied.intDeprecated.No longer valid as more than one subscription discount may be applied.javax.money.MonetaryAmountThe future credit savings acrossitemAdjustments, indicated byAdjustment.isFutureCredit().Adjustment information for this line item.Prorated adjustment information for this line item.intThe quantity of items that match this detail.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 allitemAdjustments.inthashCode()booleanWhether theitemAdjustmentsare applied to the sale price of the item.booleanWhether theitemAdjustmentsare applied to the sale recurring price of the item.booleanWhether aDefaultAdjustmentType.FREE_TRIALtype adjustment was applied.booleanvoidsetAdjustedTotal(javax.money.MonetaryAmount adjustedTotal) The final price of this item with adjustments applied.voidsetAppliedToSalePrice(boolean appliedToSalePrice) Whether theitemAdjustmentsare applied to the sale price of the item.voidsetAppliedToSaleRecurringPrice(boolean appliedToSaleRecurringPrice) Whether theitemAdjustmentsare applied to the sale recurring price of the item.voidsetBeginPeriod(int beginPeriod) Deprecated.No longer valid as more than one subscription discount may be applied.voidsetEndPeriod(int endPeriod) Deprecated.No longer valid as more than one subscription discount may be applied.voidsetFutureCreditSavings(javax.money.MonetaryAmount futureCreditSavings) The future credit savings acrossitemAdjustments, indicated byAdjustment.isFutureCredit().voidsetItemAdjustments(List<ItemAdjustment> itemAdjustments) Adjustment information for this line item.voidsetProratedItemAdjustments(List<P> proratedItemAdjustments) Prorated adjustment information for this line item.voidsetQuantity(int quantity) The quantity of items that match this detail.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 allitemAdjustments.toString()
-
Constructor Details
-
ItemResponseDetail
public ItemResponseDetail()
-
-
Method Details
-
isFreeTrialApplied
public boolean isFreeTrialApplied()Whether aDefaultAdjustmentType.FREE_TRIALtype adjustment was applied.- Returns:
- Whether a
DefaultAdjustmentType.FREE_TRIALtype adjustment was applied. - Since:
- Offer Client 2.0.2
-
isRecurringDiscountApplied
public boolean isRecurringDiscountApplied() -
getQuantity
public int getQuantity()The quantity of items that match this detail. -
getItemAdjustments
Adjustment information for this line item. -
getProratedItemAdjustments
Prorated adjustment information for this line item. SeeProratedItemOfferAdjustmentfor more info. -
isAppliedToSalePrice
public boolean isAppliedToSalePrice()Whether theitemAdjustmentsare applied to the sale price of the item. -
isAppliedToSaleRecurringPrice
public boolean isAppliedToSaleRecurringPrice()Whether theitemAdjustmentsare applied to the sale recurring price of the item.- Since:
- Offer Client 2.0.2
-
getSavings
public javax.money.MonetaryAmount getSavings()The total savings across allitemAdjustments. This does not includefutureCreditSavings. -
getFutureCreditSavings
public javax.money.MonetaryAmount getFutureCreditSavings()The future credit savings acrossitemAdjustments, indicated byAdjustment.isFutureCredit(). This does not include children item's future credits, usesavingsif desired. -
getRecurringSavings
public javax.money.MonetaryAmount getRecurringSavings()The savings to apply to recurring (a.k.a., subscription) prices.- Since:
- Offer Client 2.0.2
-
getAdjustedTotal
public javax.money.MonetaryAmount getAdjustedTotal()The 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
-
getBeginPeriod
Deprecated.No longer valid as more than one subscription discount may be applied. Users should look atItemAdjustmentinstead.The beginning period for which this detail should be applied. 1 refers to the first recurring billing period, and so on. This is only used for details that describe an adjustment related to an offer that is set to apply to future periods. -
getEndPeriod
Deprecated.No longer valid as more than one subscription discount may be applied. Users should look atItemAdjustmentinstead.The ending period for which this detail should be applied. 1 refers to the first recurring billing period, and so on. This is only used for details that describe an adjustment related to an offer that is set to apply to future periods. -
setQuantity
public void setQuantity(int quantity) The quantity of items that match this detail. -
setItemAdjustments
Adjustment information for this line item. -
setProratedItemAdjustments
Prorated adjustment information for this line item. SeeProratedItemOfferAdjustmentfor more info. -
setAppliedToSalePrice
public void setAppliedToSalePrice(boolean appliedToSalePrice) Whether theitemAdjustmentsare applied to the sale price of the item. -
setAppliedToSaleRecurringPrice
public void setAppliedToSaleRecurringPrice(boolean appliedToSaleRecurringPrice) Whether theitemAdjustmentsare applied to the sale recurring price of the item.- Since:
- Offer Client 2.0.2
-
setSavings
public void setSavings(javax.money.MonetaryAmount savings) The total savings across allitemAdjustments. This does not includefutureCreditSavings. -
setFutureCreditSavings
public void setFutureCreditSavings(javax.money.MonetaryAmount futureCreditSavings) The future credit savings acrossitemAdjustments, indicated byAdjustment.isFutureCredit(). This does not include children item's future credits, usesavingsif desired. -
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
-
setAdjustedTotal
public void setAdjustedTotal(javax.money.MonetaryAmount adjustedTotal) The 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
-
setBeginPeriod
Deprecated.No longer valid as more than one subscription discount may be applied. Users should look atItemAdjustmentinstead.The beginning period for which this detail should be applied. 1 refers to the first recurring billing period, and so on. This is only used for details that describe an adjustment related to an offer that is set to apply to future periods. -
setEndPeriod
Deprecated.No longer valid as more than one subscription discount may be applied. Users should look atItemAdjustmentinstead.The ending period for which this detail should be applied. 1 refers to the first recurring billing period, and so on. This is only used for details that describe an adjustment related to an offer that is set to apply to future periods. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-