Package com.commercetools.api.models.me
Class MyCartSetLineItemDistributionChannelActionBuilder
java.lang.Object
com.commercetools.api.models.me.MyCartSetLineItemDistributionChannelActionBuilder
- All Implemented Interfaces:
Builder<MyCartSetLineItemDistributionChannelAction>
public class MyCartSetLineItemDistributionChannelActionBuilder
extends Object
implements Builder<MyCartSetLineItemDistributionChannelAction>
MyCartSetLineItemDistributionChannelActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MyCartSetLineItemDistributionChannelAction myCartSetLineItemDistributionChannelAction = MyCartSetLineItemDistributionChannelAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MyCartSetLineItemDistributionChannelAction with checking for non-null required valuesbuilds MyCartSetLineItemDistributionChannelAction 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 MyCartSetLineItemDistributionChannelActionBuilderof
(MyCartSetLineItemDistributionChannelAction template) create builder for MyCartSetLineItemDistributionChannelAction 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
-
MyCartSetLineItemDistributionChannelActionBuilder
public MyCartSetLineItemDistributionChannelActionBuilder()
-
-
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 MyCartSetLineItemDistributionChannelActionBuilder 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 MyCartSetLineItemDistributionChannelActionBuilder 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 MyCartSetLineItemDistributionChannelActionBuilder 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 MyCartSetLineItemDistributionChannelAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyCartSetLineItemDistributionChannelAction>
- Returns:
- MyCartSetLineItemDistributionChannelAction
-
buildUnchecked
builds MyCartSetLineItemDistributionChannelAction without checking for non-null required values- Returns:
- MyCartSetLineItemDistributionChannelAction
-
of
factory method for an instance of MyCartSetLineItemDistributionChannelActionBuilder- Returns:
- builder
-
of
public static MyCartSetLineItemDistributionChannelActionBuilder of(MyCartSetLineItemDistributionChannelAction template) create builder for MyCartSetLineItemDistributionChannelAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-