Class MyShoppingListRemoveLineItemActionBuilder

java.lang.Object
com.commercetools.api.models.me.MyShoppingListRemoveLineItemActionBuilder
All Implemented Interfaces:
Builder<MyShoppingListRemoveLineItemAction>

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

     MyShoppingListRemoveLineItemAction myShoppingListRemoveLineItemAction = MyShoppingListRemoveLineItemAction.builder()
             .build()
 
  • Constructor Details

    • MyShoppingListRemoveLineItemActionBuilder

      public MyShoppingListRemoveLineItemActionBuilder()
  • 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

      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 MyShoppingListRemoveLineItemAction with checking for non-null required values
      Specified by:
      build in interface Builder<MyShoppingListRemoveLineItemAction>
      Returns:
      MyShoppingListRemoveLineItemAction
    • buildUnchecked

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

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

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