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 boolean
boolean
Additional assortment of attributes that can be used for targeting by Offers.Identifier for this line item.int
The quantity of the item in the order.javax.money.MonetaryAmount
Sale price.Represents the details related to a sale recurring (or subscription) price include the terms.javax.money.MonetaryAmount
The one-time price typically discounted.Represents the details related to a recurring (or subscription) price include the terms.int
hashCode()
protected boolean
Helper method to determine if there is any kind of recurring price.boolean
Whether the item is discountable.boolean
Whether this is a subscription item and thus qualifies it for future billing discounts.void
setAttributes
(Map<String, Object> attributes) Additional assortment of attributes that can be used for targeting by Offers.void
setDiscountable
(boolean discountable) Whether the item is discountable.void
setLineNumber
(String lineNumber) Identifier for this line item.void
setQuantity
(int quantity) The quantity of the item in the order.void
setSalePrice
(javax.money.MonetaryAmount salePrice) Sale price.void
setSaleRecurringPrice
(RecurringPriceDetail saleRecurringPrice) Set the details related to a sale recurring (or subscription) price include the terms.void
setStandardPrice
(javax.money.MonetaryAmount standardPrice) The one-time price typically discounted.void
setStandardRecurringPrice
(RecurringPriceDetail standardRecurringPrice) Set the details related to a recurring (or subscription) price include the terms.void
setSubscription
(boolean isSubscription) Whether the item represents a subscription.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
-
LineItemDto
public LineItemDto()
-
-
Method Details
-
isSubscription
public boolean isSubscription()Description copied from interface:LineItem
Whether this is a subscription item and thus qualifies it for future billing discounts.- Specified by:
isSubscription
in 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:
getLineNumber
in interfaceLineItem
- Returns:
- The line number of this order item.
-
getStandardPrice
public javax.money.MonetaryAmount getStandardPrice()The one-time price typically discounted.- Specified by:
getStandardPrice
in 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:
getSalePrice
in 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:
getQuantity
in 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:
isDiscountable
in interfaceLineItem
- Returns:
- Whether this item may receive discounts
-
getStandardRecurringPrice
Description copied from interface:LineItem
Represents 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:
getStandardRecurringPrice
in 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:LineItem
Represents 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:
getSaleRecurringPrice
in 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:
getAttributes
in interfaceLineItem
- Returns:
- Additional, unspecified attributes
-
setLineNumber
Identifier for this line item.- Specified by:
setLineNumber
in 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:
setStandardPrice
in 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:
setSalePrice
in 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:
setQuantity
in 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:
setDiscountable
in 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 ifstandardRecurringPrice
orsaleRecurringPrice
are not null.- Specified by:
setSubscription
in interfaceLineItem
- Parameters:
isSubscription
- Whether this is a subscription item and thus qualifies it for future billing discounts.
-
setStandardRecurringPrice
Description copied from interface:LineItem
Set 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:
setStandardRecurringPrice
in 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:LineItem
Set 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:
setSaleRecurringPrice
in 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:
setAttributes
in interfaceLineItem
- Parameters:
attributes
- Additional, unspecified attributes.
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-