Enum Class CardScheme

java.lang.Object
java.lang.Enum<CardScheme>
com.gemalto.mfs.mwsdk.payment.engine.CardScheme
All Implemented Interfaces:
Serializable, Comparable<CardScheme>, Constable

public enum CardScheme extends Enum<CardScheme>
Card Scheme supported for the Transaction
  • Enum Constant Details

    • MASTERCARD

      public static final CardScheme MASTERCARD
      MasterCard Card Scheme is returned for Mastercard transaction
    • VISA

      public static final CardScheme VISA
      Visa Card Scheme is returned for Visa transaction
    • PURE

      public static final CardScheme PURE
      Pure Card Scheme is returned for Pure transaction
    • UNKNOWN

      public static final CardScheme UNKNOWN
      Unknown Card Scheme for illegal transaction
  • Method Details

    • values

      public static CardScheme[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CardScheme valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • deriveCardScheme

      public static CardScheme deriveCardScheme(String scheme)
      Derives the CardScheme enum constant from its string representation.

      This method compares the input scheme string (case-insensitively) against the string values of the known card schemes (MASTERCARD, VISA, PURE). If a match is found, the corresponding CardScheme enum constant is returned. If the input string does not match any of the known schemes, UNKNOWN is returned.

      Parameters:
      scheme - The string representation of the card scheme (e.g., "MASTERCARD", "Visa", "pure"). This parameter is case-insensitive. Can be null, in which case UNKNOWN will be returned (as null will not match any scheme via equalsIgnoreCase).
      Returns:
      The corresponding CardScheme enum constant if a match is found; otherwise, UNKNOWN.