Enum VoucherGenerationAmount
- java.lang.Object
-
- java.lang.Enum<VoucherGenerationAmount>
-
- org.cyclos.model.banking.voucherconfigurations.VoucherGenerationAmount
-
- All Implemented Interfaces:
Serializable,Comparable<VoucherGenerationAmount>,HasMessageKey
public enum VoucherGenerationAmount extends Enum<VoucherGenerationAmount> implements HasMessageKey
Indicates how an inactive voucher amount is defined
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVATIONThe amount is set at activation time For this option the amount is set directly in the voucher at first top-up (i.e the activation).DYNAMICNo amount is set at generation time.GENERATIONThe amount is set at generation time.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowTopUp()Indicates whether vouchers with this amount policy allow topupsMessageKeygetMessageKey()static VoucherGenerationAmountvalueOf(String name)Returns the enum constant of this type with the specified name.static VoucherGenerationAmount[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GENERATION
public static final VoucherGenerationAmount GENERATION
The amount is set at generation time. For this option the amount is NOT set in the voucher but in the pack it belongs.
-
ACTIVATION
public static final VoucherGenerationAmount ACTIVATION
The amount is set at activation time For this option the amount is set directly in the voucher at first top-up (i.e the activation).
-
DYNAMIC
public static final VoucherGenerationAmount DYNAMIC
No amount is set at generation time. For this option the voucher behave as a truly wallet it doesn't have an amount but a balance.
-
-
Method Detail
-
values
public static VoucherGenerationAmount[] 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 (VoucherGenerationAmount c : VoucherGenerationAmount.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VoucherGenerationAmount 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
-
allowTopUp
public boolean allowTopUp()
Indicates whether vouchers with this amount policy allow topups
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
-