Enum PaymentType

    • Enum Constant Detail

      • MOBILE_COMMERCE

        public static final PaymentType MOBILE_COMMERCE
        Represents the Mobile Commerce (mobile operators).
      • QIWI

        public static final PaymentType QIWI
        Represents the QiWi payment type.
      • CREDIT_CARD

        public static final PaymentType CREDIT_CARD
        Represents the credit card payment type.
      • YOOMONEY

        public static final PaymentType YOOMONEY
        Represents the YooMoney payment type.
      • WEBMONEY

        public static final PaymentType WEBMONEY
        Represents the WebMoney payment type.
      • TEST_MODE

        public static final PaymentType TEST_MODE
        Represents the payment type stub for any test payments.
      • UNKNOWN

        public static final PaymentType UNKNOWN
        Represents a payment type that isn't known yet.
    • Method Detail

      • values

        public static PaymentType[] 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 (PaymentType c : PaymentType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PaymentType 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 name
        NullPointerException - if the argument is null
      • getByKey

        @NotNull
        public static @NotNull PaymentType getByKey​(@NotNull
                                                    @NotNull String key)
        Get the enum constant by the known payment type 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 return UNKNOWN constant as default.
        Parameters:
        key - the payment type key to find an enum constant.
        Returns:
        The found payment type enum constant or UNKNOWN by default.