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 booleanbooleanThe 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 theattributeNamefrom 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_CARTif null.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 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 ofPaymentDistributionDetailsrepresenting 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 ofVouchersthat this order is qualified for.inthashCode()voidsetAccountHierarchy(List<String> accountHierarchy) The hierarchy of accounts, from the root account to the account member's account.voidsetAccountId(String accountId) The ID of the account the account member belongs to.voidsetAdjustments(List<com.broadleafcommerce.order.common.domain.Adjustment> adjustments) Adjustments to order pricing that were applied toOrderPricing.getSubtotal().voidsetApproverEmail(String approverEmail) The order approver's email address.voidsetAttributeChoices(Map<String, com.broadleafcommerce.order.common.domain.AttributeChoiceValue> attributeChoices) Attribute choices for this order driven by its items' product options, where each key is theattributeNamefrom an attribute choice.voidsetAttributes(Map<String, Object> attributes) Miscellaneous attributes for this order.voidsetCampaignRefs(List<com.broadleafcommerce.order.common.domain.CampaignRef> campaignRefs) A list of campaign references that are attached to this order.voidsetCartCreateDate(Instant cartCreateDate) The date that the originating cart was first created.voidThe context ID of the original cart for this order.voidsetCartType(String cartType) The type of 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.voidsetCustomerName(String customerName) The name of the customer that owns this order.voidsetEmailAddress(String emailAddress) The customer's email address.voidThe context ID of the order.voidsetInternalAttributes(Map<String, Object> internalAttributes) Miscellaneous internal attributes for this item.voidThe locale for this order.voidA unique name for the order, used for retrieval.voidsetOfferCodes(List<String> offerCodes) A list of offer codes that were added to this order.voidsetOrderItems(List<OrderItem> orderItems) Items that are contained within this order.voidsetOrderNumber(String orderNumber) The unique number associated with thisOrder.voidsetOrderPricing(OrderPricing orderPricing) Embedded container for all pricing information on this order.voidsetPaymentDistributionDetails(List<PaymentDistributionDetail> paymentDistributionDetails) A list ofPaymentDistributionDetailsrepresenting how this order's total is split across different payments.voidsetRootAccountId(String rootAccountId) The ID of the root account the account member belongs to.voidThe status of this order.voidsetSubmitDate(Instant submitDate) The date that this order was submitted.voidsetVouchers(List<com.broadleafcommerce.order.common.domain.Voucher> vouchers) A list ofVouchersthat this order is qualified for.toString()
-
Constructor Details
-
Order
public Order()
-
-
Method Details
-
getCartType
Returns the cart type orDefaultCartTypes.BLC_CARTif null.- Returns:
- the cart type or
DefaultCartTypes.BLC_CARTif null
-
getOwnerIdentifier
- Specified by:
getOwnerIdentifierin interfacecom.broadleafcommerce.data.tracking.core.policy.Owned
-
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
-
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 ofPaymentDistributionDetailsrepresenting how this order's total is split across different payments.- Returns:
- a list of
PaymentDistributionDetailsrepresenting 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 applyAdjustmentsto different aspects of the order.- Returns:
- A list of offer codes that were added to this order.
-
getVouchers
A list ofVouchersthat this order is qualified for.- Returns:
- A list of
Vouchersthat 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 applyAdjustmentsto 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 theattributeNamefrom an attribute choice.- Returns:
- Attribute choices for this order driven by its items' product options, where each key
is the
attributeNamefrom an attribute choice.
-
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 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 ofPaymentDistributionDetailsrepresenting how this order's total is split across different payments.- Parameters:
paymentDistributionDetails- a list ofPaymentDistributionDetailsrepresenting 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 applyAdjustmentsto different aspects of the order.- Parameters:
offerCodes- A list of offer codes that were added to this order.
-
setVouchers
A list ofVouchersthat this order is qualified for.- Parameters:
vouchers- A list ofVouchersthat 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 applyAdjustmentsto 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 theattributeNamefrom an attribute choice.- Parameters:
attributeChoices- Attribute choices for this order driven by its items' product options, where each key is theattributeNamefrom an attribute choice.
-
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()
-