Enum CouponRequestAction
- java.lang.Object
-
- java.lang.Enum<CouponRequestAction>
-
- com.inteliqua.rest.coupon.payload.CouponRequestAction
-
- All Implemented Interfaces:
Serializable,Comparable<CouponRequestAction>
public enum CouponRequestAction extends Enum<CouponRequestAction>
Enum representing various actions that can be performed on a coupon.The actions include assigning, using, and executing flows for coupons. Some of the actions, such as
This enum helps manage and validate different coupon-related actions in the system.ASSIGN_GIVE_EXECUTE_FLOW,USE_EXECUTE_FLOW, andEXECUTE_FLOW, are deprecated as transaction/member flows are always triggered when configured inTaskFlowEvent.- Author:
- nikritikos
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASSIGNAssign a coupon.ASSIGN_EXECUTE_COUPON_FLOWAssign and execute a coupon flow.ASSIGN_GIVEAssign and give a coupon.ASSIGN_GIVE_EXECUTE_FLOWDeprecated.ASSIGN_GIVE_USEAssign, give, and use a coupon.EXECUTE_FLOWDeprecated.USE_EXECUTE_COUPON_FLOWUse and execute a coupon flow.USE_EXECUTE_FLOWDeprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAction()Gets the string representation of the coupon action.static CouponRequestActionresolveCouponRequestActionValue(String action)Resolves the given action string to the correspondingCouponRequestAction.static booleanvalidateAction(String action)Validates if a given action is a validCouponRequestAction.static CouponRequestActionvalueOf(String name)Returns the enum constant of this type with the specified name.static CouponRequestAction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ASSIGN
public static final CouponRequestAction ASSIGN
Assign a coupon.
-
ASSIGN_GIVE
public static final CouponRequestAction ASSIGN_GIVE
Assign and give a coupon.
-
ASSIGN_GIVE_USE
public static final CouponRequestAction ASSIGN_GIVE_USE
Assign, give, and use a coupon.
-
ASSIGN_GIVE_EXECUTE_FLOW
@Deprecated public static final CouponRequestAction ASSIGN_GIVE_EXECUTE_FLOW
Deprecated.Deprecated action.
-
USE_EXECUTE_FLOW
@Deprecated public static final CouponRequestAction USE_EXECUTE_FLOW
Deprecated.Deprecated action.
-
EXECUTE_FLOW
@Deprecated public static final CouponRequestAction EXECUTE_FLOW
Deprecated.Deprecated action.
-
ASSIGN_EXECUTE_COUPON_FLOW
public static final CouponRequestAction ASSIGN_EXECUTE_COUPON_FLOW
Assign and execute a coupon flow.
-
USE_EXECUTE_COUPON_FLOW
public static final CouponRequestAction USE_EXECUTE_COUPON_FLOW
Use and execute a coupon flow.
-
-
Method Detail
-
values
public static CouponRequestAction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CouponRequestAction c : CouponRequestAction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CouponRequestAction valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getAction
public String getAction()
Gets the string representation of the coupon action.- Returns:
- The action as a string.
-
validateAction
public static boolean validateAction(String action)
Validates if a given action is a validCouponRequestAction.- Parameters:
action- The action to validate.- Returns:
trueif the action is valid;falseotherwise.
-
resolveCouponRequestActionValue
public static CouponRequestAction resolveCouponRequestActionValue(String action)
Resolves the given action string to the correspondingCouponRequestAction.- Parameters:
action- The action string to resolve.- Returns:
- The corresponding
CouponRequestAction. - Throws:
IllegalArgumentException- If the action is not valid.
-
-