Interface DiscountApplicationMode

All Superinterfaces:
JsonEnum
All Known Implementing Classes:
DiscountApplicationMode.DiscountApplicationModeEnum

public interface DiscountApplicationMode extends JsonEnum

This mode determines how absolute Discounts are applied on Line Items or Custom Line Items.

  • Field Details

    • PROPORTIONATE_DISTRIBUTION

      static final DiscountApplicationMode PROPORTIONATE_DISTRIBUTION

      Distributes the Discount proportionately across eligible Line Items or Custom Line Items.

    • EVEN_DISTRIBUTION

      static final DiscountApplicationMode EVEN_DISTRIBUTION

      Distributes the Discount evenly across eligible Line Items or Custom Line Items.

    • INDIVIDUAL_APPLICATION

      static final DiscountApplicationMode INDIVIDUAL_APPLICATION

      Applies the Discount individually to eligible Line Item or Custom Line Item.

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