encode<V> static method
Implementation
static V encode<V>(
PaymentLinksResourceAfterCompletion instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.hostedConfirmation != null) {
PaymentLinksResourceCompletionBehaviorConfirmationPage.encode(
instance.hostedConfirmation!,
container.nestedSingleValueContainer('hosted_confirmation').encoder,
);
}
if (instance.redirect != null) {
PaymentLinksResourceCompletionBehaviorRedirect.encode(
instance.redirect!,
container.nestedSingleValueContainer('redirect').encoder,
);
}
container.encodeString(
'type',
instance.type,
);
return container.value;
}