OPPaymentMethodProtocol

@objc
public protocol OPPaymentMethodProtocol : NSObjectProtocol

Represents a payment method containing all information needed to submit a basket via Olo’s Ordering API

  • id

    The payment method id. This should be set to the token field when submitting a basket

    Declaration

    Swift

    @objc
    var id: String { get }
  • The last four digits of the card

    Declaration

    Swift

    @objc
    var last4: String? { get }
  • The issuer of the card (e.g. Visa, Mastercard, etc)

    Declaration

    Swift

    @objc
    var cardType: OPCardBrand { get }
  • Two-digit number representing the card’s expiration month

    Declaration

    Swift

    @objc
    var expirationMonth: NSNumber? { get }
  • Four-digit number representing the card’s expiration year

    Declaration

    Swift

    @objc
    var expirationYear: NSNumber? { get }
  • ZIP or postal code

    Declaration

    Swift

    @objc
    var postalCode: String? { get }
  • Whether or not this payment method was created via ApplePay

    Declaration

    Swift

    @objc
    var isApplePay: Bool { get }
  • Country from the card in the payment method

    Declaration

    Swift

    @objc
    var country: String? { get }
  • The environment used to create the payment method

    Declaration

    Swift

    @objc
    var environment: OPEnvironment { get }