Interface MyCartRemoveLineItemAction

All Superinterfaces:
MyCartUpdateAction, ResourceUpdateAction<MyCartUpdateAction>

public interface MyCartRemoveLineItemAction extends MyCartUpdateAction

The LineItem price is updated as described in LineItem Price selection.


Example to create an instance using the builder pattern

     MyCartRemoveLineItemAction myCartRemoveLineItemAction = MyCartRemoveLineItemAction.builder()
             .build()
 
  • Field Details

    • REMOVE_LINE_ITEM

      static final String REMOVE_LINE_ITEM
      discriminator value for MyCartRemoveLineItemAction
      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
    • getQuantity

      Long getQuantity()

      Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

      Returns:
      quantity
    • getExternalPrice

      @Valid @Valid Money getExternalPrice()

      Sets the LineItem price to the given value when decreasing the quantity of a Line Item with the ExternalPrice LineItemPriceMode.

      Returns:
      externalPrice
    • getExternalTotalPrice

      @Valid @Valid ExternalLineItemTotalPrice getExternalTotalPrice()

      Sets the LineItem price and totalPrice to the given value when decreasing the quantity of a Line Item with the ExternalTotal LineItemPriceMode.

      Returns:
      externalTotalPrice
    • getShippingDetailsToRemove

      @Valid @Valid ItemShippingDetailsDraft getShippingDetailsToRemove()

      Container for Line Item-specific addresses to remove.

      Returns:
      shippingDetailsToRemove
    • 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
    • setQuantity

      void setQuantity(Long quantity)

      Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

      Parameters:
      quantity - value to be set
    • setExternalPrice

      void setExternalPrice(Money externalPrice)

      Sets the LineItem price to the given value when decreasing the quantity of a Line Item with the ExternalPrice LineItemPriceMode.

      Parameters:
      externalPrice - value to be set
    • setExternalTotalPrice

      void setExternalTotalPrice(ExternalLineItemTotalPrice externalTotalPrice)

      Sets the LineItem price and totalPrice to the given value when decreasing the quantity of a Line Item with the ExternalTotal LineItemPriceMode.

      Parameters:
      externalTotalPrice - value to be set
    • setShippingDetailsToRemove

      void setShippingDetailsToRemove(ItemShippingDetailsDraft shippingDetailsToRemove)

      Container for Line Item-specific addresses to remove.

      Parameters:
      shippingDetailsToRemove - value to be set
    • of

      factory method
      Returns:
      instance of MyCartRemoveLineItemAction
    • of

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

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

      builder factory method for MyCartRemoveLineItemAction
      Returns:
      builder
    • builder

      create builder for MyCartRemoveLineItemAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMyCartRemoveLineItemAction

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