Class LineItemDTO
java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.marketing.LineItemDTO
- All Implemented Interfaces:
Serializable
A DTO representing an order's line item. Used by the
ExternalOfferProvider to retrieve
MarketingMessages associated with a set of products.- Author:
- Jon Fleschler (jfleschler)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLineItemDTO(String lineNumber, javax.money.MonetaryAmount standardPrice, javax.money.MonetaryAmount salePrice, int quantity, com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail standardRecurringPrice, com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail saleRecurringPrice, Map<String, Object> attributes) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAll additional attributes associated with the line itemThe line number of the item.intThe quantity that this line item representsjavax.money.MonetaryAmountAny sale price associated with the line itemcom.broadleafcommerce.pricing.client.domain.RecurringPriceDetailRepresents the details related to a recurring (or subscription) price include the terms.javax.money.MonetaryAmountThe base price of the line itemcom.broadleafcommerce.pricing.client.domain.RecurringPriceDetailRepresents the details related to a recurring (or subscription) price include the terms.inthashCode()voidsetAttributes(Map<String, Object> attributes) All additional attributes associated with the line itemvoidsetLineNumber(String lineNumber) The line number of the item.voidsetQuantity(int quantity) The quantity that this line item representsvoidsetSalePrice(javax.money.MonetaryAmount salePrice) Any sale price associated with the line itemvoidsetSaleRecurringPrice(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail saleRecurringPrice) Represents the details related to a recurring (or subscription) price include the terms.voidsetStandardPrice(javax.money.MonetaryAmount standardPrice) The base price of the line itemvoidsetStandardRecurringPrice(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail standardRecurringPrice) Represents the details related to a recurring (or subscription) price include the terms.toString()
-
Constructor Details
-
LineItemDTO
public LineItemDTO() -
LineItemDTO
public LineItemDTO(String lineNumber, javax.money.MonetaryAmount standardPrice, javax.money.MonetaryAmount salePrice, int quantity, com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail standardRecurringPrice, com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail saleRecurringPrice, Map<String, Object> attributes)
-
-
Method Details
-
getLineNumber
The line number of the item.- Since:
- Catalog Browse Service 2.2.0, Release Train 2.3.0
-
getStandardPrice
public javax.money.MonetaryAmount getStandardPrice()The base price of the line item- Returns:
- standardPrice the base price of the line item
-
getSalePrice
public javax.money.MonetaryAmount getSalePrice()Any sale price associated with the line item- Returns:
- the sale price for the item
-
getQuantity
public int getQuantity()The quantity that this line item represents- Returns:
- the line item's quantity
-
getStandardRecurringPrice
public com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail getStandardRecurringPrice()Represents the details related to a recurring (or subscription) price include the terms. This should come from the same source asgetStandardPrice(), and, consequently,getStandardPrice()should not be null even if there is no upfront price, e.g., it should be zero in that case.- Since:
- Catalog Browse Service 2.2.0, Release Train 2.3.0
-
getSaleRecurringPrice
public com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail getSaleRecurringPrice()Represents the details related to a recurring (or subscription) price include the terms. This should come from the same source as {@link #getSalePrice().- Since:
- Catalog Browse Service 2.2.0, Release Train 2.3.0
-
getAttributes
All additional attributes associated with the line item- Returns:
- additional attributes associated with the line item
-
setLineNumber
The line number of the item.- Since:
- Catalog Browse Service 2.2.0, Release Train 2.3.0
-
setStandardPrice
public void setStandardPrice(javax.money.MonetaryAmount standardPrice) The base price of the line item -
setSalePrice
public void setSalePrice(javax.money.MonetaryAmount salePrice) Any sale price associated with the line item -
setQuantity
public void setQuantity(int quantity) The quantity that this line item represents -
setStandardRecurringPrice
public void setStandardRecurringPrice(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail standardRecurringPrice) Represents the details related to a recurring (or subscription) price include the terms. This should come from the same source asgetStandardPrice(), and, consequently,getStandardPrice()should not be null even if there is no upfront price, e.g., it should be zero in that case.- Since:
- Catalog Browse Service 2.2.0, Release Train 2.3.0
-
setSaleRecurringPrice
public void setSaleRecurringPrice(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail saleRecurringPrice) Represents the details related to a recurring (or subscription) price include the terms. This should come from the same source as {@link #getSalePrice().- Since:
- Catalog Browse Service 2.2.0, Release Train 2.3.0
-
setAttributes
All additional attributes associated with the line item -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-