Class OrderImpl

java.lang.Object
com.commercetools.api.models.order.OrderImpl
All Implemented Interfaces:
BaseResource, Customizable<Order>, DomainResource<Order>, Identifiable<Order>, Order, OrderLike<Order>, OrderMixin, Referencable<Order>, ResourceIdentifiable<Order>, Versioned<Order>, io.vrap.rmf.base.client.ModelBase

public class OrderImpl extends Object implements Order, io.vrap.rmf.base.client.ModelBase
Order
  • Constructor Details

    • OrderImpl

      public OrderImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Order.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<Order>
      Specified by:
      getId in interface Identifiable<Order>
      Specified by:
      getId in interface Order
      Specified by:
      getId in interface OrderLike<Order>
      Specified by:
      getId in interface Versioned<Order>
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Order.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<Order>
      Specified by:
      getVersion in interface Order
      Specified by:
      getVersion in interface OrderLike<Order>
      Specified by:
      getVersion in interface Versioned<Order>
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Order was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Specified by:
      getCreatedAt in interface Order
      Specified by:
      getCreatedAt in interface OrderLike<Order>
      Returns:
      createdAt
    • getLastModifiedAt

      public ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Order was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Specified by:
      getLastModifiedAt in interface Order
      Specified by:
      getLastModifiedAt in interface OrderLike<Order>
      Returns:
      lastModifiedAt
    • getOrderNumber

      public String getOrderNumber()

      User-defined identifier of the Order that is unique across a Project.

      Specified by:
      getOrderNumber in interface Order
      Returns:
      orderNumber
    • getPurchaseOrderNumber

      public String getPurchaseOrderNumber()

      User-defined identifier of a purchase Order.

      It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.

      Specified by:
      getPurchaseOrderNumber in interface Order
      Returns:
      purchaseOrderNumber
    • getCustomerId

      public String getCustomerId()

      id of the Customer that the Order belongs to.

      Specified by:
      getCustomerId in interface Order
      Specified by:
      getCustomerId in interface OrderLike<Order>
      Returns:
      customerId
    • getCustomerEmail

      public String getCustomerEmail()

      Email address of the Customer that the Order belongs to.

      Specified by:
      getCustomerEmail in interface Order
      Specified by:
      getCustomerEmail in interface OrderLike<Order>
      Returns:
      customerEmail
    • getCustomerGroup

      public CustomerGroupReference getCustomerGroup()

      Reference to the Customer Group of the Customer that the Order belongs to. Used for LineItem Price selection.

      Specified by:
      getCustomerGroup in interface Order
      Specified by:
      getCustomerGroup in interface OrderLike<Order>
      Returns:
      customerGroup
    • getAnonymousId

      public String getAnonymousId()

      Anonymous session associated with the Order.

      Specified by:
      getAnonymousId in interface Order
      Specified by:
      getAnonymousId in interface OrderLike<Order>
      Returns:
      anonymousId
    • getBusinessUnit

      public BusinessUnitKeyReference getBusinessUnit()

      Reference to a Business Unit the Order belongs to.

      Specified by:
      getBusinessUnit in interface Order
      Returns:
      businessUnit
    • getStore

      public StoreKeyReference getStore()

      Reference to a Store the Order belongs to.

      Specified by:
      getStore in interface Order
      Specified by:
      getStore in interface OrderLike<Order>
      Returns:
      store
    • getLineItems

      public List<LineItem> getLineItems()

      Line Items that are part of the Order.

      Specified by:
      getLineItems in interface Order
      Specified by:
      getLineItems in interface OrderLike<Order>
      Returns:
      lineItems
    • getCustomLineItems

      public List<CustomLineItem> getCustomLineItems()

      Custom Line Items that are part of the Order.

      Specified by:
      getCustomLineItems in interface Order
      Specified by:
      getCustomLineItems in interface OrderLike<Order>
      Returns:
      customLineItems
    • getTotalPrice

      public TypedMoney getTotalPrice()

      Sum of the totalPrice field of all LineItems and CustomLineItems, and if available, the price field of ShippingInfo. If a discount applies on totalPrice, this field holds the discounted value.

      Taxes are included if TaxRate includedInPrice is true for each price.

      Specified by:
      getTotalPrice in interface Order
      Specified by:
      getTotalPrice in interface OrderLike<Order>
      Returns:
      totalPrice
    • getTaxedPrice

      public TaxedPrice getTaxedPrice()
      • For Platform TaxMode, it is automatically set when a shipping address is set.
      • For External TaxMode, it is automatically set when shippingAddress and external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.

      If a discount applies on totalPrice, this field holds the discounted values.

      Specified by:
      getTaxedPrice in interface Order
      Specified by:
      getTaxedPrice in interface OrderLike<Order>
      Returns:
      taxedPrice
    • getTaxedShippingPrice

      public TaxedPrice getTaxedShippingPrice()

      Sum of the taxedPrice field of ShippingInfo across all Shipping Methods.

      Specified by:
      getTaxedShippingPrice in interface Order
      Returns:
      taxedShippingPrice
    • getDiscountOnTotalPrice

      public DiscountOnTotalPrice getDiscountOnTotalPrice()

      Discounts that apply on the total price of the Order.

      Specified by:
      getDiscountOnTotalPrice in interface Order
      Returns:
      discountOnTotalPrice
    • getTaxMode

      public TaxMode getTaxMode()

      Indicates how Tax Rates are set.

      Specified by:
      getTaxMode in interface Order
      Specified by:
      getTaxMode in interface OrderLike<Order>
      Returns:
      taxMode
    • getTaxRoundingMode

      public RoundingMode getTaxRoundingMode()

      Indicates how monetary values are rounded when calculating taxes for taxedPrice.

      Specified by:
      getTaxRoundingMode in interface Order
      Specified by:
      getTaxRoundingMode in interface OrderLike<Order>
      Returns:
      taxRoundingMode
    • getTaxCalculationMode

      public TaxCalculationMode getTaxCalculationMode()

      Indicates how taxes are calculated when calculating taxes for taxedPrice.

      Specified by:
      getTaxCalculationMode in interface Order
      Specified by:
      getTaxCalculationMode in interface OrderLike<Order>
      Returns:
      taxCalculationMode
    • getInventoryMode

      public InventoryMode getInventoryMode()

      Indicates how stock quantities are tracked for Line Items in the Order.

      Specified by:
      getInventoryMode in interface Order
      Specified by:
      getInventoryMode in interface OrderLike<Order>
      Returns:
      inventoryMode
    • getBillingAddress

      public Address getBillingAddress()

      Billing address associated with the Order.

      Specified by:
      getBillingAddress in interface Order
      Specified by:
      getBillingAddress in interface OrderLike<Order>
      Returns:
      billingAddress
    • getShippingAddress

      public Address getShippingAddress()

      Shipping address associated with the Order. Determines eligible ShippingMethod rates and Tax Rates of Line Items.

      Specified by:
      getShippingAddress in interface Order
      Specified by:
      getShippingAddress in interface OrderLike<Order>
      Returns:
      shippingAddress
    • getShippingMode

      public ShippingMode getShippingMode()

      Indicates whether there can be one or multiple Shipping Methods.

      Specified by:
      getShippingMode in interface Order
      Returns:
      shippingMode
    • getShippingKey

      public String getShippingKey()

      key of the ShippingMethod for Single ShippingMode.

      Specified by:
      getShippingKey in interface Order
      Returns:
      shippingKey
    • getShippingInfo

      public ShippingInfo getShippingInfo()

      Shipping-related information for Single ShippingMode. Automatically set when a Shipping Method is set.

      Specified by:
      getShippingInfo in interface Order
      Specified by:
      getShippingInfo in interface OrderLike<Order>
      Returns:
      shippingInfo
    • getShippingRateInput

      public ShippingRateInput getShippingRateInput()

      Input used to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

      • If CartClassification, it is ClassificationShippingRateInput.
      • If CartScore, it is ScoreShippingRateInput.
      • If CartValue, it cannot be used.
      Specified by:
      getShippingRateInput in interface Order
      Specified by:
      getShippingRateInput in interface OrderLike<Order>
      Returns:
      shippingRateInput
    • getShippingCustomFields

      public CustomFields getShippingCustomFields()

      Custom Fields of the Shipping Method for Single ShippingMode.

      Specified by:
      getShippingCustomFields in interface Order
      Specified by:
      getShippingCustomFields in interface OrderLike<Order>
      Returns:
      shippingCustomFields
    • getShipping

      public List<Shipping> getShipping()

      Shipping-related information for Multiple ShippingMode. Updated automatically each time a new Shipping Method is added.

      Specified by:
      getShipping in interface Order
      Returns:
      shipping
    • getItemShippingAddresses

      public List<Address> getItemShippingAddresses()

      Additional shipping addresses of the Order as specified by LineItems using the shippingDetails field. Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress, and not itemShippingAddresses.

      Specified by:
      getItemShippingAddresses in interface Order
      Specified by:
      getItemShippingAddresses in interface OrderLike<Order>
      Returns:
      itemShippingAddresses
    • getDiscountCodes

      public List<DiscountCodeInfo> getDiscountCodes()

      Discount Codes added to the Order. An Order that has directDiscounts cannot have discountCodes.

      Specified by:
      getDiscountCodes in interface Order
      Specified by:
      getDiscountCodes in interface OrderLike<Order>
      Returns:
      discountCodes
    • getDirectDiscounts

      public List<DirectDiscount> getDirectDiscounts()

      Direct Discounts added to the Order. An Order that has discountCodes cannot have directDiscounts.

      Specified by:
      getDirectDiscounts in interface Order
      Returns:
      directDiscounts
    • getRefusedGifts

      public List<CartDiscountReference> getRefusedGifts()

      Automatically set when a Line Item with GiftLineItem LineItemMode is removed from the Order.

      Specified by:
      getRefusedGifts in interface Order
      Specified by:
      getRefusedGifts in interface OrderLike<Order>
      Returns:
      refusedGifts
    • getPaymentInfo

      public PaymentInfo getPaymentInfo()

      Payment information related to the Order.

      Specified by:
      getPaymentInfo in interface Order
      Specified by:
      getPaymentInfo in interface OrderLike<Order>
      Returns:
      paymentInfo
    • getCountry

      public String getCountry()

      Used for LineItem Price selection.

      Specified by:
      getCountry in interface Order
      Specified by:
      getCountry in interface OrderLike<Order>
      Returns:
      country
    • getLocale

      public String getLocale()

      Languages of the Order. Can only contain languages supported by the Project.

      Specified by:
      getLocale in interface Order
      Specified by:
      getLocale in interface OrderLike<Order>
      Returns:
      locale
    • getOrigin

      public CartOrigin getOrigin()

      Indicates the origin of the Cart from which the Order was created.

      Specified by:
      getOrigin in interface Order
      Specified by:
      getOrigin in interface OrderLike<Order>
      Returns:
      origin
    • getCart

      public CartReference getCart()

      Reference to the Cart for an Order created from Cart. The referenced Cart will have the Ordered CartState.

      Specified by:
      getCart in interface Order
      Returns:
      cart
    • getQuote

      public QuoteReference getQuote()

      Reference to the Quote for an Order created from Quote.

      Specified by:
      getQuote in interface Order
      Returns:
      quote
    • getOrderState

      public OrderState getOrderState()

      Current status of the Order.

      Specified by:
      getOrderState in interface Order
      Returns:
      orderState
    • getShipmentState

      public ShipmentState getShipmentState()

      Shipment status of the Order.

      Specified by:
      getShipmentState in interface Order
      Returns:
      shipmentState
    • getPaymentState

      public PaymentState getPaymentState()

      Payment status of the Order.

      Specified by:
      getPaymentState in interface Order
      Returns:
      paymentState
    • getState

      public StateReference getState()

      State of the Order. This reference can point to a State in a custom workflow.

      Specified by:
      getState in interface Order
      Returns:
      state
    • getSyncInfo

      public List<SyncInfo> getSyncInfo()

      Contains synchronization activity information of the Order (like export or import). Can only be set with Update SyncInfo update action.

      Specified by:
      getSyncInfo in interface Order
      Returns:
      syncInfo
    • getReturnInfo

      public List<ReturnInfo> getReturnInfo()

      Contains information regarding the returns associated with the Order.

      Specified by:
      getReturnInfo in interface Order
      Returns:
      returnInfo
    • getLastMessageSequenceNumber

      @Deprecated public Long getLastMessageSequenceNumber()
      Deprecated.

      Internal-only field.

      Specified by:
      getLastMessageSequenceNumber in interface Order
      Returns:
      lastMessageSequenceNumber
    • getCustom

      public CustomFields getCustom()

      Custom Fields of the Order.

      Specified by:
      getCustom in interface Customizable<Order>
      Specified by:
      getCustom in interface Order
      Specified by:
      getCustom in interface OrderLike<Order>
      Returns:
      custom
    • getCompletedAt

      public ZonedDateTime getCompletedAt()

      User-defined date and time (UTC) of the Order. Present only on an Order created using Order Import.

      Specified by:
      getCompletedAt in interface Order
      Returns:
      completedAt
    • getLastModifiedBy

      public LastModifiedBy getLastModifiedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface Order
      Specified by:
      getLastModifiedBy in interface OrderLike<Order>
      Returns:
      lastModifiedBy
    • getCreatedBy

      public CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface Order
      Specified by:
      getCreatedBy in interface OrderLike<Order>
      Returns:
      createdBy
    • setId

      public void setId(String id)
      Description copied from interface: Order

      Unique identifier of the Order.

      Specified by:
      setId in interface BaseResource
      Specified by:
      setId in interface Order
      Parameters:
      id - value to be set
    • setVersion

      public void setVersion(Long version)
      Description copied from interface: Order

      Current version of the Order.

      Specified by:
      setVersion in interface BaseResource
      Specified by:
      setVersion in interface Order
      Parameters:
      version - value to be set
    • setCreatedAt

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: Order

      Date and time (UTC) the Order was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Specified by:
      setCreatedAt in interface Order
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: Order

      Date and time (UTC) the Order was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Specified by:
      setLastModifiedAt in interface Order
      Parameters:
      lastModifiedAt - value to be set
    • setOrderNumber

      public void setOrderNumber(String orderNumber)
      Description copied from interface: Order

      User-defined identifier of the Order that is unique across a Project.

      Specified by:
      setOrderNumber in interface Order
      Parameters:
      orderNumber - value to be set
    • setPurchaseOrderNumber

      public void setPurchaseOrderNumber(String purchaseOrderNumber)
      Description copied from interface: Order

      User-defined identifier of a purchase Order.

      It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.

      Specified by:
      setPurchaseOrderNumber in interface Order
      Parameters:
      purchaseOrderNumber - value to be set
    • setCustomerId

      public void setCustomerId(String customerId)
      Description copied from interface: Order

      id of the Customer that the Order belongs to.

      Specified by:
      setCustomerId in interface Order
      Parameters:
      customerId - value to be set
    • setCustomerEmail

      public void setCustomerEmail(String customerEmail)
      Description copied from interface: Order

      Email address of the Customer that the Order belongs to.

      Specified by:
      setCustomerEmail in interface Order
      Parameters:
      customerEmail - value to be set
    • setCustomerGroup

      public void setCustomerGroup(CustomerGroupReference customerGroup)
      Description copied from interface: Order

      Reference to the Customer Group of the Customer that the Order belongs to. Used for LineItem Price selection.

      Specified by:
      setCustomerGroup in interface Order
      Parameters:
      customerGroup - value to be set
    • setAnonymousId

      public void setAnonymousId(String anonymousId)
      Description copied from interface: Order

      Anonymous session associated with the Order.

      Specified by:
      setAnonymousId in interface Order
      Parameters:
      anonymousId - value to be set
    • setBusinessUnit

      public void setBusinessUnit(BusinessUnitKeyReference businessUnit)
      Description copied from interface: Order

      Reference to a Business Unit the Order belongs to.

      Specified by:
      setBusinessUnit in interface Order
      Parameters:
      businessUnit - value to be set
    • setStore

      public void setStore(StoreKeyReference store)
      Description copied from interface: Order

      Reference to a Store the Order belongs to.

      Specified by:
      setStore in interface Order
      Parameters:
      store - value to be set
    • setLineItems

      public void setLineItems(LineItem... lineItems)
      Description copied from interface: Order

      Line Items that are part of the Order.

      Specified by:
      setLineItems in interface Order
      Parameters:
      lineItems - values to be set
    • setLineItems

      public void setLineItems(List<LineItem> lineItems)
      Description copied from interface: Order

      Line Items that are part of the Order.

      Specified by:
      setLineItems in interface Order
      Parameters:
      lineItems - values to be set
    • setCustomLineItems

      public void setCustomLineItems(CustomLineItem... customLineItems)
      Description copied from interface: Order

      Custom Line Items that are part of the Order.

      Specified by:
      setCustomLineItems in interface Order
      Parameters:
      customLineItems - values to be set
    • setCustomLineItems

      public void setCustomLineItems(List<CustomLineItem> customLineItems)
      Description copied from interface: Order

      Custom Line Items that are part of the Order.

      Specified by:
      setCustomLineItems in interface Order
      Parameters:
      customLineItems - values to be set
    • setTotalPrice

      public void setTotalPrice(TypedMoney totalPrice)
      Description copied from interface: Order

      Sum of the totalPrice field of all LineItems and CustomLineItems, and if available, the price field of ShippingInfo. If a discount applies on totalPrice, this field holds the discounted value.

      Taxes are included if TaxRate includedInPrice is true for each price.

      Specified by:
      setTotalPrice in interface Order
      Parameters:
      totalPrice - value to be set
    • setTaxedPrice

      public void setTaxedPrice(TaxedPrice taxedPrice)
      Description copied from interface: Order
      • For Platform TaxMode, it is automatically set when a shipping address is set.
      • For External TaxMode, it is automatically set when shippingAddress and external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.

      If a discount applies on totalPrice, this field holds the discounted values.

      Specified by:
      setTaxedPrice in interface Order
      Parameters:
      taxedPrice - value to be set
    • setTaxedShippingPrice

      public void setTaxedShippingPrice(TaxedPrice taxedShippingPrice)
      Description copied from interface: Order

      Sum of the taxedPrice field of ShippingInfo across all Shipping Methods.

      Specified by:
      setTaxedShippingPrice in interface Order
      Parameters:
      taxedShippingPrice - value to be set
    • setDiscountOnTotalPrice

      public void setDiscountOnTotalPrice(DiscountOnTotalPrice discountOnTotalPrice)
      Description copied from interface: Order

      Discounts that apply on the total price of the Order.

      Specified by:
      setDiscountOnTotalPrice in interface Order
      Parameters:
      discountOnTotalPrice - value to be set
    • setTaxMode

      public void setTaxMode(TaxMode taxMode)
      Description copied from interface: Order

      Indicates how Tax Rates are set.

      Specified by:
      setTaxMode in interface Order
      Parameters:
      taxMode - value to be set
    • setTaxRoundingMode

      public void setTaxRoundingMode(RoundingMode taxRoundingMode)
      Description copied from interface: Order

      Indicates how monetary values are rounded when calculating taxes for taxedPrice.

      Specified by:
      setTaxRoundingMode in interface Order
      Parameters:
      taxRoundingMode - value to be set
    • setTaxCalculationMode

      public void setTaxCalculationMode(TaxCalculationMode taxCalculationMode)
      Description copied from interface: Order

      Indicates how taxes are calculated when calculating taxes for taxedPrice.

      Specified by:
      setTaxCalculationMode in interface Order
      Parameters:
      taxCalculationMode - value to be set
    • setInventoryMode

      public void setInventoryMode(InventoryMode inventoryMode)
      Description copied from interface: Order

      Indicates how stock quantities are tracked for Line Items in the Order.

      Specified by:
      setInventoryMode in interface Order
      Parameters:
      inventoryMode - value to be set
    • setBillingAddress

      public void setBillingAddress(Address billingAddress)
      Description copied from interface: Order

      Billing address associated with the Order.

      Specified by:
      setBillingAddress in interface Order
      Parameters:
      billingAddress - value to be set
    • setShippingAddress

      public void setShippingAddress(Address shippingAddress)
      Description copied from interface: Order

      Shipping address associated with the Order. Determines eligible ShippingMethod rates and Tax Rates of Line Items.

      Specified by:
      setShippingAddress in interface Order
      Parameters:
      shippingAddress - value to be set
    • setShippingMode

      public void setShippingMode(ShippingMode shippingMode)
      Description copied from interface: Order

      Indicates whether there can be one or multiple Shipping Methods.

      Specified by:
      setShippingMode in interface Order
      Parameters:
      shippingMode - value to be set
    • setShippingKey

      public void setShippingKey(String shippingKey)
      Description copied from interface: Order

      key of the ShippingMethod for Single ShippingMode.

      Specified by:
      setShippingKey in interface Order
      Parameters:
      shippingKey - value to be set
    • setShippingInfo

      public void setShippingInfo(ShippingInfo shippingInfo)
      Description copied from interface: Order

      Shipping-related information for Single ShippingMode. Automatically set when a Shipping Method is set.

      Specified by:
      setShippingInfo in interface Order
      Parameters:
      shippingInfo - value to be set
    • setShippingRateInput

      public void setShippingRateInput(ShippingRateInput shippingRateInput)
      Description copied from interface: Order

      Input used to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

      • If CartClassification, it is ClassificationShippingRateInput.
      • If CartScore, it is ScoreShippingRateInput.
      • If CartValue, it cannot be used.
      Specified by:
      setShippingRateInput in interface Order
      Parameters:
      shippingRateInput - value to be set
    • setShippingCustomFields

      public void setShippingCustomFields(CustomFields shippingCustomFields)
      Description copied from interface: Order

      Custom Fields of the Shipping Method for Single ShippingMode.

      Specified by:
      setShippingCustomFields in interface Order
      Parameters:
      shippingCustomFields - value to be set
    • setShipping

      public void setShipping(Shipping... shipping)
      Description copied from interface: Order

      Shipping-related information for Multiple ShippingMode. Updated automatically each time a new Shipping Method is added.

      Specified by:
      setShipping in interface Order
      Parameters:
      shipping - values to be set
    • setShipping

      public void setShipping(List<Shipping> shipping)
      Description copied from interface: Order

      Shipping-related information for Multiple ShippingMode. Updated automatically each time a new Shipping Method is added.

      Specified by:
      setShipping in interface Order
      Parameters:
      shipping - values to be set
    • setItemShippingAddresses

      public void setItemShippingAddresses(Address... itemShippingAddresses)
      Description copied from interface: Order

      Additional shipping addresses of the Order as specified by LineItems using the shippingDetails field. Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress, and not itemShippingAddresses.

      Specified by:
      setItemShippingAddresses in interface Order
      Parameters:
      itemShippingAddresses - values to be set
    • setItemShippingAddresses

      public void setItemShippingAddresses(List<Address> itemShippingAddresses)
      Description copied from interface: Order

      Additional shipping addresses of the Order as specified by LineItems using the shippingDetails field. Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress, and not itemShippingAddresses.

      Specified by:
      setItemShippingAddresses in interface Order
      Parameters:
      itemShippingAddresses - values to be set
    • setDiscountCodes

      public void setDiscountCodes(DiscountCodeInfo... discountCodes)
      Description copied from interface: Order

      Discount Codes added to the Order. An Order that has directDiscounts cannot have discountCodes.

      Specified by:
      setDiscountCodes in interface Order
      Parameters:
      discountCodes - values to be set
    • setDiscountCodes

      public void setDiscountCodes(List<DiscountCodeInfo> discountCodes)
      Description copied from interface: Order

      Discount Codes added to the Order. An Order that has directDiscounts cannot have discountCodes.

      Specified by:
      setDiscountCodes in interface Order
      Parameters:
      discountCodes - values to be set
    • setDirectDiscounts

      public void setDirectDiscounts(DirectDiscount... directDiscounts)
      Description copied from interface: Order

      Direct Discounts added to the Order. An Order that has discountCodes cannot have directDiscounts.

      Specified by:
      setDirectDiscounts in interface Order
      Parameters:
      directDiscounts - values to be set
    • setDirectDiscounts

      public void setDirectDiscounts(List<DirectDiscount> directDiscounts)
      Description copied from interface: Order

      Direct Discounts added to the Order. An Order that has discountCodes cannot have directDiscounts.

      Specified by:
      setDirectDiscounts in interface Order
      Parameters:
      directDiscounts - values to be set
    • setRefusedGifts

      public void setRefusedGifts(CartDiscountReference... refusedGifts)
      Description copied from interface: Order

      Automatically set when a Line Item with GiftLineItem LineItemMode is removed from the Order.

      Specified by:
      setRefusedGifts in interface Order
      Parameters:
      refusedGifts - values to be set
    • setRefusedGifts

      public void setRefusedGifts(List<CartDiscountReference> refusedGifts)
      Description copied from interface: Order

      Automatically set when a Line Item with GiftLineItem LineItemMode is removed from the Order.

      Specified by:
      setRefusedGifts in interface Order
      Parameters:
      refusedGifts - values to be set
    • setPaymentInfo

      public void setPaymentInfo(PaymentInfo paymentInfo)
      Description copied from interface: Order

      Payment information related to the Order.

      Specified by:
      setPaymentInfo in interface Order
      Parameters:
      paymentInfo - value to be set
    • setCountry

      public void setCountry(String country)
      Description copied from interface: Order

      Used for LineItem Price selection.

      Specified by:
      setCountry in interface Order
      Parameters:
      country - value to be set
    • setLocale

      public void setLocale(String locale)
      Description copied from interface: Order

      Languages of the Order. Can only contain languages supported by the Project.

      Specified by:
      setLocale in interface Order
      Parameters:
      locale - value to be set
    • setOrigin

      public void setOrigin(CartOrigin origin)
      Description copied from interface: Order

      Indicates the origin of the Cart from which the Order was created.

      Specified by:
      setOrigin in interface Order
      Parameters:
      origin - value to be set
    • setCart

      public void setCart(CartReference cart)
      Description copied from interface: Order

      Reference to the Cart for an Order created from Cart. The referenced Cart will have the Ordered CartState.

      Specified by:
      setCart in interface Order
      Parameters:
      cart - value to be set
    • setQuote

      public void setQuote(QuoteReference quote)
      Description copied from interface: Order

      Reference to the Quote for an Order created from Quote.

      Specified by:
      setQuote in interface Order
      Parameters:
      quote - value to be set
    • setOrderState

      public void setOrderState(OrderState orderState)
      Description copied from interface: Order

      Current status of the Order.

      Specified by:
      setOrderState in interface Order
      Parameters:
      orderState - value to be set
    • setShipmentState

      public void setShipmentState(ShipmentState shipmentState)
      Description copied from interface: Order

      Shipment status of the Order.

      Specified by:
      setShipmentState in interface Order
      Parameters:
      shipmentState - value to be set
    • setPaymentState

      public void setPaymentState(PaymentState paymentState)
      Description copied from interface: Order

      Payment status of the Order.

      Specified by:
      setPaymentState in interface Order
      Parameters:
      paymentState - value to be set
    • setState

      public void setState(StateReference state)
      Description copied from interface: Order

      State of the Order. This reference can point to a State in a custom workflow.

      Specified by:
      setState in interface Order
      Parameters:
      state - value to be set
    • setSyncInfo

      public void setSyncInfo(SyncInfo... syncInfo)
      Description copied from interface: Order

      Contains synchronization activity information of the Order (like export or import). Can only be set with Update SyncInfo update action.

      Specified by:
      setSyncInfo in interface Order
      Parameters:
      syncInfo - values to be set
    • setSyncInfo

      public void setSyncInfo(List<SyncInfo> syncInfo)
      Description copied from interface: Order

      Contains synchronization activity information of the Order (like export or import). Can only be set with Update SyncInfo update action.

      Specified by:
      setSyncInfo in interface Order
      Parameters:
      syncInfo - values to be set
    • setReturnInfo

      public void setReturnInfo(ReturnInfo... returnInfo)
      Description copied from interface: Order

      Contains information regarding the returns associated with the Order.

      Specified by:
      setReturnInfo in interface Order
      Parameters:
      returnInfo - values to be set
    • setReturnInfo

      public void setReturnInfo(List<ReturnInfo> returnInfo)
      Description copied from interface: Order

      Contains information regarding the returns associated with the Order.

      Specified by:
      setReturnInfo in interface Order
      Parameters:
      returnInfo - values to be set
    • setLastMessageSequenceNumber

      @Deprecated public void setLastMessageSequenceNumber(Long lastMessageSequenceNumber)
      Deprecated.
      Description copied from interface: Order

      Internal-only field.

      Specified by:
      setLastMessageSequenceNumber in interface Order
      Parameters:
      lastMessageSequenceNumber - value to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: Order

      Custom Fields of the Order.

      Specified by:
      setCustom in interface Customizable<Order>
      Specified by:
      setCustom in interface Order
      Parameters:
      custom - value to be set
    • setCompletedAt

      public void setCompletedAt(ZonedDateTime completedAt)
      Description copied from interface: Order

      User-defined date and time (UTC) of the Order. Present only on an Order created using Order Import.

      Specified by:
      setCompletedAt in interface Order
      Parameters:
      completedAt - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: Order

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface Order
      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: Order

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface Order
      Parameters:
      createdBy - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object