Interface OrderAddDeliveryAction

All Superinterfaces:
CustomizableDraft<OrderAddDeliveryAction>, OrderUpdateAction, ResourceUpdateAction<OrderUpdateAction>

public interface OrderAddDeliveryAction extends OrderUpdateAction, CustomizableDraft<OrderAddDeliveryAction>

A Delivery can only be added to an Order if its shippingInfo (for shippingMode = Single), or its shipping (for shippingMode = Multiple) exists.

Produces the Delivery Added Message.


Example to create an instance using the builder pattern

     OrderAddDeliveryAction orderAddDeliveryAction = OrderAddDeliveryAction.builder()
             .build()
 
  • Field Details

  • Method Details

    • getDeliveryKey

      String getDeliveryKey()

      key of an existing Delivery.

      Returns:
      deliveryKey
    • getShippingKey

      String getShippingKey()

      key of the ShippingMethod, required for Multiple ShippingMode.

      Returns:
      shippingKey
    • getItems

      @Valid @Valid List<DeliveryItem> getItems()

      Line Items or Custom Line Items to be included in the Delivery.

      Returns:
      items
    • getAddress

      @Valid @Valid BaseAddress getAddress()

      Address the parcels should be delivered to.

      Returns:
      address
    • getParcels

      @Valid @Valid List<ParcelDraft> getParcels()

      Parcels of the Delivery.

      If provided, this update action produces the Parcel Added To Delivery Message.

      Returns:
      parcels
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Delivery.

      Specified by:
      getCustom in interface CustomizableDraft<OrderAddDeliveryAction>
      Returns:
      custom
    • setDeliveryKey

      void setDeliveryKey(String deliveryKey)

      key of an existing Delivery.

      Parameters:
      deliveryKey - value to be set
    • setShippingKey

      void setShippingKey(String shippingKey)

      key of the ShippingMethod, required for Multiple ShippingMode.

      Parameters:
      shippingKey - value to be set
    • setItems

      void setItems(DeliveryItem... items)

      Line Items or Custom Line Items to be included in the Delivery.

      Parameters:
      items - values to be set
    • setItems

      void setItems(List<DeliveryItem> items)

      Line Items or Custom Line Items to be included in the Delivery.

      Parameters:
      items - values to be set
    • setAddress

      void setAddress(BaseAddress address)

      Address the parcels should be delivered to.

      Parameters:
      address - value to be set
    • setParcels

      void setParcels(ParcelDraft... parcels)

      Parcels of the Delivery.

      If provided, this update action produces the Parcel Added To Delivery Message.

      Parameters:
      parcels - values to be set
    • setParcels

      void setParcels(List<ParcelDraft> parcels)

      Parcels of the Delivery.

      If provided, this update action produces the Parcel Added To Delivery Message.

      Parameters:
      parcels - values to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the Delivery.

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

      factory method
      Returns:
      instance of OrderAddDeliveryAction
    • of

      factory method to create a shallow copy OrderAddDeliveryAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      builder factory method for OrderAddDeliveryAction
      Returns:
      builder
    • builder

      create builder for OrderAddDeliveryAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withOrderAddDeliveryAction

      default <T> T withOrderAddDeliveryAction(Function<OrderAddDeliveryAction,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<OrderAddDeliveryAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference