TokensRequestPaymentMethodData
public final class TokensRequestPaymentMethodData : TokensRequest
Request the tokenization of the buyer’s payment data required to create a payment method (payment_method) to be paid by the user.
-
Data required to create a payment method (payment_method) that the user will pay.
Declaration
Swift
public let paymentMethodData: PaymentMethodData
-
Creates instance of
TokensRequestPaymentMethodData
.Declaration
Swift
public init(amount: MonetaryAmount?, tmxSessionId: String, confirmation: Confirmation?, savePaymentMethod: Bool?, paymentMethodData: PaymentMethodData)
Parameters
amount
Payment amount, the nominal value of the order for the buyer.
tmxSessionId
ThreatMetrix session ID.
confirmation
Payment confirmation method.
paymentMethodData
Data required to create a payment method (payment_method) that the user will pay.
Return Value
Instance of
TokensRequestPaymentMethodData
-
Declaration
Swift
public override func customHeaders() -> Headers
-
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 override 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 required convenience init(from decoder: Decoder) throws
Parameters
decoder
The decoder to read data from.
-
Decoding errors.
See moreDeclaration
Swift
public enum DecodingErrors : Error