# Scheme

    public enum Scheme : CaseIterable, Equatable, Hashable

Enum representing card scheme.

We only support the following schemes:

- American Express
- Diner’s Club
- Discover
- JCB
- Mada
- Maestro
- Mastercard
- Visa

Show on GitHub

- `allCases`

  #### Declaration

  Swift

      public static var allCases: [Card.Scheme]

  Show on GitHub
- `unknown`

  #### Declaration

  Swift

      case unknown

  Show on GitHub
- `mada`

  #### Declaration

  Swift

      case mada

  Show on GitHub
- `visa`

  #### Declaration

  Swift

      case visa

  Show on GitHub
- `mastercard`

  #### Declaration

  Swift

      case mastercard

  Show on GitHub
- `maestro(length:)`

  #### Declaration

  Swift

      case maestro(length: Int = 0)

  Show on GitHub
- `americanExpress`

  #### Declaration

  Swift

      case americanExpress

  Show on GitHub
- `discover`

  #### Declaration

  Swift

      case discover

  Show on GitHub
- `dinersClub`

  #### Declaration

  Swift

      case dinersClub

  Show on GitHub
- `jcb`

  #### Declaration

  Swift

      case jcb

  Show on GitHub
- `init(rawValue:length:)`

  #### Declaration

  Swift

      public init?(rawValue: String, length: Int? = nil)

  Show on GitHub
- `rawValue`

  #### Declaration

  Swift

      public var rawValue: String { get }

  Show on GitHub
- `cardGaps`

  map of card scheme to indexes of spaces in formatted card number string eg. a visa card has gaps at 4, 8 and 12. 4242424242424242 becomes 4242 4242 4242 4242

  #### Declaration

  Swift

      public var cardGaps: [Int] { get }

  Show on GitHub
- `description`

  #### Declaration

  Swift

      public var description: String { get }

  Show on GitHub