encode<V> static method

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

Implementation

static V encode<V>(
  PortalSubscriptionCancel instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  PortalSubscriptionCancellationReason.encode(
    instance.cancellationReason,
    container.nestedSingleValueContainer('cancellation_reason').encoder,
  );
  container.encodeBool(
    'enabled',
    instance.enabled,
  );
  container.encodeString(
    'mode',
    instance.mode,
  );
  container.encodeString(
    'proration_behavior',
    instance.prorationBehavior,
  );
  return container.value;
}