encode<V> static method
Implementation
static V encode<V>(
PaymentIntentPaymentMethodOptionsCardMandateOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeInt(
'amount',
instance.amount,
);
container.encodeString(
'amount_type',
instance.amountType,
);
if (instance.description != null) {
container.encodeString(
'description',
instance.description!,
);
}
if (instance.endDate != null) {
container.encodeDateTime(
'end_date',
instance.endDate!,
);
}
container.encodeString(
'interval',
instance.interval,
);
if (instance.intervalCount != null) {
container.encodeInt(
'interval_count',
instance.intervalCount!,
);
}
container.encodeString(
'reference',
instance.reference,
);
container.encodeDateTime(
'start_date',
instance.startDate,
);
if (instance.supportedTypes != null) {
container.encodeList(
'supported_types',
(container) => instance.supportedTypes!
.forEach((el) => container.encodeString('india')),
);
}
return container.value;
}