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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartSetLineItemDistributionChannelAction with checking for non-null required valuesbuilds CartSetLineItemDistributionChannelAction without checking for non-null required valuesdistributionChannel
(ChannelResourceIdentifier distributionChannel) If present, a Reference to the Channel is set for the LineItem specified bylineItemId
. If not present, the current Reference to a distribution channel is removed from the LineItem specified bylineItemId
.distributionChannel
(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) If present, a Reference to the Channel is set for the LineItem specified bylineItemId
. If not present, the current Reference to a distribution channel is removed from the LineItem specified bylineItemId
.If present, a Reference to the Channel is set for the LineItem specified bylineItemId
. If not present, the current Reference to a distribution channel is removed from the LineItem specified bylineItemId
.id
of the LineItem to update.key
of the LineItem to update.lineItemId
(String lineItemId) id
of the LineItem to update.lineItemKey
(String lineItemKey) key
of the LineItem to update.of()
factory method for an instance of CartSetLineItemDistributionChannelActionBuilderof
(CartSetLineItemDistributionChannelAction template) create builder for CartSetLineItemDistributionChannelAction instancewithDistributionChannel
(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) If present, a Reference to the Channel is set for the LineItem specified bylineItemId
. If not present, the current Reference to a distribution channel is removed from the LineItem specified bylineItemId
.
-
Constructor Details
-
CartSetLineItemDistributionChannelActionBuilder
public CartSetLineItemDistributionChannelActionBuilder()
-
-
Method Details
-
lineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
lineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is 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 theProductDistribution
ChannelRoleEnum.
- 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 theProductDistribution
ChannelRoleEnum.
- 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 theProductDistribution
ChannelRoleEnum.
- Parameters:
distributionChannel
- value to be set- Returns:
- Builder
- If present, a Reference to the Channel is set for the LineItem specified by
-
getLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
getLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is 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 theProductDistribution
ChannelRoleEnum.
- 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:
build
in 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
-