encode<V> static method

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

Implementation

static V encode<V>(
  QuotesResourceComputed instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.recurring != null) {
    QuotesResourceComputedRecurring.encode(
      instance.recurring!,
      container.nestedSingleValueContainer('recurring').encoder,
    );
  }
  QuotesResourceUpfront.encode(
    instance.upfront,
    container.nestedSingleValueContainer('upfront').encoder,
  );
  return container.value;
}