Class OrderDto<F extends FulfillmentGroupDto<FulfillmentLineItemDto>>
- All Implemented Interfaces:
Order<OrderLineItemDto,,F> Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanHolds details about the active subscriptions for a userAdditional, unspecified attributes.javax.money.MonetaryAmountgetCodes()Deprecated.Generic structure to provide additional context to the offer engine.javax.money.CurrencyUnitTheCustomerContextassociated with the API request.Existing offers that are already applied to this order.getFlow()The current flow that this order is in.Holds details about the former subscriptions for a userGroups 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.If this is a subscription, this represents the next period this subscription will cover.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.voidsetActiveSubscriptionItems(List<SubscriptionItemDto> activeSubscriptionItems) Holds details about the active subscriptions for a uservoidsetAttributes(Map<String, Object> attributes) Additional, unspecified attributes.voidsetCartSubtotal(javax.money.MonetaryAmount cartSubtotal) voidDeprecated.voidsetContextMap(Map<String, Object> contextMap) Generic structure to provide additional context to the offer engine.voidsetCurrency(javax.money.CurrencyUnit currency) voidsetCustomerContext(CustomerContext customerContext) TheCustomerContextassociated with the API request.voidsetExistingOffers(List<ExistingOfferRef> existingOffers) Existing offers that are already applied to this order.voidThe current flow that this order is in.voidsetFormerSubscriptionItems(List<SubscriptionItemDto> formerSubscriptionItems) Holds details about the former subscriptions for a uservoidsetFulfillmentGroups(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.voidsetSubscriptionNextPeriod(Integer subscriptionNextPeriod) If this is a subscription, this represents the next period this subscription will cover.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() -
getContextMap
Generic structure to provide additional context to the offer engine. It is used for out of box offers such as dynamic amount offers and payment offers. It is intended to be used as a convenient extension point for customization needs between cart operations and the promotion engine. -
getFlow
The current flow that this order is in. This is used for offers targeting a specific flow.- Specified by:
getFlowin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Returns:
- The current flow that this order is in.
- Since:
- 2.0.4
- See Also:
-
getSubscriptionNextPeriod
If this is a subscription, this represents the next period this subscription will cover.For example, if this is a monthly subscription and the subscription is in its 5th month, the next period would be 6.
This is useful to determine an applied offer's begin and end periods, and to calculate the remaining periods that an offer can be applied to.
- Since:
- 2.0.4
-
getExistingOffers
Existing offers that are already applied to this order.Used for post-purchase flows for subscription such as
DefaultOrderFlow.SUBSCRIPTION_EDIT,DefaultOrderFlow.SUBSCRIPTION_UPGRADE, etc.- Since:
- 2.0.4
-
getActiveSubscriptionItems
Holds details about the active subscriptions for a user- Since:
- 2.0.4
-
getFormerSubscriptionItems
Holds details about the former subscriptions for a user- Since:
- 2.0.4
-
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) -
setContextMap
Generic structure to provide additional context to the offer engine. It is used for out of box offers such as dynamic amount offers and payment offers. It is intended to be used as a convenient extension point for customization needs between cart operations and the promotion engine. -
setFlow
The current flow that this order is in. This is used for offers targeting a specific flow.- Specified by:
setFlowin interfaceOrder<OrderLineItemDto,F extends FulfillmentGroupDto<FulfillmentLineItemDto>> - Parameters:
flow- The current flow that this order is in.- Since:
- 2.0.4
- See Also:
-
setSubscriptionNextPeriod
If this is a subscription, this represents the next period this subscription will cover.For example, if this is a monthly subscription and the subscription is in its 5th month, the next period would be 6.
This is useful to determine an applied offer's begin and end periods, and to calculate the remaining periods that an offer can be applied to.
- Since:
- 2.0.4
-
setExistingOffers
Existing offers that are already applied to this order.Used for post-purchase flows for subscription such as
DefaultOrderFlow.SUBSCRIPTION_EDIT,DefaultOrderFlow.SUBSCRIPTION_UPGRADE, etc.- Since:
- 2.0.4
-
setActiveSubscriptionItems
Holds details about the active subscriptions for a user- Since:
- 2.0.4
-
setFormerSubscriptionItems
Holds details about the former subscriptions for a user- Since:
- 2.0.4
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-