PaymentInstrumentYooMoneyLinkedBankCard
public class PaymentInstrumentYooMoneyLinkedBankCard : PaymentOptionYooMoneyInstrument
The payment method is a linked bank card of YooMoney.
-
Map binding ID.
- Pattern: [0-9]{1,20}
- MaxLength: 20
- Example: 123456789
Declaration
Swift
public let cardId: String
-
Custom name of the card.
Declaration
Swift
public let cardName: String?
-
Masked (6/4) card number.
- MaxLength: 19
- Example: 518901******0446
Declaration
Swift
public let cardMask: String
-
Type of Bank card.
- Example: MasterCard
Declaration
Swift
public let cardType: BankCardType
-
init(paymentMethodType:
confirmationTypes: charge: instrumentType: cardId: cardName: cardMask: cardType: identificationRequirement: fee: savePaymentMethod: ) Creates instance of
PaymentInstrumentYooMoneyLinkedBankCard
.Declaration
Swift
public init(paymentMethodType: PaymentMethodType, confirmationTypes: Set<ConfirmationType>?, charge: MonetaryAmount, instrumentType: YooMoneyInstrumentType, cardId: String, cardName: String?, cardMask: String, cardType: BankCardType, identificationRequirement: IdentificationRequirement?, fee: Fee?, savePaymentMethod: SavePaymentMethod)
Parameters
paymentMethodType
Type of the source of funds for the payment.
confirmationType
List of possible methods of payment confirmation. If payment confirmation is not required, the field is missing. Read more about the scenarios of confirmation of payment by the buyer.
charge
The amount to be paid by the buyer subject to possible currency conversion and additional fees in excess of the payment amount.
instrumentType
The type of the source of funds for payments from the YooMoney.
cardId
Map binding ID.
cardName
Custom name of the card.
cardMask
Masked (6/4) card number.
cardType
Type of Bank card.
identificationRequirement
Required type of user identification.
fee
Commission from the buyer in excess of the payment amount. The field is present if there are commissions in excess of the payment amount.
savePaymentMethod
Indication of the possibility of saving payment data for repeated payments.
Return Value
Instance of
PaymentInstrumentYooMoneyLinkedBankCard
.
-
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 init(from decoder: Decoder) throws
Parameters
decoder
The decoder to read data from.