Class Order
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,com.broadleafcommerce.data.tracking.core.policy.Owned
,com.broadleafcommerce.money.CurrencyConsumer
,Serializable
,javax.money.CurrencySupplier
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The hierarchy of accounts, from the root account to the account member's account.The ID of the account the account member belongs to.List<com.broadleafcommerce.order.common.domain.Adjustment>
Adjustments to order pricing that were applied toOrderPricing.getSubtotal()
.The order approver's email address.Attribute choices for this order driven by its items' product options, where each key is theattributeName
from an attribute choice.Miscellaneous attributes for this order.List<com.broadleafcommerce.order.common.domain.CampaignRef>
A list of campaign references that are attached to this order.The date that the originating cart was first created.The context ID of the original cart for this order.Returns the cart type orDefaultCartTypes.BLC_CART
if null.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 name of the customer that owns this order.The customer's email address.getId()
The context ID of the order.Miscellaneous internal attributes for this item.The locale for this order.getName()
A unique name for the order, used for retrieval.A list of offer codes that were added to this order.Items that are contained within this order.The unique number associated with thisOrder
.Embedded container for all pricing information on this order.A list ofPaymentDistributionDetails
representing how this order's total is split across different payments.The ID of the root account the account member belongs to.The status of this order.The date that this order was submitted.List<com.broadleafcommerce.order.common.domain.Voucher>
A list ofVouchers
that this order is qualified for.int
hashCode()
void
setAccountHierarchy
(List<String> accountHierarchy) The hierarchy of accounts, from the root account to the account member's account.void
setAccountId
(String accountId) The ID of the account the account member belongs to.void
setAdjustments
(List<com.broadleafcommerce.order.common.domain.Adjustment> adjustments) Adjustments to order pricing that were applied toOrderPricing.getSubtotal()
.void
setApproverEmail
(String approverEmail) The order approver's email address.void
setAttributeChoices
(Map<String, com.broadleafcommerce.order.common.domain.AttributeChoiceValue> attributeChoices) Attribute choices for this order driven by its items' product options, where each key is theattributeName
from an attribute choice.void
setAttributes
(Map<String, Object> attributes) Miscellaneous attributes for this order.void
setCampaignRefs
(List<com.broadleafcommerce.order.common.domain.CampaignRef> campaignRefs) A list of campaign references that are attached to 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
setCartType
(String cartType) The type of 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
setCustomerName
(String customerName) The name of the customer that owns this order.void
setEmailAddress
(String emailAddress) The customer's email address.void
The context ID of the order.void
setInternalAttributes
(Map<String, Object> internalAttributes) Miscellaneous internal attributes for this item.void
The locale for this order.void
A unique name for the order, used for retrieval.void
setOfferCodes
(List<String> offerCodes) A list of offer codes that were added to this order.void
setOrderItems
(List<OrderItem> orderItems) Items that are contained within this order.void
setOrderNumber
(String orderNumber) The unique number associated with thisOrder
.void
setOrderPricing
(OrderPricing orderPricing) Embedded container for all pricing information on this order.void
setPaymentDistributionDetails
(List<PaymentDistributionDetail> paymentDistributionDetails) A list ofPaymentDistributionDetails
representing how this order's total is split across different payments.void
setRootAccountId
(String rootAccountId) The ID of the root account the account member belongs to.void
The status of this order.void
setSubmitDate
(Instant submitDate) The date that this order was submitted.void
setVouchers
(List<com.broadleafcommerce.order.common.domain.Voucher> vouchers) A list ofVouchers
that this order is qualified for.toString()
-
Constructor Details
-
Order
public Order()
-
-
Method Details
-
getCartType
Returns the cart type orDefaultCartTypes.BLC_CART
if null.- Returns:
- the cart type or
DefaultCartTypes.BLC_CART
if null
-
getOwnerIdentifier
- Specified by:
getOwnerIdentifier
in interfacecom.broadleafcommerce.data.tracking.core.policy.Owned
-
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
-
getOrderItemsWithDependentItems
-
getId
The context ID of the order.- 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
-
getName
A unique name for the order, used for retrieval. This field is not displayed anywhere.- Returns:
- a unique name for the order, used for retrieval
-
getStatus
The status of this order.- Returns:
- The status of this order.
-
getApproverEmail
The order approver's email address.This field is only needed for B2B orders to represent the order approver's email address. For B2C orders, we don't expect a value to be provided for this field.
- Returns:
- The order approver's email address.
-
getCustomerId
The ID of the customer that owns this order.- Returns:
- The ID of the customer that owns this order.
-
getCustomerName
The name of the customer that owns this order.- Returns:
- The name of the customer that owns this order.
-
getEmailAddress
The customer's email address.- Returns:
- The customer's email address.
-
getAccountId
The ID of the account the account member belongs to.- Returns:
- The ID of the account of the account member.
-
getRootAccountId
The ID of the root account the account member belongs to.For example, if we have this account setup, rootAcct -> subAcct (child of rootAcct) -> subSubAcct (child of subAcct), this field would be rootAcct.
- Returns:
- The ID of the root account of the account member.
-
getAccountHierarchy
The hierarchy of accounts, from the root account to the account member's account.For example, if we have this account setup, rootAcct -> subAcct (child of rootAcct) -> subSubAcct (child of subAcct), this field would be [rootAcct, subAcct, subSubAcct]. This is useful to query all the orders that belong to the same non-root account and its sub-accounts.
- Returns:
- The hierarchy of accounts, from the root account to the account member's account.
-
getOrderNumber
The unique number associated with thisOrder
. 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
Order
.
-
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 order was submitted.- Returns:
- The date that this order was submitted.
-
getLocale
The locale for this order. Used to determine what locale this order was in for translations and other location-based functionality.- Returns:
- The locale code for this order.
-
getOrderPricing
Embedded container for all pricing information on this order.- Returns:
- Embedded container for all pricing information on this order.
-
getPaymentDistributionDetails
A list ofPaymentDistributionDetails
representing how this order's total is split across different payments.- Returns:
- a list of
PaymentDistributionDetails
representing how this order's total is split across different payments
-
getOrderItems
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.
-
getAdjustments
Adjustments to order pricing that were applied toOrderPricing.getSubtotal()
.- Returns:
- Adjustments to order pricing that were applied to
OrderPricing.getSubtotal()
.
-
getOfferCodes
A list of offer codes that were added to this order. Used to applyAdjustments
to different aspects of the order.- Returns:
- A list of offer codes that were added to this order.
-
getVouchers
A list ofVouchers
that this order is qualified for.- Returns:
- A list of
Vouchers
that this order is qualified for.
-
getCampaignRefs
A list of campaign references that are attached to this order. Similar togetOfferCodes()
, theCampaignRef.getCampaignTrackingId()
can be used to applyAdjustments
to different aspects of the order. The difference is that these items need to be validated against a valid "Campaign" before being added to this list.- Returns:
- A list of campaign references that are attached to this order.
-
getAttributes
Miscellaneous attributes for this order.- Returns:
- Miscellaneous attributes for this order.
-
getInternalAttributes
Miscellaneous internal attributes for this item. Distinguished fromgetAttributes()
in that this map is used for attributes that assist in the internal working of Broadleaf MicroServices. For example, attributes to help with processing the order's checkout.- Returns:
- Miscellaneous internal attributes for this item.
-
getAttributeChoices
public Map<String,com.broadleafcommerce.order.common.domain.AttributeChoiceValue> getAttributeChoices()Attribute choices for this order driven by its items' product options, where each key is theattributeName
from an attribute choice.- Returns:
- Attribute choices for this order driven by its items' product options, where each key
is the
attributeName
from an attribute choice.
-
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 order.- 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
-
setName
A unique name for the order, used for retrieval. This field is not displayed anywhere.- Parameters:
name
- a unique name for the order, used for retrieval
-
setCartType
The type of cart for this order.- Parameters:
cartType
- The type of cart for this order.- See Also:
-
setStatus
The status of this order.- Parameters:
status
- The status of this order.
-
setApproverEmail
The order approver's email address.This field is only needed for B2B orders to represent the order approver's email address. For B2C orders, we don't expect a value to be provided for this field.
- Parameters:
approverEmail
- The order approver's email address.
-
setCustomerId
The ID of the customer that owns this order.- Parameters:
customerId
- The ID of the customer that owns this order.
-
setCustomerName
The name of the customer that owns this order.- Parameters:
customerName
- The name of the customer that owns this order.
-
setEmailAddress
The customer's email address.- Parameters:
emailAddress
- The customer's email address.
-
setAccountId
The ID of the account the account member belongs to.- Parameters:
accountId
- The ID of the account of the account member.
-
setRootAccountId
The ID of the root account the account member belongs to.For example, if we have this account setup, rootAcct -> subAcct (child of rootAcct) -> subSubAcct (child of subAcct), this field would be rootAcct.
- Parameters:
rootAccountId
- The ID of the root account of the account member.
-
setAccountHierarchy
The hierarchy of accounts, from the root account to the account member's account.For example, if we have this account setup, rootAcct -> subAcct (child of rootAcct) -> subSubAcct (child of subAcct), this field would be [rootAcct, subAcct, subSubAcct]. This is useful to query all the orders that belong to the same non-root account and its sub-accounts.
- Parameters:
accountHierarchy
- The hierarchy of accounts, from the root account to the account member's account.
-
setOrderNumber
The unique number associated with thisOrder
. 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 thisOrder
.
-
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 order was submitted.- Parameters:
submitDate
- The date that this order was submitted.
-
setLocale
The locale for this order. Used to determine what locale this order was in for translations and other location-based functionality.- Parameters:
locale
- The locale code for this order.
-
setOrderPricing
Embedded container for all pricing information on this order.- Parameters:
orderPricing
- Embedded container for all pricing information on this order.
-
setPaymentDistributionDetails
public void setPaymentDistributionDetails(List<PaymentDistributionDetail> paymentDistributionDetails) A list ofPaymentDistributionDetails
representing how this order's total is split across different payments.- Parameters:
paymentDistributionDetails
- a list ofPaymentDistributionDetails
representing how this order's total is split across different payments
-
setOrderItems
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.
-
setAdjustments
Adjustments to order pricing that were applied toOrderPricing.getSubtotal()
.- Parameters:
adjustments
- Adjustments to order pricing that were applied toOrderPricing.getSubtotal()
.
-
setOfferCodes
A list of offer codes that were added to this order. Used to applyAdjustments
to different aspects of the order.- Parameters:
offerCodes
- A list of offer codes that were added to this order.
-
setVouchers
A list ofVouchers
that this order is qualified for.- Parameters:
vouchers
- A list ofVouchers
that this order is qualified for.
-
setCampaignRefs
public void setCampaignRefs(List<com.broadleafcommerce.order.common.domain.CampaignRef> campaignRefs) A list of campaign references that are attached to this order. Similar togetOfferCodes()
, theCampaignRef.getCampaignTrackingId()
can be used to applyAdjustments
to different aspects of the order. The difference is that these items need to be validated against a valid "Campaign" before being added to this list.- Parameters:
campaignRefs
- A list of campaign references that are attached to this order.
-
setAttributes
Miscellaneous attributes for this order.- Parameters:
attributes
- Miscellaneous attributes for this order.
-
setInternalAttributes
Miscellaneous internal attributes for this item. Distinguished fromgetAttributes()
in that this map is used for attributes that assist in the internal working of Broadleaf MicroServices. For example, attributes to help with processing the order's checkout.- Parameters:
internalAttributes
- Miscellaneous internal attributes for this item.
-
setAttributeChoices
public void setAttributeChoices(Map<String, com.broadleafcommerce.order.common.domain.AttributeChoiceValue> attributeChoices) Attribute choices for this order driven by its items' product options, where each key is theattributeName
from an attribute choice.- Parameters:
attributeChoices
- Attribute choices for this order driven by its items' product options, where each key is theattributeName
from an attribute choice.
-
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()
-