Interface Order<O extends OrderLineItem,F extends FulfillmentGroup<?>>
- All Known Implementing Classes:
OrderDto
public interface Order<O extends OrderLineItem,F extends FulfillmentGroup<?>>
DTO for holding order data relevant for determining whether offers apply to a request.
- Author:
- Chad Harchar (charchar), Nathan Moore (nathanmoore)
-
Method Summary
Modifier and TypeMethodDescriptionAdditional, unspecified attributes.getCodes()
DTO containing codes used to apply offers to orders.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.The time that the request to apply offers to this order was made.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
DTO containing codes used to apply offers to orders.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
setOrderLineItems
(List<O> orderLineItems) Items being sold in this order.void
setOrderNumber
(String orderNumber) Number used to identify this order.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.
-
Method Details
-
getTimeOfRequest
Instant getTimeOfRequest()The time that the request to apply offers to this order was made.- Returns:
- The time that the request to apply offers to this order was made.
-
setTimeOfRequest
The time that the request to apply offers to this order was made.- Parameters:
timeOfRequest
- The time that the request to apply offers to this order was made.
-
getOrderNumber
String getOrderNumber()Number used to identify this order.- Returns:
- Number used to identify this order.
-
setOrderNumber
Number used to identify this order.- Parameters:
orderNumber
- Number used to identify this order.
-
getOrderLineItems
Items being sold in this order.- Returns:
- Items being sold in this order.
- See Also:
-
setOrderLineItems
Items being sold in this order.- Parameters:
orderLineItems
- Items being sold in this order.- See Also:
-
getFulfillmentGroups
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.- Returns:
- Groups of items sharing the same fulfillment info.
- See Also:
-
setFulfillmentGroups
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.- Parameters:
fulfillmentGroups
- Groups of items sharing the same fulfillment info.- See Also:
-
getCodes
Codes getCodes()DTO containing codes used to apply offers to orders. These can be shared offer codes or tracking IDs for entities like Campaigns.- Returns:
- DTO containing codes used to apply offers to orders.
-
setCodes
DTO containing codes used to apply offers to orders. These can be shared offer codes or tracking IDs for entities like Campaigns.- Parameters:
codes
- DTO containing codes used to apply offers to orders.
-
isRunOrderAndItemOffers
boolean isRunOrderAndItemOffers()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.- Returns:
- whether to run order and order item offers against this order.
-
setRunOrderAndItemOffers
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. Default is true.- Parameters:
runOrderAndItemOffers
- whether to order and order item offers against this order.
-
getAttributes
Additional, unspecified attributes.- Returns:
- Additional, unspecified attributes
-
setAttributes
Additional, unspecified attributes.- Parameters:
attributes
- Additional, unspecified attributes.
-
getLocale
Locale getLocale()TheLocale
for the order- Returns:
- The
Locale
-
setLocale
TheLocale
for the order- Parameters:
locale
- TheLocale
-
getCurrency
javax.money.CurrencyUnit getCurrency()- Returns:
- The
Currency.getCurrencyCode()
.
-
setCurrency
void setCurrency(javax.money.CurrencyUnit currency) - Parameters:
currency
- TheCurrency.getCurrencyCode()
.
-
getCustomerContext
CustomerContext getCustomerContext()TheCustomerContext
associated with the API request. The customer context contains information necessary for determining whether an offer applies to the customer sending the request.- Returns:
- The
CustomerContext
associated with the API request.
-
setCustomerContext
TheCustomerContext
associated with the API request. The customer context contains information necessary for determining whether an offer applies to the customer sending the request.- Parameters:
customerContext
- TheCustomerContext
associated with the API request.
-