encode<V> static method

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

Implementation

static V encode<V>(
  InvoicesResourceInvoiceRendering instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.amountTaxDisplay != null) {
    container.encodeString(
      'amount_tax_display',
      instance.amountTaxDisplay!,
    );
  }
  if (instance.pdf != null) {
    InvoiceRenderingPdf.encode(
      instance.pdf!,
      container.nestedSingleValueContainer('pdf').encoder,
    );
  }
  return container.value;
}