Class ItemShippingTargetBuilder

java.lang.Object
com.commercetools.importapi.models.orders.ItemShippingTargetBuilder
All Implemented Interfaces:
Builder<ItemShippingTarget>

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

     ItemShippingTarget itemShippingTarget = ItemShippingTarget.builder()
             .addressKey("{addressKey}")
             .quantity(0.3)
             .build()
 
  • Constructor Details

    • ItemShippingTargetBuilder

      public ItemShippingTargetBuilder()
  • Method Details

    • addressKey

      public ItemShippingTargetBuilder addressKey(String addressKey)

      Maps to ItemShippingTarget.addressKey.

      Parameters:
      addressKey - value to be set
      Returns:
      Builder
    • quantity

      public ItemShippingTargetBuilder quantity(Long quantity)

      Maps to ItemShippingTarget.quantity.

      Parameters:
      quantity - value to be set
      Returns:
      Builder
    • getAddressKey

      public String getAddressKey()

      Maps to ItemShippingTarget.addressKey.

      Returns:
      addressKey
    • getQuantity

      public Long getQuantity()

      Maps to ItemShippingTarget.quantity.

      Returns:
      quantity
    • build

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

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

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

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