encode<V> static method

V encode<V>(
  1. BillingPortalSessionFlowSubscriptionCancel instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  BillingPortalSessionFlowSubscriptionCancel instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.retention != null) {
    BillingPortalSessionFlowSubscriptionCancelRetention.encode(
      instance.retention!,
      container.nestedSingleValueContainer('retention').encoder,
    );
  }
  container.encodeString(
    'subscription',
    instance.subscription,
  );
  return container.value;
}