Interface CartAddShoppingListAction
- All Superinterfaces:
CartUpdateAction
,ResourceUpdateAction<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 Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartAddShoppingListAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartAddShoppingListActionbuilder
(CartAddShoppingListAction template) create builder for CartAddShoppingListAction instancestatic CartAddShoppingListAction
deepCopy
(CartAddShoppingListAction template) factory method to create a deep copy of CartAddShoppingListAction@Valid ChannelResourceIdentifier
distributionChannel
to set for all LineItems that are added to the Cart.@NotNull @Valid ShoppingListResourceIdentifier
Shopping List that contains the Line Items to be added.@Valid ChannelResourceIdentifier
supplyChannel
to set for all LineItems that are added to the Cart.static CartAddShoppingListAction
of()
factory methodstatic CartAddShoppingListAction
of
(CartAddShoppingListAction template) factory method to create a shallow copy CartAddShoppingListActionvoid
setDistributionChannel
(ChannelResourceIdentifier distributionChannel) distributionChannel
to set for all LineItems that are added to the Cart.void
setShoppingList
(ShoppingListResourceIdentifier shoppingList) Shopping List that contains the Line Items to be added.void
setSupplyChannel
(ChannelResourceIdentifier supplyChannel) supplyChannel
to set for all LineItems that are added to the Cart.static com.fasterxml.jackson.core.type.TypeReference<CartAddShoppingListAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
ADD_SHOPPING_LIST
discriminator value for CartAddShoppingListAction- See Also:
-
-
Method Details
-
getShoppingList
Shopping List that contains the Line Items to be added.
- Returns:
- shoppingList
-
getDistributionChannel
distributionChannel
to set for all LineItems that are added to the Cart. The Channel must have theProductDistribution
ChannelRoleEnum.- Returns:
- distributionChannel
-
getSupplyChannel
supplyChannel
to set for all LineItems that are added to the Cart. The Channel must have theInventorySupply
ChannelRoleEnum.- Returns:
- supplyChannel
-
setShoppingList
Shopping List that contains the Line Items to be added.
- Parameters:
shoppingList
- value to be set
-
setDistributionChannel
distributionChannel
to set for all LineItems that are added to the Cart. The Channel must have theProductDistribution
ChannelRoleEnum.- Parameters:
distributionChannel
- value to be set
-
setSupplyChannel
supplyChannel
to set for all LineItems that are added to the Cart. The Channel must have theInventorySupply
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
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-