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