Enum Class DefaultSubscriptionActionFlow

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

public enum DefaultSubscriptionActionFlow extends Enum<DefaultSubscriptionActionFlow>
Describes the potential actions that can be taken against a subscription.
  • Enum Constant Details

    • CREATE

      public static final DefaultSubscriptionActionFlow CREATE
      A request to create a new subscription
    • EDIT

      public static final DefaultSubscriptionActionFlow EDIT
      A request to edit the subscription's configuration
    • UPGRADE

      public static final DefaultSubscriptionActionFlow UPGRADE
      A request to upgrade the subscription's level of service
    • DOWNGRADE

      public static final DefaultSubscriptionActionFlow DOWNGRADE
      A request to downgrade the subscription's level of service
    • CANCEL

      public static final DefaultSubscriptionActionFlow CANCEL
      A customer-driven request to cancel the subscription
    • TERMINATE

      public static final DefaultSubscriptionActionFlow TERMINATE
      A system-driven/business-driven request to cancel the subscription.

      For example, this is used for scheduled cancellation from cancelling auto-renewal.

    • CHANGE_AUTO_RENEWAL

      public static final DefaultSubscriptionActionFlow CHANGE_AUTO_RENEWAL
      A request to opt-into or out of auto-renewal for the subscription. If the subscription has terms (i.e. has a contract), then changing the auto-renewal intention refers to automatically renewing the terms/contract. If the subscription does not have terms, then changing the auto-renewal intention refers to automatically renewing at the end of the subscription's current period.
    • AUTO_RENEW

      public static final DefaultSubscriptionActionFlow AUTO_RENEW
      A request to automatically renew the subscription
    • PRICE_CHANGE

      public static final DefaultSubscriptionActionFlow PRICE_CHANGE
      A request to change the price of one or more items in the subscription
    • CSR_ADD_ADJUSTMENT

      public static final DefaultSubscriptionActionFlow CSR_ADD_ADJUSTMENT
      A CSR-driven action to add one or more adjustments to the subscription
  • Method Details

    • values

      public static DefaultSubscriptionActionFlow[] 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 DefaultSubscriptionActionFlow 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
    • isCreate

      public static boolean isCreate(String flow)
    • isEdit

      public static boolean isEdit(String flow)
    • isUpgrade

      public static boolean isUpgrade(String flow)
    • isDowngrade

      public static boolean isDowngrade(String flow)
    • isCancel

      public static boolean isCancel(String flow)
    • isTerminate

      public static boolean isTerminate(String flow)
    • isChangeAutoRenewal

      public static boolean isChangeAutoRenewal(String flow)
    • isAutoRenew

      public static boolean isAutoRenew(String flow)
    • isPriceChange

      public static boolean isPriceChange(String flow)
    • isCsrAddAdjustment

      public static boolean isCsrAddAdjustment(String flow)
    • isAnyModification

      public static boolean isAnyModification(String flow)
      Determines whether the given value of flow fits one of the default modification flow types, e.g., EDIT, UPGRADE, or DOWNGRADE.
      Parameters:
      flow - The value of the current subscription action flow to consider.
      Returns:
      Whether the given value of flow fits one of the default modification flow types