Interface LineItemMode

All Superinterfaces:
io.vrap.rmf.base.client.JsonEnum
All Known Implementing Classes:
LineItemMode.LineItemModeEnum

public interface LineItemMode extends io.vrap.rmf.base.client.JsonEnum

Indicates how a Line Item is added to a Cart.

  • Field Details

    • STANDARD

      static final LineItemMode STANDARD

      The Line Item is added during Cart creation or using the Add LineItem update action. The Line Item quantity can be changed without restriction.

    • GIFT_LINE_ITEM

      The Line Item is added automatically by a Cart Discount with CartDiscountValueGiftLineItem.

      The quantity cannot be increased, and it won't be merged when the same Line Item is added to the Cart. If the gift is removed, an entry is added to the refusedGifts array and the discount won't be applied to the Cart. The price cannot be changed externally.

      All other updates, such as the ones related to Custom Fields, can be used.

  • Method Details

    • getJsonName

      the JSON value
      Specified by:
      getJsonName in interface io.vrap.rmf.base.client.JsonEnum
      Returns:
      json value
    • name

      the enum value
      Specified by:
      name in interface io.vrap.rmf.base.client.JsonEnum
      Returns:
      name
    • toString

      convert value to string
      Specified by:
      toString in interface io.vrap.rmf.base.client.JsonEnum
      Overrides:
      toString in class Object
      Returns:
      string representation
    • findEnum

      static LineItemMode findEnum(String value)
      factory method for a enum value of LineItemMode if no enum has been found an anonymous instance will be created
      Parameters:
      value - the enum value to be wrapped
      Returns:
      enum instance
    • findEnumViaJsonName

      method to find enum using the JSON value
      Parameters:
      jsonName - the json value to be wrapped
      Returns:
      optional of enum instance
    • values

      static LineItemMode[] values()
      possible enum values
      Returns:
      array of possible enum values