encode<V> static method
Implementation
static V encode<V>(
SetupIntentNextAction instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.cashappHandleRedirectOrDisplayQrCode != null) {
PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode.encode(
instance.cashappHandleRedirectOrDisplayQrCode!,
container
.nestedSingleValueContainer(
'cashapp_handle_redirect_or_display_qr_code')
.encoder,
);
}
if (instance.redirectToUrl != null) {
SetupIntentNextActionRedirectToUrl.encode(
instance.redirectToUrl!,
container.nestedSingleValueContainer('redirect_to_url').encoder,
);
}
container.encodeString(
'type',
instance.type,
);
if (instance.useStripeSdk != null) {
container.encodePrimitive(
'use_stripe_sdk',
instance.useStripeSdk!,
);
}
if (instance.verifyWithMicrodeposits != null) {
SetupIntentNextActionVerifyWithMicrodeposits.encode(
instance.verifyWithMicrodeposits!,
container
.nestedSingleValueContainer('verify_with_microdeposits')
.encoder,
);
}
return container.value;
}