Interface OrderImportDraft

All Superinterfaces:
CustomizableDraft<OrderImportDraft>, Draft<OrderImportDraft>

public interface OrderImportDraft extends CustomizableDraft<OrderImportDraft>, Draft<OrderImportDraft>

A snapshot of an Order at the time it was imported.


Example to create an instance using the builder pattern

     OrderImportDraft orderImportDraft = OrderImportDraft.builder()
             .totalPrice(totalPriceBuilder -> totalPriceBuilder)
             .build()
 
  • Method Details

    • getOrderNumber

      String getOrderNumber()

      User-defined identifier of the Order. Must be unique across a Project. Once set, the value cannot be changed.

      Returns:
      orderNumber
    • getPurchaseOrderNumber

      String getPurchaseOrderNumber()

      User-defined identifier for a purchase Order.

      Returns:
      purchaseOrderNumber
    • getCustomerId

      String getCustomerId()

      The id of the Customer the Order belongs to.

      Returns:
      customerId
    • getCustomerEmail

      String getCustomerEmail()

      The Email address of the Customer the Order belongs to. Can be used instead of customerId when no check against existing Customers is required.

      Returns:
      customerEmail
    • getCustomerGroup

      @Valid @Valid CustomerGroupResourceIdentifier getCustomerGroup()

      The Customer Group of the Customer the Order belongs to.

      Returns:
      customerGroup
    • getBusinessUnit

      @Valid @Valid BusinessUnitResourceIdentifier getBusinessUnit()

      ResourceIdentifier to the Business Unit the Order should belong to. When the customerId of the Order is also set, the Customer must be an Associate of the Business Unit.

      Returns:
      businessUnit
    • getStore

      @Valid @Valid StoreResourceIdentifier getStore()

      The Store the Order belongs to. Used for filtering.

      If a LineItemImportDraft or a CustomLineItemImportDraft specifies a distributionChannel or a supplyChannel that is not defined for the referenced Store, the Order Import gets rejected. The same applies when the provided country is not defined for the referenced Store.

      Returns:
      store
    • getLineItems

      @Valid @Valid List<LineItemImportDraft> getLineItems()

      Line Items to add to the Order.

      If not specified, customLineItems must not be empty.

      Returns:
      lineItems
    • getCustomLineItems

      @Valid @Valid List<CustomLineItemImportDraft> getCustomLineItems()

      Custom Line Items to add to the Cart.

      If not specified, lineItems must not be empty.

      Returns:
      customLineItems
    • getTotalPrice

      @NotNull @Valid @NotNull @Valid Money getTotalPrice()

      The total Price of the Order. The amount can be negative.

      Returns:
      totalPrice
    • getTaxedPrice

      @Valid @Valid TaxedPriceDraft getTaxedPrice()

      Include TaxedPrice information for the Order. If not included, and if you have Tax Rates set for Line Items and Custom Line Items, the Order total will not be recalculated.

      Returns:
      taxedPrice
    • getTaxRoundingMode

      RoundingMode getTaxRoundingMode()

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

      Returns:
      taxRoundingMode
    • getTaxCalculationMode

      TaxCalculationMode getTaxCalculationMode()

      Determines how taxes are calculated for taxedPrice.

      Returns:
      taxCalculationMode
    • getInventoryMode

      InventoryMode getInventoryMode()

      Determines how stock quantities are tracked for Line Items in the Cart.

      Returns:
      inventoryMode
    • getBillingAddress

      @Valid @Valid BaseAddress getBillingAddress()

      Billing address associated with the Order.

      Returns:
      billingAddress
    • getShippingAddress

      @Valid @Valid BaseAddress getShippingAddress()

      Shipping address associated with the Order.

      Returns:
      shippingAddress
    • getItemShippingAddresses

      @Valid @Valid List<BaseAddress> getItemShippingAddresses()

      Addresses for Orders with multiple shipping addresses. Addresses must include a value for key.

      Returns:
      itemShippingAddresses
    • getShippingInfo

      @Valid @Valid ShippingInfoImportDraft getShippingInfo()

      Shipping-related information of the Order.

      Returns:
      shippingInfo
    • getPaymentInfo

      @Valid @Valid PaymentInfo getPaymentInfo()

      Payment information associated with the Order.

      Returns:
      paymentInfo
    • getPaymentState

      PaymentState getPaymentState()

      Payment status of the Order.

      Returns:
      paymentState
    • getShipmentState

      ShipmentState getShipmentState()

      Shipment status of the Order.

      Returns:
      shipmentState
    • getOrderState

      OrderState getOrderState()

      Current status of the Order.

      Returns:
      orderState
    • getState

      @Valid @Valid StateReference getState()

      State of the Order in a custom workflow.

      Returns:
      state
    • getCountry

      String getCountry()

      Include a value to associate a country with the Order.

      Returns:
      country
    • getOrigin

      CartOrigin getOrigin()

      Indicates the origin of the Order.

      Returns:
      origin
    • getCompletedAt

      ZonedDateTime getCompletedAt()

      User-defined date and time for the Order. This value does not influence the createdAt or lastModifiedAt values of the Order created by the Order Import.

      Returns:
      completedAt
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Order.

      Specified by:
      getCustom in interface CustomizableDraft<OrderImportDraft>
      Returns:
      custom
    • setOrderNumber

      void setOrderNumber(String orderNumber)

      User-defined identifier of the Order. Must be unique across a Project. Once set, the value cannot be changed.

      Parameters:
      orderNumber - value to be set
    • setPurchaseOrderNumber

      void setPurchaseOrderNumber(String purchaseOrderNumber)

      User-defined identifier for a purchase Order.

      Parameters:
      purchaseOrderNumber - value to be set
    • setCustomerId

      void setCustomerId(String customerId)

      The id of the Customer the Order belongs to.

      Parameters:
      customerId - value to be set
    • setCustomerEmail

      void setCustomerEmail(String customerEmail)

      The Email address of the Customer the Order belongs to. Can be used instead of customerId when no check against existing Customers is required.

      Parameters:
      customerEmail - value to be set
    • setCustomerGroup

      void setCustomerGroup(CustomerGroupResourceIdentifier customerGroup)

      The Customer Group of the Customer the Order belongs to.

      Parameters:
      customerGroup - value to be set
    • setBusinessUnit

      void setBusinessUnit(BusinessUnitResourceIdentifier businessUnit)

      ResourceIdentifier to the Business Unit the Order should belong to. When the customerId of the Order is also set, the Customer must be an Associate of the Business Unit.

      Parameters:
      businessUnit - value to be set
    • setStore

      void setStore(StoreResourceIdentifier store)

      The Store the Order belongs to. Used for filtering.

      If a LineItemImportDraft or a CustomLineItemImportDraft specifies a distributionChannel or a supplyChannel that is not defined for the referenced Store, the Order Import gets rejected. The same applies when the provided country is not defined for the referenced Store.

      Parameters:
      store - value to be set
    • setLineItems

      void setLineItems(LineItemImportDraft... lineItems)

      Line Items to add to the Order.

      If not specified, customLineItems must not be empty.

      Parameters:
      lineItems - values to be set
    • setLineItems

      void setLineItems(List<LineItemImportDraft> lineItems)

      Line Items to add to the Order.

      If not specified, customLineItems must not be empty.

      Parameters:
      lineItems - values to be set
    • setCustomLineItems

      void setCustomLineItems(CustomLineItemImportDraft... customLineItems)

      Custom Line Items to add to the Cart.

      If not specified, lineItems must not be empty.

      Parameters:
      customLineItems - values to be set
    • setCustomLineItems

      void setCustomLineItems(List<CustomLineItemImportDraft> customLineItems)

      Custom Line Items to add to the Cart.

      If not specified, lineItems must not be empty.

      Parameters:
      customLineItems - values to be set
    • setTotalPrice

      void setTotalPrice(Money totalPrice)

      The total Price of the Order. The amount can be negative.

      Parameters:
      totalPrice - value to be set
    • setTaxedPrice

      void setTaxedPrice(TaxedPriceDraft taxedPrice)

      Include TaxedPrice information for the Order. If not included, and if you have Tax Rates set for Line Items and Custom Line Items, the Order total will not be recalculated.

      Parameters:
      taxedPrice - value to be set
    • setTaxRoundingMode

      void setTaxRoundingMode(RoundingMode taxRoundingMode)

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

      Parameters:
      taxRoundingMode - value to be set
    • setTaxCalculationMode

      void setTaxCalculationMode(TaxCalculationMode taxCalculationMode)

      Determines how taxes are calculated for taxedPrice.

      Parameters:
      taxCalculationMode - value to be set
    • setInventoryMode

      void setInventoryMode(InventoryMode inventoryMode)

      Determines how stock quantities are tracked for Line Items in the Cart.

      Parameters:
      inventoryMode - value to be set
    • setBillingAddress

      void setBillingAddress(BaseAddress billingAddress)

      Billing address associated with the Order.

      Parameters:
      billingAddress - value to be set
    • setShippingAddress

      void setShippingAddress(BaseAddress shippingAddress)

      Shipping address associated with the Order.

      Parameters:
      shippingAddress - value to be set
    • setItemShippingAddresses

      void setItemShippingAddresses(BaseAddress... itemShippingAddresses)

      Addresses for Orders with multiple shipping addresses. Addresses must include a value for key.

      Parameters:
      itemShippingAddresses - values to be set
    • setItemShippingAddresses

      void setItemShippingAddresses(List<BaseAddress> itemShippingAddresses)

      Addresses for Orders with multiple shipping addresses. Addresses must include a value for key.

      Parameters:
      itemShippingAddresses - values to be set
    • setShippingInfo

      void setShippingInfo(ShippingInfoImportDraft shippingInfo)

      Shipping-related information of the Order.

      Parameters:
      shippingInfo - value to be set
    • setPaymentInfo

      void setPaymentInfo(PaymentInfo paymentInfo)

      Payment information associated with the Order.

      Parameters:
      paymentInfo - value to be set
    • setPaymentState

      void setPaymentState(PaymentState paymentState)

      Payment status of the Order.

      Parameters:
      paymentState - value to be set
    • setShipmentState

      void setShipmentState(ShipmentState shipmentState)

      Shipment status of the Order.

      Parameters:
      shipmentState - value to be set
    • setOrderState

      void setOrderState(OrderState orderState)

      Current status of the Order.

      Parameters:
      orderState - value to be set
    • setState

      void setState(StateReference state)

      State of the Order in a custom workflow.

      Parameters:
      state - value to be set
    • setCountry

      void setCountry(String country)

      Include a value to associate a country with the Order.

      Parameters:
      country - value to be set
    • setOrigin

      void setOrigin(CartOrigin origin)

      Indicates the origin of the Order.

      Parameters:
      origin - value to be set
    • setCompletedAt

      void setCompletedAt(ZonedDateTime completedAt)

      User-defined date and time for the Order. This value does not influence the createdAt or lastModifiedAt values of the Order created by the Order Import.

      Parameters:
      completedAt - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the Order.

      Specified by:
      setCustom in interface CustomizableDraft<OrderImportDraft>
      Parameters:
      custom - value to be set
    • of

      static OrderImportDraft of()
      factory method
      Returns:
      instance of OrderImportDraft
    • of

      static OrderImportDraft of(OrderImportDraft template)
      factory method to create a shallow copy OrderImportDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of OrderImportDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static OrderImportDraftBuilder builder()
      builder factory method for OrderImportDraft
      Returns:
      builder
    • builder

      static OrderImportDraftBuilder builder(OrderImportDraft template)
      create builder for OrderImportDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withOrderImportDraft

      default <T> T withOrderImportDraft(Function<OrderImportDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<OrderImportDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference