Enum VoucherStatus
- java.lang.Object
-
- java.lang.Enum<VoucherStatus>
-
- org.cyclos.model.banking.vouchers.VoucherStatus
-
- All Implemented Interfaces:
Serializable,Comparable<VoucherStatus>,HasMessageKey
public enum VoucherStatus extends Enum<VoucherStatus> implements HasMessageKey
The possible statuses for a voucher
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVATION_EXPIREDThe voucher maximum activation time has expiredBLOCKEDA voucher was generated in an blocked status.CANCELEDThe voucher was canceled, and cannot be further usedEXPIREDThe voucher has expired without being fully redeemedINACTIVEA voucher was generated in an inactive status.OPENThe voucher is open to be redeemedPENDINGThe voucher has been bought, and the corresponding payment is pending for authorizationREDEEMEDThe voucher has been fully redeemed
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VoucherStatus[]getActivatableStatuses()static VoucherStatus[]getActuallyOpenStatuses()static VoucherStatus[]getExpirableStatuses()MessageKeygetMessageKey()booleanisActuallyOpen()booleanisExpirable()booleanisFinal()booleanisShowQrCode()static VoucherStatusvalueOf(String name)Returns the enum constant of this type with the specified name.static VoucherStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OPEN
public static final VoucherStatus OPEN
The voucher is open to be redeemed
-
BLOCKED
public static final VoucherStatus BLOCKED
A voucher was generated in an blocked status. It needs to be unblocked to be redeemed.
-
INACTIVE
public static final VoucherStatus INACTIVE
A voucher was generated in an inactive status. It needs to be activated to be redeemed.
-
EXPIRED
public static final VoucherStatus EXPIRED
The voucher has expired without being fully redeemed
-
ACTIVATION_EXPIRED
public static final VoucherStatus ACTIVATION_EXPIRED
The voucher maximum activation time has expired
-
CANCELED
public static final VoucherStatus CANCELED
The voucher was canceled, and cannot be further used
-
PENDING
public static final VoucherStatus PENDING
The voucher has been bought, and the corresponding payment is pending for authorization
-
REDEEMED
public static final VoucherStatus REDEEMED
The voucher has been fully redeemed
-
-
Method Detail
-
values
public static VoucherStatus[] 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 (VoucherStatus c : VoucherStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VoucherStatus 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
-
getActivatableStatuses
public static VoucherStatus[] getActivatableStatuses()
-
getActuallyOpenStatuses
public static VoucherStatus[] getActuallyOpenStatuses()
-
getExpirableStatuses
public static VoucherStatus[] getExpirableStatuses()
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
isActuallyOpen
public boolean isActuallyOpen()
-
isExpirable
public boolean isExpirable()
-
isFinal
public boolean isFinal()
-
isShowQrCode
public boolean isShowQrCode()
-
-