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 boolean
boolean
Additional, unspecified attributes.javax.money.MonetaryAmount
getCodes()
Deprecated.javax.money.CurrencyUnit
TheCustomerContext
associated with the API request.Groups of items sharing the same fulfillment info (method, destination, payment info).TheLocale
for the orderItems being sold in this order.Number used to identify this order.TheInstant
of when this order was submitted.The time that the request to apply offers to this order was made.int
hashCode()
boolean
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.void
setAttributes
(Map<String, Object> attributes) Additional, unspecified attributes.void
setCartSubtotal
(javax.money.MonetaryAmount cartSubtotal) void
Deprecated.void
setCurrency
(javax.money.CurrencyUnit currency) void
setCustomerContext
(CustomerContext customerContext) TheCustomerContext
associated with the API request.void
setFulfillmentGroups
(List<F> fulfillmentGroups) Groups of items sharing the same fulfillment info (method, destination, payment info).void
TheLocale
for the ordervoid
setOfferCodes
(List<OfferCodeDto> offerCodes) void
setOrderLineItems
(List<OrderLineItemDto> orderLineItems) Items being sold in this order.void
setOrderNumber
(String orderNumber) Number used to identify this order.void
setOrderSubmitDate
(Instant orderSubmitDate) TheInstant
of when this order was submitted.void
setRunOrderAndItemOffers
(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.void
setTimeOfRequest
(Instant timeOfRequest) The time that the request to apply offers to this order was made.void
setVouchers
(List<Voucher> vouchers) toString()
-
Constructor Details
-
OrderDto
public OrderDto()
-
-
Method Details
-
getTimeOfRequest
Description copied from interface:Order
The time that the request to apply offers to this order was made.- Specified by:
getTimeOfRequest
in 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:Order
Number used to identify this order.- Specified by:
getOrderNumber
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- Number used to identify this order.
-
getOrderLineItems
Description copied from interface:Order
Items being sold in this order.- Specified by:
getOrderLineItems
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- Items being sold in this order.
- See Also:
-
getFulfillmentGroups
Description copied from interface:Order
Groups of items sharing the same fulfillment info (method, destination, payment info).Fulfillment groups
also 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:
getFulfillmentGroups
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- Groups of items sharing the same fulfillment info.
- See Also:
-
getVouchers
-
getCodes
Deprecated.Description copied from interface:Order
DTO containing codes used to apply offers to orders. These can be shared offer codes or tracking IDs for entities like Campaigns.- Specified by:
getCodes
in 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:Order
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. Default is true.- Specified by:
isRunOrderAndItemOffers
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- whether to run order and order item offers against this order.
-
getAttributes
Description copied from interface:Order
Additional, unspecified attributes.- Specified by:
getAttributes
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- Additional, unspecified attributes
-
getLocale
Description copied from interface:Order
TheLocale
for the order- Specified by:
getLocale
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- The
Locale
-
getCurrency
public javax.money.CurrencyUnit getCurrency()Description copied from interface:Order
- Specified by:
getCurrency
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- The
Currency.getCurrencyCode()
.
-
getCustomerContext
Description copied from interface:Order
TheCustomerContext
associated with the API request. The customer context contains information necessary for determining whether an offer applies to the customer sending the request.- Specified by:
getCustomerContext
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- The
CustomerContext
associated with the API request.
-
getOrderSubmitDate
TheInstant
of 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:Order
Number used to identify this order.- Specified by:
setOrderNumber
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
orderNumber
- Number used to identify this order.
-
setOrderLineItems
Description copied from interface:Order
Items being sold in this order.- Specified by:
setOrderLineItems
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
orderLineItems
- Items being sold in this order.- See Also:
-
setFulfillmentGroups
Description copied from interface:Order
Groups of items sharing the same fulfillment info (method, destination, payment info).Fulfillment groups
also 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:
setFulfillmentGroups
in 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:Order
DTO containing codes used to apply offers to orders. These can be shared offer codes or tracking IDs for entities like Campaigns.- Specified by:
setCodes
in 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:Order
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. Default is true.- Specified by:
setRunOrderAndItemOffers
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
runOrderAndItemOffers
- whether to order and order item offers against this order.
-
setAttributes
Description copied from interface:Order
Additional, unspecified attributes.- Specified by:
setAttributes
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
attributes
- Additional, unspecified attributes.
-
setLocale
Description copied from interface:Order
TheLocale
for the order- Specified by:
setLocale
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
locale
- TheLocale
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) Description copied from interface:Order
- Specified by:
setCurrency
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
currency
- TheCurrency.getCurrencyCode()
.
-
setCustomerContext
Description copied from interface:Order
TheCustomerContext
associated with the API request. The customer context contains information necessary for determining whether an offer applies to the customer sending the request.- Specified by:
setCustomerContext
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
customerContext
- TheCustomerContext
associated with the API request.
-
setTimeOfRequest
Description copied from interface:Order
The time that the request to apply offers to this order was made.- Specified by:
setTimeOfRequest
in interfaceOrder<OrderLineItemDto,
F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
timeOfRequest
- The time that the request to apply offers to this order was made.
-
setOrderSubmitDate
TheInstant
of 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()
-