Interface StagedOrderSetLineItemDistributionChannelAction
- All Superinterfaces:
ResourceUpdateAction<StagedOrderUpdateAction>
,StagedOrderUpdateAction
Setting a distribution channel for a LineItem can lead to an updated price
as described in Line Item price selection.
Produces the OrderLineItemDistributionChannelSet Message.
Example to create an instance using the builder pattern
StagedOrderSetLineItemDistributionChannelAction stagedOrderSetLineItemDistributionChannelAction = StagedOrderSetLineItemDistributionChannelAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
discriminator value for StagedOrderSetLineItemDistributionChannelAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for StagedOrderSetLineItemDistributionChannelActioncreate builder for StagedOrderSetLineItemDistributionChannelAction instancefactory method to create a deep copy of StagedOrderSetLineItemDistributionChannelAction@Valid ChannelResourceIdentifier
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.of()
factory methodfactory method to create a shallow copy StagedOrderSetLineItemDistributionChannelActionvoid
setDistributionChannel
(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
.void
setLineItemId
(String lineItemId) id
of the LineItem to update.void
setLineItemKey
(String lineItemKey) key
of the LineItem to update.static com.fasterxml.jackson.core.type.TypeReference<StagedOrderSetLineItemDistributionChannelAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withStagedOrderSetLineItemDistributionChannelAction
(Function<StagedOrderSetLineItemDistributionChannelAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.order.StagedOrderUpdateAction
getAction, withStagedOrderUpdateAction
-
Field Details
-
SET_LINE_ITEM_DISTRIBUTION_CHANNEL
discriminator value for StagedOrderSetLineItemDistributionChannelAction- See Also:
-
-
Method Details
-
getLineItemId
String getLineItemId()id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
getLineItemKey
String 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
-
setLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set
-
setLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is 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 theProductDistribution
ChannelRoleEnum.
- 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 StagedOrderSetLineItemDistributionChannelAction
-
of
static StagedOrderSetLineItemDistributionChannelAction of(StagedOrderSetLineItemDistributionChannelAction template) factory method to create a shallow copy StagedOrderSetLineItemDistributionChannelAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static StagedOrderSetLineItemDistributionChannelAction deepCopy(@Nullable StagedOrderSetLineItemDistributionChannelAction template) factory method to create a deep copy of StagedOrderSetLineItemDistributionChannelAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StagedOrderSetLineItemDistributionChannelAction- Returns:
- builder
-
builder
static StagedOrderSetLineItemDistributionChannelActionBuilder builder(StagedOrderSetLineItemDistributionChannelAction template) create builder for StagedOrderSetLineItemDistributionChannelAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStagedOrderSetLineItemDistributionChannelAction
default <T> T withStagedOrderSetLineItemDistributionChannelAction(Function<StagedOrderSetLineItemDistributionChannelAction, 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<StagedOrderSetLineItemDistributionChannelAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-