OPPCard
@objc
public final class OPPCard : NSObject
Class to encapsulate shopper’s card details that have been tokenized.
-
Name of card holder.
Declaration
Swift
@objc public var holder: String -
The last 4 digits of the card number.
Declaration
Swift
@objc public var last4Digits: String -
The card’s expiration month.
Declaration
Swift
@objc public var expiryMonth: String -
The card’s expiration year.
Declaration
Swift
@objc public var expiryYear: String
-
Creates an
OPPCardobject from JSON.Declaration
Swift
@objc public static func card(fromJSON JSON: [AnyHashable : Any]) -> OPPCard?Parameters
JSONA dictionary with parameters received from the Server.
Return Value
Returns an
OPPCardobject, ornilif JSON contains invalid values. -
Creates an
OPPCardobject from JSON.Declaration
Swift
@objc public convenience init?(fromJSON JSON: [AnyHashable : Any])Parameters
JSONA dictionary with parameters received from the Server.
Return Value
Returns an
OPPCardobject, ornilif JSON contains invalid values. -
Creates an
OPPCardobject with the provided values.Declaration
Swift
@objc public static func card(withHolder holder: String?, last4Digits: String, expiryMonth: String, expiryYear: String) -> OPPCard?Parameters
holderName of card holder.
last4DigitsThe last 4 digits of the card number.
expiryMonthThe card’s expiration month.
expiryYearThe card’s expiration year.
Return Value
Returns an
OPPCardobject, ornilif parameters are empty. -
Creates an
OPPCardobject with the provided values.Declaration
Swift
@objc public init?(holder: String?, last4Digits: String, expiryMonth: String, expiryYear: String)Parameters
holderName of card holder.
last4DigitsThe last 4 digits of the card number.
expiryMonthThe card’s expiration month.
expiryYearThe card’s expiration year.
Return Value
Returns an
OPPCardobject, ornilif parameters are empty.
OPPCard Class Reference