encode<V> static method

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

Implementation

static V encode<V>(
  IssuingAuthorizationTreasury instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeList(
    'received_credits',
    (container) =>
        instance.receivedCredits.forEach((el) => container.encodeString(el)),
  );
  container.encodeList(
    'received_debits',
    (container) =>
        instance.receivedDebits.forEach((el) => container.encodeString(el)),
  );
  if (instance.transaction != null) {
    container.encodeString(
      'transaction',
      instance.transaction!,
    );
  }
  return container.value;
}