encode<V> static method
Implementation
static V encode<V>(
PortalFlowsFlow instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
PortalFlowsFlowAfterCompletion.encode(
instance.afterCompletion,
container.nestedSingleValueContainer('after_completion').encoder,
);
if (instance.subscriptionCancel != null) {
BillingPortalSessionFlowSubscriptionCancel.encode(
instance.subscriptionCancel!,
container.nestedSingleValueContainer('subscription_cancel').encoder,
);
}
if (instance.subscriptionUpdate != null) {
BillingPortalSessionFlowSubscriptionUpdate.encode(
instance.subscriptionUpdate!,
container.nestedSingleValueContainer('subscription_update').encoder,
);
}
if (instance.subscriptionUpdateConfirm != null) {
BillingPortalSessionFlowSubscriptionUpdateConfirm.encode(
instance.subscriptionUpdateConfirm!,
container
.nestedSingleValueContainer('subscription_update_confirm')
.encoder,
);
}
BillingPortalSessionFlowType.encode(
instance.type,
container.nestedSingleValueContainer('type').encoder,
);
return container.value;
}