encode<V> static method
V
encode<V>(
- PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode instance,
- Encoder<
V> encoder
Implementation
static V encode<V>(
PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.hostedInstructionsUrl != null) {
container.encodeString(
'hosted_instructions_url',
instance.hostedInstructionsUrl!,
);
}
if (instance.mobileAuthUrl != null) {
container.encodeString(
'mobile_auth_url',
instance.mobileAuthUrl!,
);
}
if (instance.qrCode != null) {
PaymentIntentNextActionSwishQrCode.encode(
instance.qrCode!,
container.nestedSingleValueContainer('qr_code').encoder,
);
}
return container.value;
}