Package com.commercetools.api.models.me
Interface MyCartSetLineItemDistributionChannelAction
- All Superinterfaces:
MyCartUpdateAction,ResourceUpdateAction<MyCartUpdateAction>
Setting a distribution channel for a LineItem can lead to an updated price as described in Line Item price selection.
Example to create an instance using the builder pattern
MyCartSetLineItemDistributionChannelAction myCartSetLineItemDistributionChannelAction = MyCartSetLineItemDistributionChannelAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for MyCartSetLineItemDistributionChannelAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for MyCartSetLineItemDistributionChannelActioncreate builder for MyCartSetLineItemDistributionChannelAction instancecopyDeep()factory method to create a deep copy of MyCartSetLineItemDistributionChannelAction@Valid ChannelResourceIdentifieridof the LineItem to update.keyof the LineItem to update.of()factory methodof(MyCartSetLineItemDistributionChannelAction template) factory method to create a shallow copy MyCartSetLineItemDistributionChannelActionvoidsetDistributionChannel(ChannelResourceIdentifier distributionChannel) voidsetLineItemId(String lineItemId) idof the LineItem to update.voidsetLineItemKey(String lineItemKey) keyof the LineItem to update.static com.fasterxml.jackson.core.type.TypeReference<MyCartSetLineItemDistributionChannelAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithMyCartSetLineItemDistributionChannelAction(Function<MyCartSetLineItemDistributionChannelAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.me.MyCartUpdateAction
getAction, withMyCartUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_LINE_ITEM_DISTRIBUTION_CHANNEL
discriminator value for MyCartSetLineItemDistributionChannelAction- See Also:
-
-
Method Details
-
getLineItemId
String getLineItemId()idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
getLineItemKey
String 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
-
setLineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set
-
setLineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemKey- value to be set
-
setDistributionChannel
- 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
- If present, a Reference to the Channel is set for the LineItem specified by
-
of
factory method- Returns:
- instance of MyCartSetLineItemDistributionChannelAction
-
of
static MyCartSetLineItemDistributionChannelAction of(MyCartSetLineItemDistributionChannelAction template) factory method to create a shallow copy MyCartSetLineItemDistributionChannelAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
MyCartSetLineItemDistributionChannelAction copyDeep()- Specified by:
copyDeepin interfaceMyCartUpdateAction
-
deepCopy
@Nullable static MyCartSetLineItemDistributionChannelAction deepCopy(@Nullable MyCartSetLineItemDistributionChannelAction template) factory method to create a deep copy of MyCartSetLineItemDistributionChannelAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyCartSetLineItemDistributionChannelAction- Returns:
- builder
-
builder
static MyCartSetLineItemDistributionChannelActionBuilder builder(MyCartSetLineItemDistributionChannelAction template) create builder for MyCartSetLineItemDistributionChannelAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withMyCartSetLineItemDistributionChannelAction
default <T> T withMyCartSetLineItemDistributionChannelAction(Function<MyCartSetLineItemDistributionChannelAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<MyCartSetLineItemDistributionChannelAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-