Class CartSetLineItemDistributionChannelActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetLineItemDistributionChannelActionBuilder
- All Implemented Interfaces:
Builder<CartSetLineItemDistributionChannelAction>
public class CartSetLineItemDistributionChannelActionBuilder
extends Object
implements Builder<CartSetLineItemDistributionChannelAction>
CartSetLineItemDistributionChannelActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetLineItemDistributionChannelAction cartSetLineItemDistributionChannelAction = CartSetLineItemDistributionChannelAction.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartSetLineItemDistributionChannelAction with checking for non-null required valuesbuilds CartSetLineItemDistributionChannelAction without checking for non-null required valuesdistributionChannel(ChannelResourceIdentifier distributionChannel) distributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) idof 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 CartSetLineItemDistributionChannelActionBuilderof(CartSetLineItemDistributionChannelAction template) create builder for CartSetLineItemDistributionChannelAction instance
-
Constructor Details
-
CartSetLineItemDistributionChannelActionBuilder
public CartSetLineItemDistributionChannelActionBuilder()
-
-
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
-
distributionChannel
public CartSetLineItemDistributionChannelActionBuilder distributionChannel(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 distribution channel is removed from the LineItem specified by
lineItemId. The Channel must have theProductDistributionChannelRoleEnum.
- Parameters:
builder- function to build the distributionChannel value- Returns:
- Builder
- If present, a Reference to the Channel is set for the LineItem specified by
-
withDistributionChannel
public CartSetLineItemDistributionChannelActionBuilder withDistributionChannel(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 distribution channel is removed from the LineItem specified by
lineItemId. The Channel must have theProductDistributionChannelRoleEnum.
- Parameters:
builder- function to build the distributionChannel value- Returns:
- Builder
- If present, a Reference to the Channel is set for the LineItem specified by
-
distributionChannel
public CartSetLineItemDistributionChannelActionBuilder distributionChannel(@Nullable ChannelResourceIdentifier distributionChannel) - If present, a Reference to the Channel is set for the LineItem specified by
lineItemId. - If not present, the current Reference to a distribution channel is removed from the LineItem specified by
lineItemId. The Channel must have theProductDistributionChannelRoleEnum.
- Parameters:
distributionChannel- 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
-
getDistributionChannel
- If present, a Reference to the Channel is set for the LineItem specified by
lineItemId. - If not present, the current Reference to a distribution channel is removed from the LineItem specified by
lineItemId. The Channel must have theProductDistributionChannelRoleEnum.
- Returns:
- distributionChannel
- If present, a Reference to the Channel is set for the LineItem specified by
-
build
builds CartSetLineItemDistributionChannelAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartSetLineItemDistributionChannelAction>- Returns:
- CartSetLineItemDistributionChannelAction
-
buildUnchecked
builds CartSetLineItemDistributionChannelAction without checking for non-null required values- Returns:
- CartSetLineItemDistributionChannelAction
-
of
factory method for an instance of CartSetLineItemDistributionChannelActionBuilder- Returns:
- builder
-
of
public static CartSetLineItemDistributionChannelActionBuilder of(CartSetLineItemDistributionChannelAction template) create builder for CartSetLineItemDistributionChannelAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-