encode<V> static method
Implementation
static V encode<V>(
SetupAttemptPaymentMethodDetailsIdeal instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.bank != null) {
PaymentMethodDetailsIdealBank.encode(
instance.bank!,
container.nestedSingleValueContainer('bank').encoder,
);
}
if (instance.bic != null) {
PaymentMethodDetailsIdealBic.encode(
instance.bic!,
container.nestedSingleValueContainer('bic').encoder,
);
}
if (instance.generatedSepaDebit != null) {
PaymentMethodOrId.encode(
instance.generatedSepaDebit!,
container.nestedSingleValueContainer('generated_sepa_debit').encoder,
);
}
if (instance.generatedSepaDebitMandate != null) {
MandateOrId.encode(
instance.generatedSepaDebitMandate!,
container
.nestedSingleValueContainer('generated_sepa_debit_mandate')
.encoder,
);
}
if (instance.ibanLast4 != null) {
container.encodeString(
'iban_last4',
instance.ibanLast4!,
);
}
if (instance.verifiedName != null) {
container.encodeString(
'verified_name',
instance.verifiedName!,
);
}
return container.value;
}