Enum Class ProrationType
- All Implemented Interfaces:
Serializable
,Comparable<ProrationType>
,Constable
Enumeration to determine whether an offer's discount
is divided amongst
different types of order items: Whether just "targets" or also "qualifiers".
Normally, the discount should go only to targets, that is, items specified as recipients of an
offer's discount (see Offer.targetItemCriteria
). However, the discount could also be
applied to qualifiers, that is, items the present of which determine whether an order or other
order items can receive a discount (see Offer.itemQualifierCriteria
.
- 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 for an offer is spread across targeted and qualifying items.The discount is only applied to the targeted items of the offer. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isTargetAndQualifierProration
(String prorationType) static boolean
isTargetOnlyProration
(String prorationType) static ProrationType
Returns the enum constant of this class with the specified name.static ProrationType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TARGET_ONLY
The discount is only applied to the targeted items of the offer. This is the normal use-case and default value. -
TARGET_AND_QUALIFIER
The discount for an offer is spread across targeted and qualifying items.
-
-
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
-
isTargetOnlyProration
-
isTargetAndQualifierProration
-