Enum PaymentStatus
- java.lang.Object
-
- java.lang.Enum<PaymentStatus>
-
- ru.easydonate.easydonate4j.api.v3.data.model.shop.payment.PaymentStatus
-
- All Implemented Interfaces:
Serializable
,Comparable<PaymentStatus>
public enum PaymentStatus extends Enum<PaymentStatus>
The enum that represents all possible and actual payment statuses.- Author:
- soknight
-
-
Enum Constant Summary
Enum Constants Enum Constant Description SUCCESS
Represents the payment status when the payment is paid and fully completed.UNKNOWN
Represents the payment status that isn't known yet.UNPAID
Represents the payment status when the payment isn't paid yet.WAITING
Represents the payment status when the platform has waiting for the payment completion.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull PaymentStatus
getByCode(int code)
Get the enum constant by the known payment status code.static PaymentStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static PaymentStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNPAID
public static final PaymentStatus UNPAID
Represents the payment status when the payment isn't paid yet.
-
WAITING
public static final PaymentStatus WAITING
Represents the payment status when the platform has waiting for the payment completion.
-
SUCCESS
public static final PaymentStatus SUCCESS
Represents the payment status when the payment is paid and fully completed.
-
UNKNOWN
public static final PaymentStatus UNKNOWN
Represents the payment status that isn't known yet.
-
-
Method Detail
-
values
public static PaymentStatus[] 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 (PaymentStatus c : PaymentStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PaymentStatus 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
-
getByCode
@NotNull public static @NotNull PaymentStatus getByCode(int code)
Get the enum constant by the known payment status code.
If a relevant enum constant with this code will not be found then this method will returnUNKNOWN
constant as default.- Parameters:
code
- the payment status code to find an enum constant.- Returns:
- The found payment system enum constant or
UNKNOWN
by default.
-
-