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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds MyCartSetLineItemDistributionChannelAction with checking for non-null required valuesbuilds MyCartSetLineItemDistributionChannelAction 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 MyCartSetLineItemDistributionChannelActionBuilderof(MyCartSetLineItemDistributionChannelAction template) create builder for MyCartSetLineItemDistributionChannelAction instance
-
Constructor Details
-
MyCartSetLineItemDistributionChannelActionBuilder
public MyCartSetLineItemDistributionChannelActionBuilder()
-
-
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 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 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 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 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 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 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 MyCartSetLineItemDistributionChannelAction with checking for non-null required values- Specified by:
buildin 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
-