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 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

      void setTimeOfRequest(Instant timeOfRequest)
      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

      void setOrderNumber(String orderNumber)
      Number used to identify this order.
      Parameters:
      orderNumber - Number used to identify this order.
    • getOrderLineItems

      List<O> getOrderLineItems()
      Items being sold in this order.
      Returns:
      Items being sold in this order.
      See Also:
    • setOrderLineItems

      void setOrderLineItems(List<O> orderLineItems)
      Items being sold in this order.
      Parameters:
      orderLineItems - Items being sold in this order.
      See Also:
    • getFulfillmentGroups

      List<F> 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 by offers. 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

      void setFulfillmentGroups(List<F> fulfillmentGroups)
      Groups of items sharing the same fulfillment info (method, destination, payment info). Fulfillment groups also contain the cost of fulfillment, which may be discounted by offers. 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

      void setCodes(Codes codes)
      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

      Map<String,Object> getAttributes()
      Additional, unspecified attributes.
      Returns:
      Additional, unspecified attributes
    • setAttributes

      void setAttributes(Map<String,Object> attributes)
      Additional, unspecified attributes.
      Parameters:
      attributes - Additional, unspecified attributes.
    • getLocale

      Locale getLocale()
      The Locale for the order
      Returns:
      The Locale
    • setLocale

      void setLocale(Locale locale)
      The Locale for the order
      Parameters:
      locale - The Locale
    • getCurrency

      javax.money.CurrencyUnit getCurrency()
      Returns:
      The Currency.getCurrencyCode().
    • setCurrency

      void setCurrency(javax.money.CurrencyUnit currency)
      Parameters:
      currency - The Currency.getCurrencyCode().
    • getCustomerContext

      CustomerContext getCustomerContext()
      The CustomerContext 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

      void setCustomerContext(CustomerContext customerContext)
      The CustomerContext 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 - The CustomerContext associated with the API request.