Class DeliveryAddedMessagePayloadBuilder

java.lang.Object
com.commercetools.api.models.message.DeliveryAddedMessagePayloadBuilder
All Implemented Interfaces:
Builder<DeliveryAddedMessagePayload>

public class DeliveryAddedMessagePayloadBuilder extends Object implements Builder<DeliveryAddedMessagePayload>
DeliveryAddedMessagePayloadBuilder
Example to create an instance using the builder pattern

     DeliveryAddedMessagePayload deliveryAddedMessagePayload = DeliveryAddedMessagePayload.builder()
             .delivery(deliveryBuilder -> deliveryBuilder)
             .build()
 
  • Constructor Details

    • DeliveryAddedMessagePayloadBuilder

      public DeliveryAddedMessagePayloadBuilder()
  • Method Details

    • delivery

      Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.

      Parameters:
      builder - function to build the delivery value
      Returns:
      Builder
    • withDelivery

      Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.

      Parameters:
      builder - function to build the delivery value
      Returns:
      Builder
    • delivery

      public DeliveryAddedMessagePayloadBuilder delivery(Delivery delivery)

      Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.

      Parameters:
      delivery - value to be set
      Returns:
      Builder
    • shippingKey

      public DeliveryAddedMessagePayloadBuilder shippingKey(@Nullable String shippingKey)

      User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

      Parameters:
      shippingKey - value to be set
      Returns:
      Builder
    • getDelivery

      public Delivery getDelivery()

      Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.

      Returns:
      delivery
    • getShippingKey

      @Nullable public String getShippingKey()

      User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

      Returns:
      shippingKey
    • build

      builds DeliveryAddedMessagePayload with checking for non-null required values
      Specified by:
      build in interface Builder<DeliveryAddedMessagePayload>
      Returns:
      DeliveryAddedMessagePayload
    • buildUnchecked

      public DeliveryAddedMessagePayload buildUnchecked()
      builds DeliveryAddedMessagePayload without checking for non-null required values
      Returns:
      DeliveryAddedMessagePayload
    • of

      factory method for an instance of DeliveryAddedMessagePayloadBuilder
      Returns:
      builder
    • of

      create builder for DeliveryAddedMessagePayload instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder