encode<V> static method

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

Implementation

static V encode<V>(
  IssuingTransactionTreasury instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.receivedCredit != null) {
    container.encodeString(
      'received_credit',
      instance.receivedCredit!,
    );
  }
  if (instance.receivedDebit != null) {
    container.encodeString(
      'received_debit',
      instance.receivedDebit!,
    );
  }
  return container.value;
}