encode<V> static method
Implementation
static V encode<V>(
SessionFlowData instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.afterCompletion != null) {
SessionAfterCompletion.encode(
instance.afterCompletion!,
container.nestedSingleValueContainer('after_completion').encoder,
);
}
if (instance.subscriptionCancel != null) {
SessionSubscriptionCancel.encode(
instance.subscriptionCancel!,
container.nestedSingleValueContainer('subscription_cancel').encoder,
);
}
if (instance.subscriptionUpdate != null) {
PortalFlowsFlowSubscriptionUpdate.encode(
instance.subscriptionUpdate!,
container.nestedSingleValueContainer('subscription_update').encoder,
);
}
if (instance.subscriptionUpdateConfirm != null) {
SessionSubscriptionUpdateConfirm.encode(
instance.subscriptionUpdateConfirm!,
container
.nestedSingleValueContainer('subscription_update_confirm')
.encoder,
);
}
BillingPortalSessionFlowType.encode(
instance.type,
container.nestedSingleValueContainer('type').encoder,
);
return container.value;
}