Class OrderDto<F extends FulfillmentGroupDto<FulfillmentLineItemDto>>
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.OrderDto<F>
- All Implemented Interfaces:
Order<OrderLineItemDto,,F> Serializable
public class OrderDto<F extends FulfillmentGroupDto<FulfillmentLineItemDto>>
extends Object
implements Order<OrderLineItemDto,F>, Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAdditional, unspecified attributes.javax.money.MonetaryAmountgetCodes()Deprecated.javax.money.CurrencyUnitTheCustomerContextassociated with the API request.Groups of items sharing the same fulfillment info (method, destination, payment info).TheLocalefor the orderItems being sold in this order.Number used to identify this order.TheInstantof when this order was submitted.The time that the request to apply offers to this order was made.inthashCode()booleanIf this is set to false, the offer engine will skip offers that target orders and order items and only attempt to apply fulfillment group and fulfillment item offers.voidsetAttributes(Map<String, Object> attributes) Additional, unspecified attributes.voidsetCartSubtotal(javax.money.MonetaryAmount cartSubtotal) voidDeprecated.voidsetCurrency(javax.money.CurrencyUnit currency) voidsetCustomerContext(CustomerContext customerContext) TheCustomerContextassociated with the API request.voidsetFulfillmentGroups(List<F> fulfillmentGroups) Groups of items sharing the same fulfillment info (method, destination, payment info).voidTheLocalefor the ordervoidsetOfferCodes(List<OfferCodeDto> offerCodes) voidsetOrderLineItems(List<OrderLineItemDto> orderLineItems) Items being sold in this order.voidsetOrderNumber(String orderNumber) Number used to identify this order.voidsetOrderSubmitDate(Instant orderSubmitDate) TheInstantof when this order was submitted.voidsetRunOrderAndItemOffers(boolean runOrderAndItemOffers) If this is set to false, the offer engine will skip offers that target orders and order items and only attempt to apply fulfillment group and fulfillment item offers.voidsetTimeOfRequest(Instant timeOfRequest) The time that the request to apply offers to this order was made.voidsetVouchers(List<Voucher> vouchers) toString()
-
Constructor Details
-
OrderDto
public OrderDto()
-
-
Method Details
-
getTimeOfRequest
Description copied from interface:OrderThe time that the request to apply offers to this order was made.- Specified by:
getTimeOfRequestin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- The time that the request to apply offers to this order was made.
-
getOrderNumber
Description copied from interface:OrderNumber used to identify this order.- Specified by:
getOrderNumberin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- Number used to identify this order.
-
getOrderLineItems
Description copied from interface:OrderItems being sold in this order.- Specified by:
getOrderLineItemsin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- Items being sold in this order.
- See Also:
-
getFulfillmentGroups
Description copied from interface:OrderGroups of items sharing the same fulfillment info (method, destination, payment info).Fulfillment groupsalso contain the cost of fulfillment, which may be discounted byoffers. If this list is empty, then no offers will be applied to fulfillment groups or fulfillment items.- Specified by:
getFulfillmentGroupsin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- Groups of items sharing the same fulfillment info.
- See Also:
-
getVouchers
-
getCodes
Deprecated.Description copied from interface:OrderDTO containing codes used to apply offers to orders. These can be shared offer codes or tracking IDs for entities like Campaigns.- Specified by:
getCodesin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- DTO containing codes used to apply offers to orders.
-
getOfferCodes
-
isRunOrderAndItemOffers
public boolean isRunOrderAndItemOffers()Description copied from interface:OrderIf this is set to false, the offer engine will skip offers that target orders and order items and only attempt to apply fulfillment group and fulfillment item offers. Default is true.- Specified by:
isRunOrderAndItemOffersin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- whether to run order and order item offers against this order.
-
getAttributes
Description copied from interface:OrderAdditional, unspecified attributes.- Specified by:
getAttributesin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- Additional, unspecified attributes
-
getLocale
Description copied from interface:OrderTheLocalefor the order- Specified by:
getLocalein interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- The
Locale
-
getCurrency
public javax.money.CurrencyUnit getCurrency()Description copied from interface:Order- Specified by:
getCurrencyin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- The
Currency.getCurrencyCode().
-
getCustomerContext
Description copied from interface:OrderTheCustomerContextassociated with the API request. The customer context contains information necessary for determining whether an offer applies to the customer sending the request.- Specified by:
getCustomerContextin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- The
CustomerContextassociated with the API request.
-
getOrderSubmitDate
TheInstantof when this order was submitted.This is mainly used for post-checkout voucher offer validation purposes.
-
getCartSubtotal
public javax.money.MonetaryAmount getCartSubtotal() -
setOrderNumber
Description copied from interface:OrderNumber used to identify this order.- Specified by:
setOrderNumberin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
orderNumber- Number used to identify this order.
-
setOrderLineItems
Description copied from interface:OrderItems being sold in this order.- Specified by:
setOrderLineItemsin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
orderLineItems- Items being sold in this order.- See Also:
-
setFulfillmentGroups
Description copied from interface:OrderGroups of items sharing the same fulfillment info (method, destination, payment info).Fulfillment groupsalso contain the cost of fulfillment, which may be discounted byoffers. If this list is empty, then no offers will be applied to fulfillment groups or fulfillment items.- Specified by:
setFulfillmentGroupsin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
fulfillmentGroups- Groups of items sharing the same fulfillment info.- See Also:
-
setVouchers
-
setCodes
Deprecated.Description copied from interface:OrderDTO containing codes used to apply offers to orders. These can be shared offer codes or tracking IDs for entities like Campaigns.- Specified by:
setCodesin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
codes- DTO containing codes used to apply offers to orders.
-
setOfferCodes
-
setRunOrderAndItemOffers
public void setRunOrderAndItemOffers(boolean runOrderAndItemOffers) Description copied from interface:OrderIf this is set to false, the offer engine will skip offers that target orders and order items and only attempt to apply fulfillment group and fulfillment item offers. Default is true.- Specified by:
setRunOrderAndItemOffersin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
runOrderAndItemOffers- whether to order and order item offers against this order.
-
setAttributes
Description copied from interface:OrderAdditional, unspecified attributes.- Specified by:
setAttributesin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
attributes- Additional, unspecified attributes.
-
setLocale
Description copied from interface:OrderTheLocalefor the order- Specified by:
setLocalein interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
locale- TheLocale
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) Description copied from interface:Order- Specified by:
setCurrencyin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
currency- TheCurrency.getCurrencyCode().
-
setCustomerContext
Description copied from interface:OrderTheCustomerContextassociated with the API request. The customer context contains information necessary for determining whether an offer applies to the customer sending the request.- Specified by:
setCustomerContextin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
customerContext- TheCustomerContextassociated with the API request.
-
setTimeOfRequest
Description copied from interface:OrderThe time that the request to apply offers to this order was made.- Specified by:
setTimeOfRequestin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
timeOfRequest- The time that the request to apply offers to this order was made.
-
setOrderSubmitDate
TheInstantof when this order was submitted.This is mainly used for post-checkout voucher offer validation purposes.
-
setCartSubtotal
public void setCartSubtotal(javax.money.MonetaryAmount cartSubtotal) -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-