Enum Class DiscountTimingType

java.lang.Object
java.lang.Enum<DiscountTimingType>
com.broadleafcommerce.promotion.offer.domain.type.DiscountTimingType
All Implemented Interfaces:
Serializable, Comparable<DiscountTimingType>, Constable

public enum DiscountTimingType extends Enum<DiscountTimingType>

Enumerates the options for when an offer's discount is be applied. By default the offer's discount is applied immediately to the current order. However, it could also be converted into a credit to be used on future orders. (It is up to the implementor to decide how to achieve this.)

Out-of-box, this field is disabled from admin and must be manually enabled to view, since it is not a typical requirement for most implementations.

Author:
Chad Harchar (charchar)
  • Enum Constant Details

    • ORDER_DISCOUNT

      public static final DiscountTimingType ORDER_DISCOUNT
      The discount from the offer will be given on the order itself. This is the common use-case and default value.
    • FUTURE_CREDIT

      public static final DiscountTimingType FUTURE_CREDIT
      The discount should be credited to the customer at a future time and method, at the discretion of the implementor.
  • Method Details

    • values

      public static DiscountTimingType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DiscountTimingType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null