Interface LineItemMode

All Superinterfaces:
JsonEnum
All Known Implementing Classes:
LineItemMode.LineItemModeEnum

public interface LineItemMode extends JsonEnum

Indicates how a Line Item was added to a Cart.

  • Field Details

    • STANDARD

      static final LineItemMode STANDARD

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

    • GIFT_LINE_ITEM

      static final LineItemMode GIFT_LINE_ITEM

      One Line Item was added automatically to a Cart by a Cart Discount with CartDiscountValueGiftLineItemDraft.

      The quantity cannot be increased, and it won't be merged when adding the same Line Item 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

      String getJsonName()
      the JSON value
      Specified by:
      getJsonName in interface JsonEnum
      Returns:
      json value
    • name

      String name()
      the enum value
      Specified by:
      name in interface JsonEnum
      Returns:
      name
    • toString

      String toString()
      convert value to string
      Specified by:
      toString in interface 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

      static Optional<LineItemMode> findEnumViaJsonName(String jsonName)
      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