java.lang.Object
com.broadleafcommerce.recommendationengine.domain.Purchase
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, com.broadleafcommerce.money.CurrencyConsumer, Serializable, javax.money.CurrencySupplier

public class Purchase extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer
See Also:
  • Constructor Details

    • Purchase

      public Purchase()
  • Method Details

    • getCurrency

      @Nullable public javax.money.CurrencyUnit getCurrency()
      Specified by:
      getCurrency in interface javax.money.CurrencySupplier
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      Specified by:
      setCurrency in interface com.broadleafcommerce.money.CurrencyConsumer
    • getId

      public String getId()
      The context ID of the purchase.
      Returns:
      the context ID of the order
    • getCartId

      public String getCartId()
      The context ID of the original cart for this order.
      Returns:
      the context ID of the original cart for this order
    • getStatus

      public String getStatus()
      The status of this order.
      Returns:
      The status of this order.
    • getCustomerId

      public String getCustomerId()
      The ID of the customer that owns this order.
      Returns:
      The ID of the customer that owns this order.
    • getEmailAddress

      public String getEmailAddress()
      The customer's email address.
      Returns:
      The customer's email address.
    • getOrderNumber

      public String getOrderNumber()
      The unique number associated with this Purchase. Typically, this is generated and set on order submission. Used for record keeping and communicating with the customer instead of just using getId() since that exposes unwanted information about your database.
      Returns:
      The unique number associated with this Purchase.
    • getCartCreateDate

      public Instant getCartCreateDate()
      The date that the originating cart was first created.
      Returns:
      The date that the originating was first created.
    • getCheckoutRequestId

      public String getCheckoutRequestId()
      The id of the latest checkout request for the originating cart.

      This is typically the latest checkout request id if there were multiple checkout submissions for the cart.

      Returns:
      The id of the latest checkout request for the originating cart.
    • getSubmitDate

      public Instant getSubmitDate()
      The date that this purchase was submitted.
      Returns:
      The date that this order was submitted.
    • getLocale

      public Locale getLocale()
      The locale for this purchase. Used to determine what locale this purchase was in for translations and other location-based functionality.
      Returns:
      The locale code for this order.
    • getOrderPricing

      public com.broadleafcommerce.order.client.domain.OrderPricing getOrderPricing()
      Embedded container for all pricing information on this order.
      Returns:
      Embedded container for all pricing information on this order.
    • getPurchaseItems

      public List<PurchaseItem> getPurchaseItems()
      Items that are contained within this order. Typically represents a good or service that the customer is purchasing.
      Returns:
      Items for purchase that are contained within this order.
    • getAttributes

      public Map<String,Object> getAttributes()
      Miscellaneous attributes for this order.
      Returns:
      Miscellaneous attributes for this order.
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object.
    • setId

      public void setId(String id)
      The context ID of the purchase.
      Parameters:
      id - the context ID of the order
    • setCartId

      public void setCartId(String cartId)
      The context ID of the original cart for this order.
      Parameters:
      id - the context ID of the original cart for this order
    • setStatus

      public void setStatus(String status)
      The status of this order.
      Parameters:
      status - The status of this order.
    • setCustomerId

      public void setCustomerId(String customerId)
      The ID of the customer that owns this order.
      Parameters:
      customerId - The ID of the customer that owns this order.
    • setEmailAddress

      public void setEmailAddress(String emailAddress)
      The customer's email address.
      Parameters:
      emailAddress - The customer's email address.
    • setOrderNumber

      public void setOrderNumber(String orderNumber)
      The unique number associated with this Purchase. Typically, this is generated and set on order submission. Used for record keeping and communicating with the customer instead of just using getId() since that exposes unwanted information about your database.
      Parameters:
      orderNumber - The unique number associated with this Purchase.
    • setCartCreateDate

      public void setCartCreateDate(Instant cartCreateDate)
      The date that the originating cart was first created.
      Parameters:
      cartCreateDate - The date that the originating cart was first created.
    • setCheckoutRequestId

      public void setCheckoutRequestId(String checkoutRequestId)
      The id of the latest checkout request for the originating cart.

      This is typically the latest checkout request id if there were multiple checkout submissions for the cart.

      Parameters:
      checkoutRequestId - The id of the latest checkout request for the originating cart.
    • setSubmitDate

      public void setSubmitDate(Instant submitDate)
      The date that this purchase was submitted.
      Parameters:
      submitDate - The date that this order was submitted.
    • setLocale

      public void setLocale(Locale locale)
      The locale for this purchase. Used to determine what locale this purchase was in for translations and other location-based functionality.
      Parameters:
      locale - The locale code for this order.
    • setOrderPricing

      public void setOrderPricing(com.broadleafcommerce.order.client.domain.OrderPricing orderPricing)
      Embedded container for all pricing information on this order.
      Parameters:
      orderPricing - Embedded container for all pricing information on this order.
    • setPurchaseItems

      public void setPurchaseItems(List<PurchaseItem> purchaseItems)
      Items that are contained within this order. Typically represents a good or service that the customer is purchasing.
      Parameters:
      orderItems - Items for purchase that are contained within this order.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Miscellaneous attributes for this order.
      Parameters:
      attributes - Miscellaneous attributes for this order.
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • 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