Class ShoppingListChangeLineItemQuantityActionBuilder

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

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

     ShoppingListChangeLineItemQuantityAction shoppingListChangeLineItemQuantityAction = ShoppingListChangeLineItemQuantityAction.builder()
             .quantity(0.3)
             .build()
 
  • Constructor Details

    • ShoppingListChangeLineItemQuantityActionBuilder

      public ShoppingListChangeLineItemQuantityActionBuilder()
  • Method Details

    • lineItemId

      public ShoppingListChangeLineItemQuantityActionBuilder lineItemId(@Nullable String lineItemId)

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

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

      public ShoppingListChangeLineItemQuantityActionBuilder 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

      New value to set. If 0, 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

      public Long getQuantity()

      New value to set. If 0, the ShoppingListLineItem is removed from the ShoppingList.

      Returns:
      quantity
    • build

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

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

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

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