java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.marketing.LineItemDTO
All Implemented Interfaces:
Serializable

public class LineItemDTO extends Object implements 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

    Constructors
    Constructor
    Description
     
    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 Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    All additional attributes associated with the line item
    The line number of the item.
    int
    The quantity that this line item represents
    javax.money.MonetaryAmount
    Any sale price associated with the line item
    com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail
    Represents the details related to a recurring (or subscription) price include the terms.
    javax.money.MonetaryAmount
    The base price of the line item
    com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail
    Represents the details related to a recurring (or subscription) price include the terms.
    int
     
    void
    All additional attributes associated with the line item
    void
    setLineNumber(String lineNumber)
    The line number of the item.
    void
    setQuantity(int quantity)
    The quantity that this line item represents
    void
    setSalePrice(javax.money.MonetaryAmount salePrice)
    Any sale price associated with the line item
    void
    setSaleRecurringPrice(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail saleRecurringPrice)
    Represents the details related to a recurring (or subscription) price include the terms.
    void
    setStandardPrice(javax.money.MonetaryAmount standardPrice)
    The base price of the line item
    void
    setStandardRecurringPrice(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail standardRecurringPrice)
    Represents the details related to a recurring (or subscription) price include the terms.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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

      public String 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 as getStandardPrice(), 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

      public Map<String,Object> getAttributes()
      All additional attributes associated with the line item
      Returns:
      additional attributes associated with the line item
    • setLineNumber

      public void setLineNumber(String lineNumber)
      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 as getStandardPrice(), 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

      public void setAttributes(Map<String,Object> attributes)
      All additional attributes associated with the line item
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object