Interface LineItemPriceMode

All Superinterfaces:
JsonEnum
All Known Implementing Classes:
LineItemPriceMode.LineItemPriceModeEnum

public interface LineItemPriceMode extends JsonEnum

This mode indicates how the price is set for the Line Item.

  • Field Details

    • PLATFORM

      static final LineItemPriceMode PLATFORM

      The price is selected from the Product Variant. This is the default mode.

    • EXTERNAL_PRICE

      static final LineItemPriceMode EXTERNAL_PRICE

      The Line Item price is set externally. Cart Discounts can apply to Line Items with this price mode. All update actions that change the quantity of a Line Item with this price mode require the externalPrice field to be given.

    • EXTERNAL_TOTAL

      static final LineItemPriceMode EXTERNAL_TOTAL

      The Line Item price with the total is set externally. Cart Discounts are deactivated for Line Items with this price mode. Although a Line Item with this price mode has both price and totalPrice set externally, only totalPrice is used to calculate the total price of a Cart. All update actions that change the quantity of a Line Item with this price mode can set the new price with the externalTotal field. If the externalTotal field is not given in the update actions, the external price is unset and the price mode is set to Platform.

  • 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 LineItemPriceMode findEnum(String value)
      factory method for a enum value of LineItemPriceMode 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<LineItemPriceMode> 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 LineItemPriceMode[] values()
      possible enum values
      Returns:
      array of possible enum values