Class DeliveryItemBuilder

java.lang.Object
com.commercetools.importapi.models.orders.DeliveryItemBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<DeliveryItem>

public class DeliveryItemBuilder extends Object implements io.vrap.rmf.base.client.Builder<DeliveryItem>
DeliveryItemBuilder
Example to create an instance using the builder pattern

     DeliveryItem deliveryItem = DeliveryItem.builder()
             .id("{id}")
             .quantity(0.3)
             .build()
 
  • Constructor Details

  • Method Details

    • id

      set the value to the id
      Parameters:
      id - value to be set
      Returns:
      Builder
    • quantity

      public DeliveryItemBuilder quantity(Double quantity)
      set the value to the quantity
      Parameters:
      quantity - value to be set
      Returns:
      Builder
    • getId

      public String getId()
      value of id}
      Returns:
      id
    • getQuantity

      public Double getQuantity()
      value of quantity}
      Returns:
      quantity
    • build

      public DeliveryItem build()
      builds DeliveryItem with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<DeliveryItem>
      Returns:
      DeliveryItem
    • buildUnchecked

      builds DeliveryItem without checking for non-null required values
      Returns:
      DeliveryItem
    • of

      public static DeliveryItemBuilder of()
      factory method for an instance of DeliveryItemBuilder
      Returns:
      builder
    • of

      public static DeliveryItemBuilder of(DeliveryItem template)
      create builder for DeliveryItem instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder