Class ItemShippingTargetBuilder

java.lang.Object
com.commercetools.history.models.common.ItemShippingTargetBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ItemShippingTarget>

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

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

  • Method Details

    • addressKey

      The key of the address in the cart's itemShippingAddresses

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

      The quantity of items that should go to the address with the specified addressKey. Only positive values are allowed. Using 0 as quantity is also possible in a draft object, but the element will not be present in the resulting ItemShippingDetails.

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

      The key of the address in the cart's itemShippingAddresses

      Returns:
      addressKey
    • getQuantity

      public Integer getQuantity()

      The quantity of items that should go to the address with the specified addressKey. Only positive values are allowed. Using 0 as quantity is also possible in a draft object, but the element will not be present in the resulting ItemShippingDetails.

      Returns:
      quantity
    • build

      builds ItemShippingTarget with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ItemShippingTarget>
      Returns:
      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

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