Class Purchase
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Miscellaneous attributes for this order.The date that the originating cart was first created.The context ID of the original cart for this order.The id of the latest checkout request for the originating cart.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.javax.money.CurrencyUnit
The ID of the customer that owns this order.The customer's email address.getId()
The context ID of the purchase.The locale for this purchase.The unique number associated with thisPurchase
.com.broadleafcommerce.order.client.domain.OrderPricing
Embedded container for all pricing information on this order.Items that are contained within this order.The status of this order.The date that this purchase was submitted.int
hashCode()
void
setAttributes
(Map<String, Object> attributes) Miscellaneous attributes for this order.void
setCartCreateDate
(Instant cartCreateDate) The date that the originating cart was first created.void
The context ID of the original cart for this order.void
setCheckoutRequestId
(String checkoutRequestId) The id of the latest checkout request for the originating cart.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.void
setCurrency
(javax.money.CurrencyUnit currency) void
setCustomerId
(String customerId) The ID of the customer that owns this order.void
setEmailAddress
(String emailAddress) The customer's email address.void
The context ID of the purchase.void
The locale for this purchase.void
setOrderNumber
(String orderNumber) The unique number associated with thisPurchase
.void
setOrderPricing
(com.broadleafcommerce.order.client.domain.OrderPricing orderPricing) Embedded container for all pricing information on this order.void
setPurchaseItems
(List<PurchaseItem> purchaseItems) Items that are contained within this order.void
The status of this order.void
setSubmitDate
(Instant submitDate) The date that this purchase was submitted.toString()
-
Constructor Details
-
Purchase
public Purchase()
-
-
Method Details
-
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()- Specified by:
getCurrency
in interfacejavax.money.CurrencySupplier
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) - Specified by:
setCurrency
in interfacecom.broadleafcommerce.money.CurrencyConsumer
-
getId
The context ID of the purchase.- Returns:
- the context ID of the order
-
getCartId
The context ID of the original cart for this order.- Returns:
- the context ID of the original cart for this order
-
getStatus
The status of this order.- Returns:
- The status of this order.
-
getCustomerId
The ID of the customer that owns this order.- Returns:
- The ID of the customer that owns this order.
-
getEmailAddress
The customer's email address.- Returns:
- The customer's email address.
-
getOrderNumber
The unique number associated with thisPurchase
. Typically, this is generated and set on order submission. Used for record keeping and communicating with the customer instead of just usinggetId()
since that exposes unwanted information about your database.- Returns:
- The unique number associated with this
Purchase
.
-
getCartCreateDate
The date that the originating cart was first created.- Returns:
- The date that the originating was first created.
-
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
The date that this purchase was submitted.- Returns:
- The date that this order was submitted.
-
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
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
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 ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object.
-
setId
The context ID of the purchase.- Parameters:
id
- the context ID of the order
-
setCartId
The context ID of the original cart for this order.- Parameters:
id
- the context ID of the original cart for this order
-
setStatus
The status of this order.- Parameters:
status
- The status of this order.
-
setCustomerId
The ID of the customer that owns this order.- Parameters:
customerId
- The ID of the customer that owns this order.
-
setEmailAddress
The customer's email address.- Parameters:
emailAddress
- The customer's email address.
-
setOrderNumber
The unique number associated with thisPurchase
. Typically, this is generated and set on order submission. Used for record keeping and communicating with the customer instead of just usinggetId()
since that exposes unwanted information about your database.- Parameters:
orderNumber
- The unique number associated with thisPurchase
.
-
setCartCreateDate
The date that the originating cart was first created.- Parameters:
cartCreateDate
- The date that the originating cart was first created.
-
setCheckoutRequestId
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
The date that this purchase was submitted.- Parameters:
submitDate
- The date that this order was submitted.
-
setLocale
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
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
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 ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-