encode<V> static method
Implementation
static V encode<V>(
SetupAttemptPaymentMethodDetailsCardWallet instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.applePay != null) {
PaymentMethodDetailsCardWalletApplePay.encode(
instance.applePay!,
container.nestedSingleValueContainer('apple_pay').encoder,
);
}
if (instance.googlePay != null) {
PaymentMethodDetailsCardWalletGooglePay.encode(
instance.googlePay!,
container.nestedSingleValueContainer('google_pay').encoder,
);
}
container.encodeString(
'type',
instance.type,
);
return container.value;
}