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 boolean
boolean
javax.money.MonetaryAmount
The final price of this item with adjustments applied.int
Deprecated.No longer valid as more than one subscription discount may be applied.int
Deprecated.No longer valid as more than one subscription discount may be applied.javax.money.MonetaryAmount
The future credit savings acrossitemAdjustments
, indicated byAdjustment.isFutureCredit()
.Adjustment information for this line item.Prorated adjustment information for this line item.int
The quantity of items that match this detail.javax.money.MonetaryAmount
The final recurring (a.k.a., subscription) price of this item with adjustments applied.javax.money.MonetaryAmount
The savings to apply to recurring (a.k.a., subscription) prices.javax.money.MonetaryAmount
The total savings across allitemAdjustments
.int
hashCode()
boolean
Whether theitemAdjustments
are applied to the sale price of the item.boolean
Whether theitemAdjustments
are applied to the sale recurring price of the item.boolean
Whether aDefaultAdjustmentType.FREE_TRIAL
type adjustment was applied.boolean
void
setAdjustedTotal
(javax.money.MonetaryAmount adjustedTotal) The final price of this item with adjustments applied.void
setAppliedToSalePrice
(boolean appliedToSalePrice) Whether theitemAdjustments
are applied to the sale price of the item.void
setAppliedToSaleRecurringPrice
(boolean appliedToSaleRecurringPrice) Whether theitemAdjustments
are applied to the sale recurring price of the item.void
setBeginPeriod
(int beginPeriod) Deprecated.No longer valid as more than one subscription discount may be applied.void
setEndPeriod
(int endPeriod) Deprecated.No longer valid as more than one subscription discount may be applied.void
setFutureCreditSavings
(javax.money.MonetaryAmount futureCreditSavings) The future credit savings acrossitemAdjustments
, indicated byAdjustment.isFutureCredit()
.void
setItemAdjustments
(List<ItemAdjustment> itemAdjustments) Adjustment information for this line item.void
setProratedItemAdjustments
(List<P> proratedItemAdjustments) Prorated adjustment information for this line item.void
setQuantity
(int quantity) The quantity of items that match this detail.void
setRecurringAdjustedTotal
(javax.money.MonetaryAmount recurringAdjustedTotal) The final recurring (a.k.a., subscription) price of this item with adjustments applied.void
setRecurringSavings
(javax.money.MonetaryAmount recurringSavings) The savings to apply to recurring (a.k.a., subscription) prices.void
setSavings
(javax.money.MonetaryAmount savings) The total savings across allitemAdjustments
.toString()
-
Constructor Details
-
ItemResponseDetail
public ItemResponseDetail()
-
-
Method Details
-
isFreeTrialApplied
public boolean isFreeTrialApplied()Whether aDefaultAdjustmentType.FREE_TRIAL
type adjustment was applied.- Returns:
- Whether a
DefaultAdjustmentType.FREE_TRIAL
type 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. SeeProratedItemOfferAdjustment
for more info. -
isAppliedToSalePrice
public boolean isAppliedToSalePrice()Whether theitemAdjustments
are applied to the sale price of the item. -
isAppliedToSaleRecurringPrice
public boolean isAppliedToSaleRecurringPrice()Whether theitemAdjustments
are 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, usesavings
if 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 atItemAdjustment
instead.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 atItemAdjustment
instead.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. SeeProratedItemOfferAdjustment
for more info. -
setAppliedToSalePrice
public void setAppliedToSalePrice(boolean appliedToSalePrice) Whether theitemAdjustments
are applied to the sale price of the item. -
setAppliedToSaleRecurringPrice
public void setAppliedToSaleRecurringPrice(boolean appliedToSaleRecurringPrice) Whether theitemAdjustments
are 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, usesavings
if 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 atItemAdjustment
instead.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 atItemAdjustment
instead.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
-