Class CartSetLineItemSupplyChannelActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetLineItemSupplyChannelActionBuilder
- All Implemented Interfaces:
Builder<CartSetLineItemSupplyChannelAction>
public class CartSetLineItemSupplyChannelActionBuilder
extends Object
implements Builder<CartSetLineItemSupplyChannelAction>
CartSetLineItemSupplyChannelActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetLineItemSupplyChannelAction cartSetLineItemSupplyChannelAction = CartSetLineItemSupplyChannelAction.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartSetLineItemSupplyChannelAction with checking for non-null required valuesbuilds CartSetLineItemSupplyChannelAction without checking for non-null required valuesidof the LineItem to update.keyof the LineItem to update.lineItemId(String lineItemId) idof the LineItem to update.lineItemKey(String lineItemKey) keyof the LineItem to update.of()factory method for an instance of CartSetLineItemSupplyChannelActionBuilderof(CartSetLineItemSupplyChannelAction template) create builder for CartSetLineItemSupplyChannelAction instancesupplyChannel(ChannelResourceIdentifier supplyChannel)
-
Constructor Details
-
CartSetLineItemSupplyChannelActionBuilder
public CartSetLineItemSupplyChannelActionBuilder()
-
-
Method Details
-
lineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set- Returns:
- Builder
-
lineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemKey- value to be set- Returns:
- Builder
-
supplyChannel
public CartSetLineItemSupplyChannelActionBuilder supplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) - If present, a Reference to the Channel is set for the LineItem specified by
lineItemId. - If not present, the current Reference to a supply channel will be removed from the LineItem specified by
lineItemId. The Channel must have theInventorySupplyChannelRoleEnum.
- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
- If present, a Reference to the Channel is set for the LineItem specified by
-
withSupplyChannel
public CartSetLineItemSupplyChannelActionBuilder withSupplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) - If present, a Reference to the Channel is set for the LineItem specified by
lineItemId. - If not present, the current Reference to a supply channel will be removed from the LineItem specified by
lineItemId. The Channel must have theInventorySupplyChannelRoleEnum.
- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
- If present, a Reference to the Channel is set for the LineItem specified by
-
supplyChannel
public CartSetLineItemSupplyChannelActionBuilder supplyChannel(@Nullable ChannelResourceIdentifier supplyChannel) - If present, a Reference to the Channel is set for the LineItem specified by
lineItemId. - If not present, the current Reference to a supply channel will be removed from the LineItem specified by
lineItemId. The Channel must have theInventorySupplyChannelRoleEnum.
- Parameters:
supplyChannel- value to be set- Returns:
- Builder
- If present, a Reference to the Channel is set for the LineItem specified by
-
getLineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
getLineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemKey
-
getSupplyChannel
- If present, a Reference to the Channel is set for the LineItem specified by
lineItemId. - If not present, the current Reference to a supply channel will be removed from the LineItem specified by
lineItemId. The Channel must have theInventorySupplyChannelRoleEnum.
- Returns:
- supplyChannel
- If present, a Reference to the Channel is set for the LineItem specified by
-
build
builds CartSetLineItemSupplyChannelAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartSetLineItemSupplyChannelAction>- Returns:
- CartSetLineItemSupplyChannelAction
-
buildUnchecked
builds CartSetLineItemSupplyChannelAction without checking for non-null required values- Returns:
- CartSetLineItemSupplyChannelAction
-
of
factory method for an instance of CartSetLineItemSupplyChannelActionBuilder- Returns:
- builder
-
of
public static CartSetLineItemSupplyChannelActionBuilder of(CartSetLineItemSupplyChannelAction template) create builder for CartSetLineItemSupplyChannelAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-