Enum Class DefaultCancellationStrategy

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

public enum DefaultCancellationStrategy extends Enum<DefaultCancellationStrategy>
The strategy using which a subscription can be cancelled.
Author:
karanjariwala
  • Enum Constant Details

    • IMMEDIATE

      public static final DefaultCancellationStrategy IMMEDIATE
      Cancel the subscription immediately
    • CANCEL_AUTO_RENEWAL

      public static final DefaultCancellationStrategy CANCEL_AUTO_RENEWAL
      If the subscription is auto-renewing, then this will turn off auto-renewal.

      This means that if the subscription has terms, then the subscription will be canceled at the end of the term. Otherwise, it means the subscription will be canceled at the end of the billing period.

  • Method Details

    • values

      public static DefaultCancellationStrategy[] 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 DefaultCancellationStrategy 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
    • isImmediate

      public static boolean isImmediate(String cancellationStrategy)
    • isCancelAutoRenewal

      public static boolean isCancelAutoRenewal(String cancellationStrategy)