Package com.commercetools.api.models.me
Class MyCartSetLineItemSupplyChannelActionBuilder
java.lang.Object
com.commercetools.api.models.me.MyCartSetLineItemSupplyChannelActionBuilder
- All Implemented Interfaces:
Builder<MyCartSetLineItemSupplyChannelAction>
public class MyCartSetLineItemSupplyChannelActionBuilder
extends Object
implements Builder<MyCartSetLineItemSupplyChannelAction>
MyCartSetLineItemSupplyChannelActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MyCartSetLineItemSupplyChannelAction myCartSetLineItemSupplyChannelAction = MyCartSetLineItemSupplyChannelAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MyCartSetLineItemSupplyChannelAction with checking for non-null required valuesbuilds MyCartSetLineItemSupplyChannelAction without checking for non-null required valuesid
of the LineItem to update.key
of the LineItem to update.If present, a Reference to the Channel is set for the LineItem specified bylineItemId
. If not present, the current Reference to a supply channel will be removed from the LineItem specified bylineItemId
.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 MyCartSetLineItemSupplyChannelActionBuilderof
(MyCartSetLineItemSupplyChannelAction template) create builder for MyCartSetLineItemSupplyChannelAction instancesupplyChannel
(ChannelResourceIdentifier supplyChannel) If present, a Reference to the Channel is set for the LineItem specified bylineItemId
. If not present, the current Reference to a supply channel will be 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 supply channel will be 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 supply channel will be removed from the LineItem specified bylineItemId
.
-
Constructor Details
-
MyCartSetLineItemSupplyChannelActionBuilder
public MyCartSetLineItemSupplyChannelActionBuilder()
-
-
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
-
supplyChannel
public MyCartSetLineItemSupplyChannelActionBuilder 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 theInventorySupply
ChannelRoleEnum.
- 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 MyCartSetLineItemSupplyChannelActionBuilder 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 theInventorySupply
ChannelRoleEnum.
- 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 MyCartSetLineItemSupplyChannelActionBuilder 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 theInventorySupply
ChannelRoleEnum.
- Parameters:
supplyChannel
- 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
-
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 theInventorySupply
ChannelRoleEnum.
- Returns:
- supplyChannel
- If present, a Reference to the Channel is set for the LineItem specified by
-
build
builds MyCartSetLineItemSupplyChannelAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyCartSetLineItemSupplyChannelAction>
- Returns:
- MyCartSetLineItemSupplyChannelAction
-
buildUnchecked
builds MyCartSetLineItemSupplyChannelAction without checking for non-null required values- Returns:
- MyCartSetLineItemSupplyChannelAction
-
of
factory method for an instance of MyCartSetLineItemSupplyChannelActionBuilder- Returns:
- builder
-
of
public static MyCartSetLineItemSupplyChannelActionBuilder of(MyCartSetLineItemSupplyChannelAction template) create builder for MyCartSetLineItemSupplyChannelAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-