Enum Class DefaultSubscriptionAdjustmentType
java.lang.Object
java.lang.Enum<DefaultSubscriptionAdjustmentType>
com.broadleafcommerce.subscription.domain.enums.DefaultSubscriptionAdjustmentType
- All Implemented Interfaces:
Serializable,Comparable<DefaultSubscriptionAdjustmentType>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTake an amount off of the total amount.Replace the amount with a fixed price.Take a percent off the total amount. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAmountOff(String adjustmentType) static booleanisFixedPrice(String adjustmentType) static booleanisPercentOff(String adjustmentType) Returns the enum constant of this class with the specified name.static DefaultSubscriptionAdjustmentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PERCENT_OFF
Take a percent off the total amount. For example, an offer using this discount method with a discount value of.20being applied to an item with a price of$5, would result in a new price of$5 - ($5 * .20) = $4. -
AMOUNT_OFF
Take an amount off of the total amount. For example, an offer using this discount method with a discount value of1being applied to an item with a price of$5, would result in a new price of$5 - $1 = $4. -
FIXED_PRICE
Replace the amount with a fixed price. For example, an offer using this discount method with a discount value of4being applied to an item with a price of$5, would result in a new price of$4.
Only items can have fixed price discounts—orders cannot.
-
-
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
-
isPercentOff
-
isAmountOff
-
isFixedPrice
-