encode<V> static method
Implementation
static V encode<V>(
SetupAttemptPaymentMethodDetailsCardThreeDSecure instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.authenticationFlow != null) {
PaymentMethodDetailsCardThreeDSecureAuthenticationFlow.encode(
instance.authenticationFlow!,
container.nestedSingleValueContainer('authentication_flow').encoder,
);
}
if (instance.electronicCommerceIndicator != null) {
PaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator.encode(
instance.electronicCommerceIndicator!,
container
.nestedSingleValueContainer('electronic_commerce_indicator')
.encoder,
);
}
if (instance.result != null) {
PaymentMethodDetailsCardThreeDSecureResult.encode(
instance.result!,
container.nestedSingleValueContainer('result').encoder,
);
}
if (instance.resultReason != null) {
PaymentMethodDetailsCardThreeDSecureResultReason.encode(
instance.resultReason!,
container.nestedSingleValueContainer('result_reason').encoder,
);
}
if (instance.transactionId != null) {
container.encodeString(
'transaction_id',
instance.transactionId!,
);
}
if (instance.version != null) {
PaymentMethodDetailsCardThreeDSecureVersion.encode(
instance.version!,
container.nestedSingleValueContainer('version').encoder,
);
}
return container.value;
}