Interface MyCartSetLineItemDistributionChannelAction

All Superinterfaces:
MyCartUpdateAction, ResourceUpdateAction<MyCartUpdateAction>

public interface MyCartSetLineItemDistributionChannelAction extends MyCartUpdateAction

Setting a distribution channel for a LineItem can lead to an updated price as described in LineItem Price selection.


Example to create an instance using the builder pattern

     MyCartSetLineItemDistributionChannelAction myCartSetLineItemDistributionChannelAction = MyCartSetLineItemDistributionChannelAction.builder()
             .build()
 
  • Field Details

    • SET_LINE_ITEM_DISTRIBUTION_CHANNEL

      static final String SET_LINE_ITEM_DISTRIBUTION_CHANNEL
      discriminator value for MyCartSetLineItemDistributionChannelAction
      See Also:
  • Method Details

    • getLineItemId

      String getLineItemId()

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemId
    • getLineItemKey

      String getLineItemKey()

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemKey
    • getDistributionChannel

      @Valid @Valid ChannelResourceIdentifier 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 the ProductDistribution ChannelRoleEnum.
      Returns:
      distributionChannel
    • setLineItemId

      void setLineItemId(String lineItemId)

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemId - value to be set
    • setLineItemKey

      void setLineItemKey(String lineItemKey)

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemKey - value to be set
    • setDistributionChannel

      void setDistributionChannel(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 the ProductDistribution ChannelRoleEnum.
      Parameters:
      distributionChannel - value to be set
    • of

      factory method
      Returns:
      instance of MyCartSetLineItemDistributionChannelAction
    • of

      factory method to create a shallow copy MyCartSetLineItemDistributionChannelAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      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

      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