Class EnhancedLineItem
java.lang.Object
com.broadleafcommerce.promotion.offer.web.context.EnhancedLineItem
- All Implemented Interfaces:
com.broadleafcommerce.promotion.offer.client.web.context.LineItem
,Serializable
- Direct Known Subclasses:
EnhancedFulfillmentLineItem
,EnhancedOrderLineItem
public class EnhancedLineItem
extends Object
implements com.broadleafcommerce.promotion.offer.client.web.context.LineItem, Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.money.MonetaryAmount
calculateTotalAdjustmentValue
(boolean useSaleAdjustments) javax.money.MonetaryAmount
calculateTotalWithAdjustments
(List<LineItemOfferDetail> details, boolean excludeDiscountedItemsFromTotal) This method can be used to pass in a list of previously computedLineItemOfferDetails
to produce an adjusted total.protected boolean
createNewDetail
(com.broadleafcommerce.common.extension.TypeFactory offerFactory, int quantity) Creates a newLineItemOfferDetail
for this item.boolean
void
SetsgetFinalPrice()
to theaverage price
and likewise forgetFinalRecurringPrice()
with theaverage recurring price
of each item, which includes adjustments.javax.money.MonetaryAmount
javax.money.MonetaryAmount
getAdjustedTotalWithoutFutureCredits
(boolean useSalePriceIfPresent) javax.money.MonetaryAmount
javax.money.MonetaryAmount
javax.money.CurrencyUnit
Returns "ANY" for null or empty string segments; otherwise, returns the value of #getSegment.List<com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponseDetail<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment>>
DTOs containing information aboutoffers
applicable to this item that were populated from an external source/service.javax.money.MonetaryAmount
The final price, including adjustments, for a single merchandising item represented by this order line item.javax.money.MonetaryAmount
The final recurring (a.k.a., subscription) price, including adjustments, for a single merchandising item represented by this order line item.javax.money.MonetaryAmount
javax.money.MonetaryAmount
javax.money.MonetaryAmount
javax.money.MonetaryAmount
getId()
DTOs containing information aboutoffers
applicable to this item.ReturnisOnSale()
as a Boolean for use in rule builders.javax.money.MonetaryAmount
getPrice
(boolean useSalePrice) Convenience method to get either thegetSalePrice()
orgetStandardPrice()
depending on the flag.javax.money.MonetaryAmount
getPriceWithRecurring
(boolean useSalePrice) Gets the price (standard or sale) without adjustments, with recurring (standard or sale).List<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment>
Prorated offer adjustment information for this line item.int
com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail
Returns thesaleRecurringPrice
if present or else thestandardRecurringPrice
.com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail
getRecurringPrice
(boolean useSalePrice) javax.money.MonetaryAmount
javax.money.MonetaryAmount
javax.money.MonetaryAmount
Determines the combined sale price without adjustments with recurring.com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail
Segments can be used to restrict offers.javax.money.MonetaryAmount
javax.money.MonetaryAmount
Determines the combined standard price without adjustments with recurring.com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail
javax.money.MonetaryAmount
Gets the total combined price of this order item, including any adjustments.javax.money.MonetaryAmount
javax.money.MonetaryAmount
getTotalPriceWithoutAdjustments
(boolean useSalePriceIfPresent) javax.money.MonetaryAmount
getTotalRecurringForAYearOrNullIfNone
(boolean useSalePrice) Calculates the recurring price multiplied by the number of recurring periods in a year.javax.money.MonetaryAmount
Gets the total combined recurring (a.k.a., subscription) price of this order item, including any adjustments.javax.money.MonetaryAmount
Calculates the sale recurring price multiplied by the number of recurring periods in a year.javax.money.MonetaryAmount
Determines the total standard price without adjustments.javax.money.MonetaryAmount
Calculates the standard recurring price multiplied by the number of recurring periods in a year.javax.money.MonetaryAmount
javax.money.MonetaryAmount
boolean
int
hashCode()
boolean
Helper method to determine if there is any kind of recurring price.boolean
boolean
void
initializePriceDetails
(com.broadleafcommerce.common.extension.TypeFactory offerFactory) Ensures that anLineItemOfferDetail
is present so that the offer engine engages correctly.boolean
Whether this item is an Add-on/dependant type, that is, an item that cannot be sold or fulfilled on its own but as a child of another item.boolean
Returnstrue
if the line item has external offer details set or if it is discountable, andfalse
if both conditions are false.boolean
Whether aDefaultAdjustmentType.FREE_TRIAL
type adjustment was applied.boolean
isOnSale()
boolean
Takes into account whether there is astandardRecurringPrice
as well as the explicitisSubscription
flag.protected void
mergeDetails
(LineItemOfferDetail firstDetail, LineItemOfferDetail secondDetail) void
Merges any priceDetails that share the same orderAdjustments.void
Removes allLineItemOfferDetails
except the first, which just gets reset.void
resetPriceDetails
(com.broadleafcommerce.common.extension.TypeFactory offerFactory) Clears allofferDetails
and re-initializes them.void
setAttributes
(Map<String, Object> attributes) void
setCurrency
(javax.money.CurrencyUnit currency) void
setDiscountable
(boolean discountable) void
setExternalOfferDetails
(List<com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponseDetail<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment>> externalOfferDetails) DTOs containing information aboutoffers
applicable to this item that were populated from an external source/service.void
setFinalPrice
(javax.money.MonetaryAmount finalPrice) The final price, including adjustments, for a single merchandising item represented by this order line item.void
setFinalRecurringPrice
(javax.money.MonetaryAmount finalRecurringPrice) The final recurring (a.k.a., subscription) price, including adjustments, for a single merchandising item represented by this order line item.void
setFulfillmentGroupRef
(String fulfillmentGroupRef) void
setFulfillmentPrice
(javax.money.MonetaryAmount fulfillmentPrice) void
Matches the line number unless the line number isn't available in which case it will represent a uuid.void
setLineNumber
(String lineNumber) void
setOfferDetails
(List<LineItemOfferDetail> offerDetails) DTOs containing information aboutoffers
applicable to this item.void
setProratedAdjustments
(List<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment> proratedAdjustments) Prorated offer adjustment information for this line item.void
setQuantity
(int quantity) void
setSalePrice
(javax.money.MonetaryAmount salePrice) void
setSaleRecurringPrice
(com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail saleRecurringPrice) void
setSegment
(String segment) Segments can be used to restrict offers.void
setStandardPrice
(javax.money.MonetaryAmount standardPrice) void
setStandardRecurringPrice
(com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail standardRecurringPrice) void
setSubscription
(boolean isSubscription) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.promotion.offer.client.web.context.LineItem
getServiceLevel
-
Constructor Details
-
EnhancedLineItem
public EnhancedLineItem()
-
-
Method Details
-
isSubscription
public boolean isSubscription()Takes into account whether there is astandardRecurringPrice
as well as the explicitisSubscription
flag.- Specified by:
isSubscription
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
- Returns:
- Whether this item is a subscription or has a recurring price.
-
hasRecurringPrice
public boolean hasRecurringPrice()Helper method to determine if there is any kind of recurring price.- Returns:
- Whether there is any kind of recurring price.
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
hasSaleRecurringPrice
public boolean hasSaleRecurringPrice() -
hasStandardRecurringPrice
public boolean hasStandardRecurringPrice() -
getUnadjustedSalePrice
public javax.money.MonetaryAmount getUnadjustedSalePrice()- Returns:
- the
getSalePrice()
if present with no adjustments, otherwise thegetStandardPrice()
.
-
getTotalStandardPrice
public javax.money.MonetaryAmount getTotalStandardPrice()Determines the total standard price without adjustments. By default, this takesgetStandardPriceWithRecurring()
and multiplies it bygetQuantity()
.- Returns:
- Standard price with recurring multiplied by
getQuantity()
.
-
getStandardPriceWithRecurring
public javax.money.MonetaryAmount getStandardPriceWithRecurring()Determines the combined standard price without adjustments with recurring. By default, this is thestandardPrice
. If there is astandardRecurringPrice
, it is included as well. Moreover, the recurring price will be multiplied by thenumber of periods in a year
to allow normalized comparison of offer values between recurring and upfront discounts.- Returns:
- The combined standard price without adjustments with recurring.
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
getTotalRecurringForAYearOrNullIfNone
@Nullable public javax.money.MonetaryAmount getTotalRecurringForAYearOrNullIfNone(boolean useSalePrice) Calculates the recurring price multiplied by the number of recurring periods in a year. Nullable if not a subscription item.- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
getTotalStandardRecurringForAYear
@Nullable public javax.money.MonetaryAmount getTotalStandardRecurringForAYear()Calculates the standard recurring price multiplied by the number of recurring periods in a year. Nullable if not a subscription item.- Since:
- Offer Service 3.1.0, Release Train 2.2.0
- See Also:
-
getSalePriceWithRecurring
public javax.money.MonetaryAmount getSalePriceWithRecurring()Determines the combined sale price without adjustments with recurring. By default, this is thesalePrice
. If there is asaleRecurringPrice
, it is included as well. Moreover, the recurring price will be multiplied by thenumber of periods in a year
to allow normalized comparison of offer values between recurring and upfront discounts.- Returns:
- The combined sale price without adjustments with recurring.
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
getTotalSaleRecurringForAYear
@Nullable public javax.money.MonetaryAmount getTotalSaleRecurringForAYear()Calculates the sale recurring price multiplied by the number of recurring periods in a year. Nullable if not a subscription item or no sale price.- Since:
- Offer Service 3.1.0, Release Train 2.2.0
- See Also:
-
getPrice
public javax.money.MonetaryAmount getPrice(boolean useSalePrice) Convenience method to get either thegetSalePrice()
orgetStandardPrice()
depending on the flag. IfsalePrice == null
, then returnsgetStandardPrice()
no matter the value of the flag.- Parameters:
useSalePrice
- whether to returngetSalePrice()
if it exists orgetStandardPrice()
()}- Returns:
- either the
getSalePrice()
orgetStandardPrice()
depending on the flag
-
getPriceWithRecurring
public javax.money.MonetaryAmount getPriceWithRecurring(boolean useSalePrice) Gets the price (standard or sale) without adjustments, with recurring (standard or sale). By default, this makes use ofgetSalePriceWithRecurring()
orgetStandardPriceWithRecurring()
as appropriate.- Parameters:
useSalePrice
- Whether to use the sale price if present.- Returns:
- The price (standard or sale) without adjustments, with recurring (standard or sale)
-
getRecurringPrice
public com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail getRecurringPrice(boolean useSalePrice) -
isDependent
public boolean isDependent()Whether this item is an Add-on/dependant type, that is, an item that cannot be sold or fulfilled on its own but as a child of another item. By default, this looks for an attribute called"itemType"
with a value of"addOn"
. It also checks for the present of a"merchandisingContext"
attribute, although this is not guaranteed to be set.- Returns:
- Whether this item is an Add-on/dependant type
-
calculateTotalWithAdjustmentsAsDouble
-
calculateTotalWithAdjustments
public javax.money.MonetaryAmount calculateTotalWithAdjustments()- Returns:
- the item total including all
LineItemOfferDetail.getAdjustments()
.
-
calculateTotalWithAdjustments
public AmountQtyTuple calculateTotalWithAdjustments(List<LineItemOfferDetail> details, boolean excludeDiscountedItemsFromTotal) This method can be used to pass in a list of previously computedLineItemOfferDetails
to produce an adjusted total. Pass in true for the second parameter to exclude items with discounted quantities from the total.- Parameters:
details
-excludeDiscountedItemsFromTotal
-- Returns:
-
isOnSale
public boolean isOnSale()- Returns:
- whether this item has a sale price and that it is less than the standard price
-
getOnSale
ReturnisOnSale()
as a Boolean for use in rule builders.- Returns:
-
resetPriceDetails
public void resetPriceDetails(@NonNull com.broadleafcommerce.common.extension.TypeFactory offerFactory) Clears allofferDetails
and re-initializes them.- Parameters:
offerFactory
- theTypeFactory
to use to create any newLineItemOfferDetails
during re-initialization.
-
initializePriceDetails
public void initializePriceDetails(@NonNull com.broadleafcommerce.common.extension.TypeFactory offerFactory) Ensures that anLineItemOfferDetail
is present so that the offer engine engages correctly.- Parameters:
offerFactory
- theTypeFactory
to use to create a newLineItemOfferDetail
-
createNewDetail
public LineItemOfferDetail createNewDetail(@NonNull com.broadleafcommerce.common.extension.TypeFactory offerFactory, int quantity) Creates a newLineItemOfferDetail
for this item.- Parameters:
offerFactory
- theTypeFactory
to use to create any newLineItemOfferDetails
quantity
- the item quantity to associate with the new detail- Returns:
- the new
LineItemOfferDetail
-
mergeLikeDetails
public void mergeLikeDetails()Merges any priceDetails that share the same orderAdjustments. -
getFinalTotalAdjustmentValue
public javax.money.MonetaryAmount getFinalTotalAdjustmentValue()- Returns:
- the total of all
adjustments
not including dependent items
-
getFutureCreditAdjustmentValue
public javax.money.MonetaryAmount getFutureCreditAdjustmentValue() -
calculateTotalAdjustmentValue
public javax.money.MonetaryAmount calculateTotalAdjustmentValue(boolean useSaleAdjustments) -
resetOfferDetails
public void resetOfferDetails()Removes allLineItemOfferDetails
except the first, which just gets reset. -
finalizePrice
public void finalizePrice()SetsgetFinalPrice()
to theaverage price
and likewise forgetFinalRecurringPrice()
with theaverage recurring price
of each item, which includes adjustments. -
getAveragePrice
public javax.money.MonetaryAmount getAveragePrice()- Returns:
- the total combined price of this order item, including any orderAdjustments but not
dependent items, divided by
getQuantity()
.
-
getAverageRecurringPrice
public javax.money.MonetaryAmount getAverageRecurringPrice()- Returns:
- the total combined price of this order item, including any orderAdjustments but not
dependent items, divided by
getQuantity()
.
-
getTotalPriceWithoutAdjustments
public javax.money.MonetaryAmount getTotalPriceWithoutAdjustments()- Returns:
- the price without adjustments multiplied by the quantity of items, using the sale price if present.
-
getTotalPriceWithoutAdjustments
public javax.money.MonetaryAmount getTotalPriceWithoutAdjustments(boolean useSalePriceIfPresent) -
getUnitPriceWithoutAdjustments
public javax.money.MonetaryAmount getUnitPriceWithoutAdjustments()- Returns:
- the unit price without adjustments without multiplying it by the quantity using the sale price if present.
-
getTotalPrice
public javax.money.MonetaryAmount getTotalPrice()Gets the total combined price of this order item, including any adjustments.- Returns:
- the total combined price of this order item, including any adjustments.
-
getTotalRecurringPrice
public javax.money.MonetaryAmount getTotalRecurringPrice()Gets the total combined recurring (a.k.a., subscription) price of this order item, including any adjustments.- Returns:
- the total combined recurring price of this order item, including any adjustments.
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
getRecurringPrice
@Nullable public com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail getRecurringPrice()Returns thesaleRecurringPrice
if present or else thestandardRecurringPrice
.- Returns:
- The
saleRecurringPrice
if present or else thestandardRecurringPrice
. - Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
isFreeTrialApplied
public boolean isFreeTrialApplied()Whether aDefaultAdjustmentType.FREE_TRIAL
type adjustment was applied.- Returns:
- Whether a
DefaultAdjustmentType.FREE_TRIAL
type adjustment was applied. - Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
mergeDetails
-
getFutureCredits
public javax.money.MonetaryAmount getFutureCredits() -
getRecurringSavings
public javax.money.MonetaryAmount getRecurringSavings() -
getAdjustedTotalWithoutFutureCredits
public javax.money.MonetaryAmount getAdjustedTotalWithoutFutureCredits() -
getAdjustedTotalWithoutFutureCredits
public javax.money.MonetaryAmount getAdjustedTotalWithoutFutureCredits(boolean useSalePriceIfPresent) -
getId
-
hasAdjustments
public boolean hasAdjustments() -
getEffectiveSegment
Returns "ANY" for null or empty string segments; otherwise, returns the value of #getSegment.- Returns:
- the effective segment
-
isDiscountable
public boolean isDiscountable()Returnstrue
if the line item has external offer details set or if it is discountable, andfalse
if both conditions are false.- Specified by:
isDiscountable
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
- Returns:
- whether the line item is discountable or not
-
getCurrency
public javax.money.CurrencyUnit getCurrency() -
getLineNumber
- Specified by:
getLineNumber
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
getStandardPrice
public javax.money.MonetaryAmount getStandardPrice()- Specified by:
getStandardPrice
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
getSalePrice
public javax.money.MonetaryAmount getSalePrice()- Specified by:
getSalePrice
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
getFulfillmentPrice
public javax.money.MonetaryAmount getFulfillmentPrice() -
getStandardRecurringPrice
public com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail getStandardRecurringPrice()- Specified by:
getStandardRecurringPrice
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
- See Also:
-
LineItem.getStandardRecurringPrice()
-
getSaleRecurringPrice
public com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail getSaleRecurringPrice()- Specified by:
getSaleRecurringPrice
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
- See Also:
-
LineItem.getSaleRecurringPrice()
-
getQuantity
public int getQuantity()- Specified by:
getQuantity
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
getAttributes
- Specified by:
getAttributes
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
getSegment
Segments can be used to restrict offers. Common examples include segmenting an order by vendor or by store (a.k.a. banner).For applications that do not use segments at all, this value can be left null or set to ANY.
The method getEffectiveSegment() will convert null or empty string to "ANY"
This field works with the
Offer.getSegment()
- See Also:
-
getFulfillmentGroupRef
-
getFinalPrice
public javax.money.MonetaryAmount getFinalPrice()The final price, including adjustments, for a single merchandising item represented by this order line item.- Returns:
- The final price, including adjustments, for a single merchandising item represented by this order line item.
-
getFinalRecurringPrice
public javax.money.MonetaryAmount getFinalRecurringPrice()The final recurring (a.k.a., subscription) price, including adjustments, for a single merchandising item represented by this order line item.- Returns:
- The final recurring price, including adjustments, for a single merchandising item represented by this order line item.
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
getOfferDetails
DTOs containing information aboutoffers
applicable to this item.- Returns:
- DTOs containing information about
offers
applicable to this item.
-
getProratedAdjustments
public List<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment> getProratedAdjustments()Prorated offer adjustment information for this line item.This is typically used to communicate the adjustments prorated to this item from order-level or fulfillment group-level offer adjustments.
- Returns:
- DTOs containing prorated offer adjustment information for this line item
-
getExternalOfferDetails
public List<com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponseDetail<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment>> getExternalOfferDetails()DTOs containing information aboutoffers
applicable to this item that were populated from an external source/service.- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) -
setLineNumber
- Specified by:
setLineNumber
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
setStandardPrice
public void setStandardPrice(javax.money.MonetaryAmount standardPrice) - Specified by:
setStandardPrice
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
setSalePrice
public void setSalePrice(javax.money.MonetaryAmount salePrice) - Specified by:
setSalePrice
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
setFulfillmentPrice
public void setFulfillmentPrice(javax.money.MonetaryAmount fulfillmentPrice) -
setStandardRecurringPrice
public void setStandardRecurringPrice(com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail standardRecurringPrice) - Specified by:
setStandardRecurringPrice
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
- See Also:
-
LineItem.getStandardRecurringPrice()
-
setSaleRecurringPrice
public void setSaleRecurringPrice(com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail saleRecurringPrice) - Specified by:
setSaleRecurringPrice
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
- Since:
- Offer Service 3.1.0, Release Train 2.2.0
- See Also:
-
LineItem.getSaleRecurringPrice()
-
setQuantity
public void setQuantity(int quantity) - Specified by:
setQuantity
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
setDiscountable
public void setDiscountable(boolean discountable) - Specified by:
setDiscountable
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
setSubscription
public void setSubscription(boolean isSubscription) - Specified by:
setSubscription
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
setAttributes
- Specified by:
setAttributes
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.LineItem
-
setSegment
Segments can be used to restrict offers. Common examples include segmenting an order by vendor or by store (a.k.a. banner).For applications that do not use segments at all, this value can be left null or set to ANY.
The method getEffectiveSegment() will convert null or empty string to "ANY"
This field works with the
Offer.getSegment()
- See Also:
-
setFulfillmentGroupRef
-
setFinalPrice
public void setFinalPrice(javax.money.MonetaryAmount finalPrice) The final price, including adjustments, for a single merchandising item represented by this order line item.- Parameters:
finalPrice
- The final price, including adjustments, for a single merchandising item represented by this order line item.
-
setFinalRecurringPrice
public void setFinalRecurringPrice(javax.money.MonetaryAmount finalRecurringPrice) The final recurring (a.k.a., subscription) price, including adjustments, for a single merchandising item represented by this order line item.- Parameters:
finalPrice
- The final recurring price, including adjustments, for a single merchandising item represented by this order line item.- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
setOfferDetails
DTOs containing information aboutoffers
applicable to this item.- Parameters:
offerDetails
- DTOs containing information aboutoffers
applicable to this item.
-
setProratedAdjustments
public void setProratedAdjustments(List<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment> proratedAdjustments) Prorated offer adjustment information for this line item.This is typically used to communicate the adjustments prorated to this item from order-level or fulfillment group-level offer adjustments.
- Parameters:
proratedAdjustments
- DTOs containing prorated offer adjustment information for this line item
-
setId
Matches the line number unless the line number isn't available in which case it will represent a uuid. -
setExternalOfferDetails
public void setExternalOfferDetails(List<com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponseDetail<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment>> externalOfferDetails) DTOs containing information aboutoffers
applicable to this item that were populated from an external source/service.- Since:
- Offer Service 3.1.0, Release Train 2.2.0
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-