encode<V> static method
Implementation
static V encode<V>(
PaymentIntentPaymentMethodOptionsLink instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.captureMethod != null) {
container.encodeString(
'capture_method',
'manual',
);
}
if (instance.persistentToken != null) {
container.encodeString(
'persistent_token',
instance.persistentToken!,
);
}
if (instance.setupFutureUsage != null) {
CheckoutLinkPaymentMethodOptionsSetupFutureUsage.encode(
instance.setupFutureUsage!,
container.nestedSingleValueContainer('setup_future_usage').encoder,
);
}
return container.value;
}