PaymentMethod
public struct PaymentMethod
extension PaymentMethod: Decodable
extension PaymentMethod: PaymentsApiResponse
extension PaymentMethod: JsonApiResponse
Request information about your saved payment method. The request allows you to get information about the saved payment method by its unique identifier. In response to the request, the data of the saved payment method will come.
-
Payment method code.
Declaration
Swift
public let type: PaymentMethodType
-
The ID of the payment method.
Declaration
Swift
public let id: String
-
You can use your saved payment method to make direct debits.
Declaration
Swift
public let saved: Bool
-
The name of the payment method.
Declaration
Swift
public let title: String?
-
To pay by credit card you need to enter CVV2/CVC2/CVP2 code.
Declaration
Swift
public let cscRequired: Bool
-
Your credit card details.
Declaration
Swift
public let card: PaymentMethodBankCard?
-
Creates instance of
PaymentMethod
.Declaration
Swift
public init(type: PaymentMethodType, id: String, saved: Bool, title: String?, cscRequired: Bool, card: PaymentMethodBankCard?)
Parameters
type
Payment method code.
id
The ID of the payment method.
saved
You can use your saved payment method to make direct debits.
title
The name of the payment method.
cscRequired
To pay by credit card you need to enter CVV2/CVC2/CVP2 code.
card
Your credit card details.
Return Value
Instance of
PaymentMethod
. -
API method for
See morePaymentMethod
.Declaration
Swift
public struct Method
extension PaymentMethod.Method: ApiMethod
extension PaymentMethod.Method: Encodable, Decodable
-
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 init(from decoder: Decoder) throws
Parameters
decoder
The decoder to read data from.