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 booleanbooleanMiscellaneous 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.ContextStateA subset ofTrackinginformation to expose the context state for this object.javax.money.CurrencyUnitThe 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.OrderPricingEmbedded 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.inthashCode()voidsetAttributes(Map<String, Object> attributes) Miscellaneous attributes for this order.voidsetCartCreateDate(Instant cartCreateDate) The date that the originating cart was first created.voidThe context ID of the original cart for this order.voidsetCheckoutRequestId(String checkoutRequestId) The id of the latest checkout request for the originating cart.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetCurrency(javax.money.CurrencyUnit currency) voidsetCustomerId(String customerId) The ID of the customer that owns this order.voidsetEmailAddress(String emailAddress) The customer's email address.voidThe context ID of the purchase.voidThe locale for this purchase.voidsetOrderNumber(String orderNumber) The unique number associated with thisPurchase.voidsetOrderPricing(com.broadleafcommerce.order.client.domain.OrderPricing orderPricing) Embedded container for all pricing information on this order.voidsetPurchaseItems(List<PurchaseItem> purchaseItems) Items that are contained within this order.voidThe status of this order.voidsetSubmitDate(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:
getCurrencyin interfacejavax.money.CurrencySupplier
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) - Specified by:
setCurrencyin 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 ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation 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 ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-