PaymentMethodBankCard

public struct PaymentMethodBankCard : Codable, Equatable

Bank card details

  • The first 6 digits of the card number (BIN).

    Declaration

    Swift

    public let first6: String
  • The last 4 digits of the card number.

    Declaration

    Swift

    public let last4: String
  • Validity, year, YYYY.

    Declaration

    Swift

    public let expiryYear: String
  • The validity period of the month, MM.

    Declaration

    Swift

    public let expiryMonth: String
  • Type of Bank card.

    Declaration

    Swift

    public let cardType: BankCardType
  • Creates instance of PaymentMethodBankCard

    Declaration

    Swift

    public init(first6: String,
                last4: String,
                expiryYear: String,
                expiryMonth: String,
                cardType: BankCardType)

    Parameters

    first6

    The first 6 digits of the card number (BIN).

    last4

    The last 4 digits of the card number.

    expiryYear

    Validity, year, YYYY.

    expiryMonth

    The validity period of the month, MM.

    cardType

    Type of Bank card.

    Return Value

    Instance of PaymentMethodBankCard

Codable

  • Encodes this value into the given encoder. If the value fails to encode anything, encoder will encode an empty keyed container in its place. This function throws an error if any values are invalid for the given encoder’s format.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.

  • Creates a new instance by decoding from the given decoder. This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to read data from.