Enum Class DiscountTimingType
java.lang.Object
java.lang.Enum<DiscountTimingType>
com.broadleafcommerce.promotion.offer.domain.type.DiscountTimingType
- All Implemented Interfaces:
Serializable
,Comparable<DiscountTimingType>
,Constable
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)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe discount should be credited to the customer at a future time and method, at the discretion of the implementor.The discount from the offer will be given on the order itself. -
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountTimingType
Returns the enum constant of this class with the specified name.static DiscountTimingType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
The discount should be credited to the customer at a future time and method, at the discretion of the implementor.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-