Interface CartSetLineItemPriceAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>

public interface CartSetLineItemPriceAction extends CartUpdateAction

Sets the LineItem price and changes the priceMode to ExternalPrice LineItemPriceMode.


Example to create an instance using the builder pattern

     CartSetLineItemPriceAction cartSetLineItemPriceAction = CartSetLineItemPriceAction.builder()
             .build()
 
  • Field Details

    • SET_LINE_ITEM_PRICE

      static final String SET_LINE_ITEM_PRICE
      discriminator value for CartSetLineItemPriceAction
      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
    • getExternalPrice

      @Valid @Valid Money getExternalPrice()

      Value to set. If externalPrice is not given and the priceMode is ExternalPrice, the external price is unset and the priceMode is set to Platform.

      Returns:
      externalPrice
    • 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
    • setExternalPrice

      void setExternalPrice(Money externalPrice)

      Value to set. If externalPrice is not given and the priceMode is ExternalPrice, the external price is unset and the priceMode is set to Platform.

      Parameters:
      externalPrice - value to be set
    • of

      factory method
      Returns:
      instance of CartSetLineItemPriceAction
    • of

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

      factory method to create a deep copy of CartSetLineItemPriceAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for CartSetLineItemPriceAction
      Returns:
      builder
    • builder

      create builder for CartSetLineItemPriceAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartSetLineItemPriceAction

      default <T> T withCartSetLineItemPriceAction(Function<CartSetLineItemPriceAction,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<CartSetLineItemPriceAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference