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
OPPCard
object from JSON.Declaration
Swift
@objc public static func card(fromJSON JSON: [AnyHashable : Any]) -> OPPCard?
Parameters
JSON
A dictionary with parameters received from the Server.
Return Value
Returns an
OPPCard
object, ornil
if JSON contains invalid values. -
Creates an
OPPCard
object from JSON.Declaration
Swift
@objc public convenience init?(fromJSON JSON: [AnyHashable : Any])
Parameters
JSON
A dictionary with parameters received from the Server.
Return Value
Returns an
OPPCard
object, ornil
if JSON contains invalid values. -
Creates an
OPPCard
object with the provided values.Declaration
Swift
@objc public static func card(withHolder holder: String?, last4Digits: String, expiryMonth: String, expiryYear: String) -> OPPCard?
Parameters
holder
Name of card holder.
last4Digits
The last 4 digits of the card number.
expiryMonth
The card’s expiration month.
expiryYear
The card’s expiration year.
Return Value
Returns an
OPPCard
object, ornil
if parameters are empty. -
Creates an
OPPCard
object with the provided values.Declaration
Swift
@objc public init?(holder: String?, last4Digits: String, expiryMonth: String, expiryYear: String)
Parameters
holder
Name of card holder.
last4Digits
The last 4 digits of the card number.
expiryMonth
The card’s expiration month.
expiryYear
The card’s expiration year.
Return Value
Returns an
OPPCard
object, ornil
if parameters are empty.