public interface Order extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
addAddedOfferCode(OfferCode offerCode)
Deprecated.
|
void |
addOfferCode(OfferCode addedOfferCode) |
void |
addOrderItem(OrderItem orderItem)
|
void |
assignOrderItemsFinalPrice()
Assigns a final price to all the order items
|
Money |
calculateSubTotal()
Returns the sum of the item totals.
|
boolean |
containsSku(Sku sku)
Checks the DiscreteOrderItems in the cart and returns whether or not the given SKU was found.
|
boolean |
finalizeItemPrices()
Updates the averagePriceField for all order items.
|
List<OfferCode> |
getAddedOfferCodes() |
Map<Offer,OfferInfo> |
getAdditionalOfferInformation() |
Auditable |
getAuditable()
Gets the auditable associated with this Order instance which tracks changes made to this Order (creation/update)
|
List<CandidateOrderOffer> |
getCandidateOrderOffers()
|
BroadleafCurrency |
getCurrency()
The currency that the
Order is priced in. |
Customer |
getCustomer()
|
List<DiscreteOrderItem> |
getDiscreteOrderItems()
|
String |
getEmailAddress() |
Money |
getFulfillmentGroupAdjustmentsValue() |
List<FulfillmentGroup> |
getFulfillmentGroups()
Gets the
FulfillmentGroups associated with this Order. |
String |
getFulfillmentStatus() |
boolean |
getHasOrderAdjustments()
Returns true if this item has order adjustments.
|
Long |
getId() |
Money |
getItemAdjustmentsValue()
Returns the discount value of all the applied item offers for this order.
|
int |
getItemCount()
This method returns the total number of items in this order.
|
Locale |
getLocale() |
String |
getName()
Gets the name of the order, mainly in order to support wishlists.
|
List<OrderAdjustment> |
getOrderAdjustments()
Returns a unmodifiable List of OrderAdjustment.
|
Money |
getOrderAdjustmentsValue()
Returns the discount value of all the applied order offers.
|
Map<String,OrderAttribute> |
getOrderAttributes()
A list of arbitrary attributes added to this order.
|
List<OrderItem> |
getOrderItems()
|
List<ActivityMessageDTO> |
getOrderMessages() |
String |
getOrderNumber()
The unique number associated with this
Order. |
List<OrderPayment> |
getPayments()
Gets all the
OrderPayments associated with this Order. |
OrderStatus |
getStatus()
Gets the status of the Order.
|
Date |
getSubmitDate()
Gets the date that this
Order was submitted. |
Money |
getSubTotal()
Returns the subtotal price for the order.
|
Boolean |
getTaxOverride() |
Money |
getTotal()
The grand total of this
Order which includes all shipping costs and taxes, as well as any adjustments from
promotions. |
Money |
getTotalAdjustmentsValue()
Returns the total discount value for all applied item and order offers in the order.
|
Money |
getTotalAfterAppliedPayments()
This is getTotal() minus the sum of all the
OrderPayment already applied to this order. |
Money |
getTotalFulfillmentCharges()
Gets the total fulfillment costs that should be charged for this
Order. |
Money |
getTotalShipping() |
Money |
getTotalTax()
Gets the total tax for this order, which is the sum of the taxes on all fulfillment
groups.
|
boolean |
hasCategoryItem(String categoryName)
Determines if this
Order has an item in the given category. |
void |
setAdditionalOfferInformation(Map<Offer,OfferInfo> additionalOfferInformation) |
void |
setAuditable(Auditable auditable) |
void |
setCandidateOrderOffers(List<CandidateOrderOffer> candidateOrderOffers)
|
void |
setCurrency(BroadleafCurrency currency)
Set the currency that the
Order is priced in. |
void |
setCustomer(Customer customer)
Sets the associated
Customer for this Order. |
void |
setEmailAddress(String emailAddress) |
void |
setFulfillmentGroups(List<FulfillmentGroup> fulfillmentGroups) |
void |
setId(Long id) |
void |
setLocale(Locale locale) |
void |
setName(String name)
Sets the name of the order in the context of a wishlist.
|
void |
setOrderAttributes(Map<String,OrderAttribute> orderAttributes)
Sets the map of order attributes.
|
void |
setOrderItems(List<OrderItem> orderItems) |
void |
setOrderMessages(List<ActivityMessageDTO> orderMessages) |
void |
setOrderNumber(String orderNumber)
Set the unique order number for this
Order |
void |
setPayments(List<OrderPayment> payments)
Sets the various payment types associated with this
Order |
void |
setStatus(OrderStatus status)
Sets the status of the Order
|
void |
setSubmitDate(Date submitDate)
Set the date that this
Order was submitted. |
void |
setSubTotal(Money subTotal)
Sets the subtotal price for the order.
|
void |
setTaxOverride(Boolean taxOverride)
Sets whether or not to override the tax calculation
|
void |
setTotal(Money orderTotal)
Used in
TotalActivity to set the grand total of this Order. |
void |
setTotalFulfillmentCharges(Money totalFulfillmentCharges)
Set the total fulfillment cost of this
Order. |
void |
setTotalShipping(Money totalShipping)
Deprecated.
- Use
setTotalFulfillmentCharges(Money) instead. |
void |
setTotalTax(Money totalTax)
Sets the total tax of this order, which is the sum of the taxes on all fulfillment
groups.
|
boolean |
updatePrices()
|
Long getId()
void setId(Long id)
String getName()
void setName(String name)
Customer can have multiple
wishlists like "Christmas" or "Gaming Computer" etc.name - Auditable getAuditable()
void setAuditable(Auditable auditable)
Money getSubTotal()
void setSubTotal(Money subTotal)
subTotal - void assignOrderItemsFinalPrice()
Money calculateSubTotal()
Money getTotal()
Order which includes all shipping costs and taxes, as well as any adjustments from
promotions.OrderMoney getTotalAfterAppliedPayments()
OrderPayment already applied to this order.
An applied payment can be of any type that does NOT have to be the final payment on the order.
In this implementation, THIRD_PARTY_ACCOUNT and CREDIT_CARD type payments
must be sent to the gateway as the last step in the checkout process and will NOT be considered an applied payment.
Since, these types have to be the last payment applied,
AdjustOrderPaymentsActivity will adjust the value of the payment
based on what has already been applied to the order.
For example, Gift Cards and Account Credit can be applied BEFORE
a final payment (e.g. most Credit Card Gateways) is applied. This OrderPayment does not
necessarily have to be confirmed (i.e. captured), as it will happen on callback of the final payment
and will be captured in the checkout workflow.
This method is used in cases where you need to determine the final amount to send to the gateways
of what is left on the order minus what has already been applied.void setTotal(Money orderTotal)
TotalActivity to set the grand total of this Order. This includes the prices of all of the
OrderItems as well as any taxes, fees, shipping and adjustments for all 3.orderTotal - the total cost of this OrderCustomer getCustomer()
void setCustomer(Customer customer)
Customer for this Order.customer - OrderStatus getStatus()
void setStatus(OrderStatus status)
status - void addOrderItem(OrderItem orderItem)
List<FulfillmentGroup> getFulfillmentGroups()
FulfillmentGroups associated with this Order. An Order can have many
FulfillmentGroups associated with it in order to support multi-address (and multi-type) shipping.FulfillmentGroups associated with this Ordervoid setFulfillmentGroups(List<FulfillmentGroup> fulfillmentGroups)
void setCandidateOrderOffers(List<CandidateOrderOffer> candidateOrderOffers)
candidateOrderOffers - List<CandidateOrderOffer> getCandidateOrderOffers()
Date getSubmitDate()
Order was submitted. Note that if this date is non-null, then the following should
also be true:
getStatus() should return OrderStatus.SUBMITTEDgetOrderNumber() should return a non-null valuevoid setSubmitDate(Date submitDate)
Order was submitted. Used in the blCheckoutWorkflow as the last step after everything
else has been completed (payments charged, integration systems notified, etc).submitDate - the date that this Order was submitted.Money getTotalTax()
void setTotalTax(Money totalTax)
the - total tax for this orderMoney getTotalShipping()
@Deprecated void setTotalShipping(Money totalShipping)
setTotalFulfillmentCharges(Money) instead.totalShipping - Money getTotalFulfillmentCharges()
Order. This value should be equivalent to
the summation of FulfillmentGroup.getTotal() for each FulfillmentGroup associated with this
OrderOrdervoid setTotalFulfillmentCharges(Money totalFulfillmentCharges)
Order. Used in the FulfillmentGroupPricingActivity after the cost
of each FulfillmentGroup has been calculated.totalShipping - List<OrderPayment> getPayments()
OrderPayments associated with this Order. An Order can have many
OrderPayments associated with it to support things like paying with multiple cards or perhaps paying some of
this Order with a gift card and some with a credit card.OrderPayments associated with this Order.void setPayments(List<OrderPayment> payments)
Orderpayments - boolean hasCategoryItem(String categoryName)
Order has an item in the given category.categoryName - the Category.getName() to checkOrderItem is in the given category, false otherwise.OrderItem#isInCategory(String)}List<OrderAdjustment> getOrderAdjustments()
List<DiscreteOrderItem> getDiscreteOrderItems()
OrderItems in this Order that are an instanceof DiscreteOrderItem. This
will also go into each BundleOrderItem (if there are any) and return all of the
BundleOrderItem.getDiscreteOrderItems() from each of those as well.boolean containsSku(Sku sku)
DiscreteOrderItems from {link BundleOrderItem.getDiscreteOrderItems()sku - The sku to check forString getFulfillmentStatus()
String getOrderNumber()
Order. Generally preferred to use instead of just using getId()
since that exposes unwanted information about your database.Ordervoid setOrderNumber(String orderNumber)
OrderorderNumber - String getEmailAddress()
void setEmailAddress(String emailAddress)
void setAdditionalOfferInformation(Map<Offer,OfferInfo> additionalOfferInformation)
Money getItemAdjustmentsValue()
Money getOrderAdjustmentsValue()
Money getTotalAdjustmentsValue()
boolean updatePrices()
OrderItem returned true from OrderItem#updatePrices, false
otherwise.OrderItem#updatePrices()}boolean finalizeItemPrices()
Money getFulfillmentGroupAdjustmentsValue()
void addOfferCode(OfferCode addedOfferCode)
@Deprecated void addAddedOfferCode(OfferCode offerCode)
Map<String,OrderAttribute> getOrderAttributes()
void setOrderAttributes(Map<String,OrderAttribute> orderAttributes)
orderAttributes - int getItemCount()
BroadleafCurrency getCurrency()
Order is priced in. Note that this is only on Order since all of the other
entities that are related (like FulfillmentGroup and OrderItem have a link back to here. This also
has the side effect that an Order can only be priced in a single currency.void setCurrency(BroadleafCurrency currency)
Order is priced in.currency - Locale getLocale()
void setLocale(Locale locale)
boolean getHasOrderAdjustments()
List<ActivityMessageDTO> getOrderMessages()
void setOrderMessages(List<ActivityMessageDTO> orderMessages)
Boolean getTaxOverride()
void setTaxOverride(Boolean taxOverride)
taxOverride - Copyright © 2014. All Rights Reserved.