encode<V> static method
Implementation
static V encode<V>(
BillingPortalSessionFlowSubscriptionUpdateConfirm instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.discounts != null) {
container.encodeList(
'discounts',
(container) => instance.discounts!.forEach(
(el) => PortalFlowsSubscriptionUpdateConfirmDiscount.encode(
el,
container.nestedSingleValueContainer().encoder,
)),
);
}
container.encodeList(
'items',
(container) => instance.items
.forEach((el) => PortalFlowsSubscriptionUpdateConfirmItem.encode(
el,
container.nestedSingleValueContainer().encoder,
)),
);
container.encodeString(
'subscription',
instance.subscription,
);
return container.value;
}