Class LineItemDto
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.LineItemDto
- All Implemented Interfaces:
LineItem,Serializable
- Direct Known Subclasses:
FulfillmentLineItemDto,OrderLineItemDto
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAdditional assortment of attributes that can be used for targeting by Offers.Identifier for this line item.intThe quantity of the item in the order.javax.money.MonetaryAmountSale price.Represents the details related to a sale recurring (or subscription) price include the terms.javax.money.MonetaryAmountThe one-time price typically discounted.Represents the details related to a recurring (or subscription) price include the terms.inthashCode()protected booleanHelper method to determine if there is any kind of recurring price.booleanWhether the item is discountable.booleanWhether this is a subscription item and thus qualifies it for future billing discounts.voidsetAttributes(Map<String, Object> attributes) Additional assortment of attributes that can be used for targeting by Offers.voidsetDiscountable(boolean discountable) Whether the item is discountable.voidsetLineNumber(String lineNumber) Identifier for this line item.voidsetQuantity(int quantity) The quantity of the item in the order.voidsetSalePrice(javax.money.MonetaryAmount salePrice) Sale price.voidsetSaleRecurringPrice(RecurringPriceDetail saleRecurringPrice) Set the details related to a sale recurring (or subscription) price include the terms.voidsetStandardPrice(javax.money.MonetaryAmount standardPrice) The one-time price typically discounted.voidsetStandardRecurringPrice(RecurringPriceDetail standardRecurringPrice) Set the details related to a recurring (or subscription) price include the terms.voidsetSubscription(boolean isSubscription) Whether the item represents a subscription.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.promotion.offer.client.web.context.LineItem
getServiceLevel
-
Constructor Details
-
LineItemDto
public LineItemDto()
-
-
Method Details
-
isSubscription
public boolean isSubscription()Description copied from interface:LineItemWhether this is a subscription item and thus qualifies it for future billing discounts.- Specified by:
isSubscriptionin interfaceLineItem- Returns:
- Whether this is a subscription item and thus qualifies it for future billing discounts.
-
hasRecurringPrice
protected 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 Client 2.0.2
-
getLineNumber
Identifier for this line item.- Specified by:
getLineNumberin interfaceLineItem- Returns:
- The line number of this order item.
-
getStandardPrice
public javax.money.MonetaryAmount getStandardPrice()The one-time price typically discounted.- Specified by:
getStandardPricein interfaceLineItem- Returns:
- The standard price at which this item is sold or fulfilled.
-
getSalePrice
public javax.money.MonetaryAmount getSalePrice()Sale price. Often not discountable.- Specified by:
getSalePricein interfaceLineItem- Returns:
- Special price at which to sell or fulfill this item.
-
getQuantity
public int getQuantity()The quantity of the item in the order.- Specified by:
getQuantityin interfaceLineItem- Returns:
- Number of like merchandising items being sold or fulfilled together in this order.
-
isDiscountable
public boolean isDiscountable()Whether the item is discountable.- Specified by:
isDiscountablein interfaceLineItem- Returns:
- Whether this item may receive discounts
-
getStandardRecurringPrice
Description copied from interface:LineItemRepresents the details related to a recurring (or subscription) price include the terms. This should come from the same source asLineItem.getStandardPrice(), and, consequently,LineItem.getStandardPrice()should not be null even if there is no upfront price, e.g., it should be zero in that case. This method is supported with ReleaseTrain 2.2.0 and beyond with a default implementation that returns null for backward compatibility.- Specified by:
getStandardRecurringPricein interfaceLineItem- Returns:
- The details related to a recurring (or subscription) price include the terms.
- Since:
- Offer Client 2.0.2
- See Also:
-
getSaleRecurringPrice
Description copied from interface:LineItemRepresents the details related to a sale recurring (or subscription) price include the terms. This should come from the same source asLineItem.getSalePrice(), and, consequently,LineItem.getSalePrice()should not be null even if there is no upfront price, e.g., it should be zero in that case. This method is supported with ReleaseTrain 2.2.0 and beyond with a default implementation that returns null for backward compatibility.- Specified by:
getSaleRecurringPricein interfaceLineItem- Returns:
- The details related to a recurring (or subscription) price include the terms.
- Since:
- Offer Client 2.0.2
- See Also:
-
getAttributes
Additional assortment of attributes that can be used for targeting by Offers.- Specified by:
getAttributesin interfaceLineItem- Returns:
- Additional, unspecified attributes
-
setLineNumber
Identifier for this line item.- Specified by:
setLineNumberin interfaceLineItem- Parameters:
lineNumber- The line number of this order item.
-
setStandardPrice
public void setStandardPrice(javax.money.MonetaryAmount standardPrice) The one-time price typically discounted.- Specified by:
setStandardPricein interfaceLineItem- Parameters:
standardPrice- The standard price at which this item is sold or fulfilled.
-
setSalePrice
public void setSalePrice(javax.money.MonetaryAmount salePrice) Sale price. Often not discountable.- Specified by:
setSalePricein interfaceLineItem- Parameters:
salePrice- Special price at which to sell or fulfill this item.
-
setQuantity
public void setQuantity(int quantity) The quantity of the item in the order.- Specified by:
setQuantityin interfaceLineItem- Parameters:
quantity- Number of like merchandising items being sold or fulfilled together in this order.
-
setDiscountable
public void setDiscountable(boolean discountable) Whether the item is discountable.- Specified by:
setDiscountablein interfaceLineItem- Parameters:
discountable- Whether this item may receive discounts.
-
setSubscription
public void setSubscription(boolean isSubscription) Whether the item represents a subscription. This should be true ifstandardRecurringPriceorsaleRecurringPriceare not null.- Specified by:
setSubscriptionin interfaceLineItem- Parameters:
isSubscription- Whether this is a subscription item and thus qualifies it for future billing discounts.
-
setStandardRecurringPrice
Description copied from interface:LineItemSet the details related to a recurring (or subscription) price include the terms. This method is supported with ReleaseTrain 2.2.0 and beyond with an empty default implementation for backward compatibility.- Specified by:
setStandardRecurringPricein interfaceLineItem- Parameters:
standardRecurringPrice- The details related to a recurring (or subscription) price include the terms.- Since:
- Offer Client 2.0.2
- See Also:
-
setSaleRecurringPrice
Description copied from interface:LineItemSet the details related to a sale recurring (or subscription) price include the terms. This method is supported with ReleaseTrain 2.2.0 and beyond with an empty default implementation for backward compatibility.- Specified by:
setSaleRecurringPricein interfaceLineItem- Parameters:
saleRecurringPrice- The details related to a recurring (or subscription) price include the terms.- Since:
- Offer Client 2.0.2
- See Also:
-
setAttributes
Additional assortment of attributes that can be used for targeting by Offers.- Specified by:
setAttributesin interfaceLineItem- Parameters:
attributes- Additional, unspecified attributes.
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-