encode<V> static method

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

Implementation

static V encode<V>(
  TreasuryFinancialAccountsResourceBalance instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeMap(
    'cash',
    (container) => instance.cash.forEach((
      key,
      value,
    ) =>
        container.encodeInt(
          key,
          value,
        )),
  );
  container.encodeMap(
    'inbound_pending',
    (container) => instance.inboundPending.forEach((
      key,
      value,
    ) =>
        container.encodeInt(
          key,
          value,
        )),
  );
  container.encodeMap(
    'outbound_pending',
    (container) => instance.outboundPending.forEach((
      key,
      value,
    ) =>
        container.encodeInt(
          key,
          value,
        )),
  );
  return container.value;
}