Interface CartAddShoppingListAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>

public interface CartAddShoppingListAction extends CartUpdateAction

Adds all LineItems of a ShoppingList to the Cart.


Example to create an instance using the builder pattern

     CartAddShoppingListAction cartAddShoppingListAction = CartAddShoppingListAction.builder()
             .shoppingList(shoppingListBuilder -> shoppingListBuilder)
             .build()
 
  • Field Details

    • ADD_SHOPPING_LIST

      static final String ADD_SHOPPING_LIST
      discriminator value for CartAddShoppingListAction
      See Also:
  • Method Details

    • getShoppingList

      @NotNull @Valid @NotNull @Valid ShoppingListResourceIdentifier getShoppingList()

      Shopping List that contains the Line Items to be added.

      Returns:
      shoppingList
    • getDistributionChannel

      @Valid @Valid ChannelResourceIdentifier getDistributionChannel()

      distributionChannel to set for all LineItems that are added to the Cart. The Channel must have the ProductDistribution ChannelRoleEnum.

      Returns:
      distributionChannel
    • getSupplyChannel

      @Valid @Valid ChannelResourceIdentifier getSupplyChannel()

      supplyChannel to set for all LineItems that are added to the Cart. The Channel must have the InventorySupply ChannelRoleEnum.

      Returns:
      supplyChannel
    • setShoppingList

      void setShoppingList(ShoppingListResourceIdentifier shoppingList)

      Shopping List that contains the Line Items to be added.

      Parameters:
      shoppingList - value to be set
    • setDistributionChannel

      void setDistributionChannel(ChannelResourceIdentifier distributionChannel)

      distributionChannel to set for all LineItems that are added to the Cart. The Channel must have the ProductDistribution ChannelRoleEnum.

      Parameters:
      distributionChannel - value to be set
    • setSupplyChannel

      void setSupplyChannel(ChannelResourceIdentifier supplyChannel)

      supplyChannel to set for all LineItems that are added to the Cart. The Channel must have the InventorySupply ChannelRoleEnum.

      Parameters:
      supplyChannel - value to be set
    • of

      factory method
      Returns:
      instance of CartAddShoppingListAction
    • of

      factory method to create a shallow copy CartAddShoppingListAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of CartAddShoppingListAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for CartAddShoppingListAction
      Returns:
      builder
    • builder

      create builder for CartAddShoppingListAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartAddShoppingListAction

      default <T> T withCartAddShoppingListAction(Function<CartAddShoppingListAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CartAddShoppingListAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference