encode<V> static method

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

Implementation

static V encode<V>(
  GetInvoiceitemsResponse instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeList(
    'data',
    (container) => instance.data.forEach((el) => Invoiceitem.encode(
          el,
          container.nestedSingleValueContainer().encoder,
        )),
  );
  container.encodeBool(
    'has_more',
    instance.hasMore,
  );
  container.encodeString(
    'object',
    'list',
  );
  container.encodeString(
    'url',
    instance.url,
  );
  return container.value;
}