Enum Class DefaultSubscriptionAdjustmentType

java.lang.Object
java.lang.Enum<DefaultSubscriptionAdjustmentType>
com.broadleafcommerce.subscription.domain.enums.DefaultSubscriptionAdjustmentType
All Implemented Interfaces:
Serializable, Comparable<DefaultSubscriptionAdjustmentType>, Constable

public enum DefaultSubscriptionAdjustmentType extends Enum<DefaultSubscriptionAdjustmentType>
  • Enum Constant Details

    • PERCENT_OFF

      public static final DefaultSubscriptionAdjustmentType PERCENT_OFF
      Take a percent off the total amount. For example, an offer using this discount method with a discount value of .20 being applied to an item with a price of $5, would result in a new price of $5 - ($5 * .20) = $4.
    • AMOUNT_OFF

      public static final DefaultSubscriptionAdjustmentType AMOUNT_OFF
      Take an amount off of the total amount. For example, an offer using this discount method with a discount value of 1 being applied to an item with a price of $5, would result in a new price of $5 - $1 = $4.
    • FIXED_PRICE

      public static final DefaultSubscriptionAdjustmentType FIXED_PRICE
      Replace the amount with a fixed price. For example, an offer using this discount method with a discount value of 4 being 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

      public static DefaultSubscriptionAdjustmentType[] 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 DefaultSubscriptionAdjustmentType 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
    • isPercentOff

      public static boolean isPercentOff(String adjustmentType)
    • isAmountOff

      public static boolean isAmountOff(String adjustmentType)
    • isFixedPrice

      public static boolean isFixedPrice(String adjustmentType)