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.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.The time that the request to apply offers to this order was made.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.voidDTO containing codes used to apply offers to orders.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 ordervoidsetOrderLineItems(List<O> orderLineItems) Items being sold in this order.voidsetOrderNumber(String orderNumber) Number used to identify this order.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.
-
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 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.- 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 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.- 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()TheLocalefor the order- Returns:
- The
Locale
-
setLocale
TheLocalefor 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()TheCustomerContextassociated with the API request. The customer context contains information necessary for determining whether an offer applies to the customer sending the request.- Returns:
- The
CustomerContextassociated with the API request.
-
setCustomerContext
TheCustomerContextassociated with the API request. The customer context contains information necessary for determining whether an offer applies to the customer sending the request.- Parameters:
customerContext- TheCustomerContextassociated with the API request.
-