Enum PaymentSystem
- java.lang.Object
-
- java.lang.Enum<PaymentSystem>
-
- ru.easydonate.easydonate4j.api.v3.data.model.shop.payment.PaymentSystem
-
- All Implemented Interfaces:
Serializable
,Comparable<PaymentSystem>
public enum PaymentSystem extends Enum<PaymentSystem>
The enum that represents all possible and actual payment systems.- Author:
- soknight
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INTER_KASSA
Represents the InterCassa payment system.PAY_MASTER
Represents the PayMaster payment system.QIWI
Represents the QiWi payment system.TEST_MODE
Represents the payment system stub for any test payments.UNKNOWN
Represents a payment system that isn't known yet.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull PaymentSystem
getByKey(@NotNull String key)
Get the enum constant by the known payment system key (can be null).static PaymentSystem
valueOf(String name)
Returns the enum constant of this type with the specified name.static PaymentSystem[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INTER_KASSA
public static final PaymentSystem INTER_KASSA
Represents the InterCassa payment system.
-
PAY_MASTER
public static final PaymentSystem PAY_MASTER
Represents the PayMaster payment system.
-
QIWI
public static final PaymentSystem QIWI
Represents the QiWi payment system.
-
TEST_MODE
public static final PaymentSystem TEST_MODE
Represents the payment system stub for any test payments.
-
UNKNOWN
public static final PaymentSystem UNKNOWN
Represents a payment system that isn't known yet.
-
-
Method Detail
-
values
public static PaymentSystem[] 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 (PaymentSystem c : PaymentSystem.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PaymentSystem 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
-
getByKey
@NotNull public static @NotNull PaymentSystem getByKey(@NotNull @NotNull String key)
Get the enum constant by the known payment system key (can be null).
If the key is null/empty or relevant enum constant with this key will not be found then this method will returnUNKNOWN
constant as default.- Parameters:
key
- the payment system key to find an enum constant.- Returns:
- The found payment system enum constant or
UNKNOWN
by default.
-
-