Class ShoppingListRemoveLineItemActionBuilder

java.lang.Object
com.commercetools.api.models.shopping_list.ShoppingListRemoveLineItemActionBuilder
All Implemented Interfaces:
Builder<ShoppingListRemoveLineItemAction>

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

     ShoppingListRemoveLineItemAction shoppingListRemoveLineItemAction = ShoppingListRemoveLineItemAction.builder()
             .build()
 
  • Constructor Details

    • ShoppingListRemoveLineItemActionBuilder

      public ShoppingListRemoveLineItemActionBuilder()
  • Method Details

    • lineItemId

      The id of the ShoppingListLineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemId - value to be set
      Returns:
      Builder
    • lineItemKey

      public ShoppingListRemoveLineItemActionBuilder lineItemKey(@Nullable String lineItemKey)

      The key of the ShoppingListLineItem to update. Either lineItemId or lineItemKey is required.

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

      Amount to remove from the quantity of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the current quantity of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.

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

      @Nullable public String getLineItemId()

      The id of the ShoppingListLineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemId
    • getLineItemKey

      @Nullable public String getLineItemKey()

      The key of the ShoppingListLineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemKey
    • getQuantity

      @Nullable public Long getQuantity()

      Amount to remove from the quantity of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the current quantity of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.

      Returns:
      quantity
    • build

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

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

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

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