Enum Class DefaultSubscriptionActionFlow
java.lang.Object
java.lang.Enum<DefaultSubscriptionActionFlow>
com.broadleafcommerce.cartoperation.domain.enums.DefaultSubscriptionActionFlow
- All Implemented Interfaces:
Serializable,Comparable<DefaultSubscriptionActionFlow>,Constable
Describes the potential actions that can be taken against a subscription.
- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA customer-driven request to cancel the subscriptionA request to opt-into or out of auto-renewal for the subscription.A request to create a new subscriptionA request to downgrade the subscription's level of serviceA request to edit the subscription's configurationA request to upgrade the subscription's level of service -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertToOfferFlow(String subscriptionActionFlow) Converts a subscription action flow to anDefaultOrderFlowthat the OfferEngine can understand.static booleanisAnyModification(String flow) static booleanstatic booleanisChangeAutoRenewal(String flow) static booleanstatic booleanisDowngrade(String flow) static booleanstatic booleanReturns the enum constant of this class with the specified name.static DefaultSubscriptionActionFlow[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CREATE
A request to create a new subscription -
EDIT
A request to edit the subscription's configuration -
UPGRADE
A request to upgrade the subscription's level of service -
DOWNGRADE
A request to downgrade the subscription's level of service -
CANCEL
A customer-driven request to cancel the subscription -
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.
-
-
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
-
isCreate
-
isEdit
-
isUpgrade
-
isDowngrade
-
isCancel
-
isChangeAutoRenewal
-
isAnyModification
Determines whether the given value offlowfits one of the default modification flow types, e.g.,EDIT,UPGRADE, orDOWNGRADE.- Parameters:
flow- The value of the current subscription action flow to consider.- Returns:
- Whether the given value of
flowfits one of the default modification flow types
-
convertToOfferFlow
Converts a subscription action flow to anDefaultOrderFlowthat the OfferEngine can understand.The reason for the explicit
"SUBSCRIPTION_"prefix is to avoid ambiguity from the naming itself and to avoid any potential conflicts with other offer flows that may be added in the future.- Parameters:
subscriptionActionFlow- theDefaultSubscriptionActionFlowto convert- Returns:
- the
DefaultOrderFlowequivalent
-