encode<V> static method

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

Implementation

static V encode<V>(
  PricesRecurring instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.interval != null) {
    InvoiceitemPlanInterval.encode(
      instance.interval!,
      container.nestedSingleValueContainer('interval').encoder,
    );
  }
  if (instance.meter != null) {
    container.encodeString(
      'meter',
      instance.meter!,
    );
  }
  if (instance.usageType != null) {
    InvoiceitemPlanUsageType.encode(
      instance.usageType!,
      container.nestedSingleValueContainer('usage_type').encoder,
    );
  }
  return container.value;
}