OPPVirtualAccount
@objc
public final class OPPVirtualAccount : NSObject
Class to encapsulate shopper’s virtual account details that have been tokenized.
-
The name of virtual account holder.
Declaration
Swift
@objc public var holder: String?
-
The identifier of the virtual account.
Declaration
Swift
@objc public var accountId: String
-
Creates an
OPPVirtualAccount
object with the provided values.Declaration
Swift
@objc public init?(holder: String?, accountId: String)
Parameters
holder
The name of virtual account holder.
accountId
The identifier of the virtual account.
Return Value
Returns an
OPPVirtualAccount
object, ornil
if parameters are empty. -
Creates an
OPPVirtualAccount
object from the 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
OPPVirtualAccount
object, ornil
if JSON contains invalid values. -
Creates an
OPPVirtualAccount
object from the JSON.Declaration
Swift
@objc public static func virtualAccount(fromJSON JSON: [AnyHashable : Any]) -> `Self`?
Parameters
JSON
A dictionary with parameters received from the Server.
Return Value
Returns an
OPPVirtualAccount
object, ornil
if JSON contains invalid values. -
Creates an
OPPVirtualAccount
object with the provided values.Declaration
Swift
@objc public static func virtualAccount(withHolder holder: String?, accountId: String) -> Self?
Parameters
holder
The name of virtual account holder.
accountId
The identifier of the virtual account.
Return Value
Returns an
OPPVirtualAccount
object, ornil
if parameters are empty.