Enum Class DefaultOfferProrationType
java.lang.Object
java.lang.Enum<DefaultOfferProrationType>
com.broadleafcommerce.order.common.domain.enums.DefaultOfferProrationType
- All Implemented Interfaces:
Serializable
,Comparable<DefaultOfferProrationType>
,Constable
Enumerates the default types of offer discount proration.
This determines how an offer's discount should be distributed for refund, whether just "targets" or also "qualifiers".
- Author:
- Sunny Yu
-
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 distributed across targeted and qualifying items.The discount is only prorated/distributed to the targeted items of the offer. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isTargetAndQualifierProration
(String prorationType) static boolean
isTargetOnlyProration
(String prorationType) static DefaultOfferProrationType
Returns the enum constant of this class with the specified name.static DefaultOfferProrationType[]
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 prorated/distributed to the targeted items of the offer.For example, let's say we have a buy 1x get 1y free offer, x is the qualifying item (qualifier) and y is the targeted item (target).
TARGET_ONLY
means that the discount is not distributed and is only on the target item. -
TARGET_AND_QUALIFIER
The discount for an offer is distributed across targeted and qualifying items.For example, let's say we have a buy 1x get 1y free offer, x is the qualifying item (qualifier) and y is the targeted item (target).
TARGET_AND_QUALIFIER
means that the discount is distributed across target and qualifier 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
-