encode<V> static method

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

Implementation

static V encode<V>(
  ReserveTransaction instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeInt(
    'amount',
    instance.amount,
  );
  container.encodeString(
    'currency',
    instance.currency,
  );
  if (instance.description != null) {
    container.encodeString(
      'description',
      instance.description!,
    );
  }
  container.encodeString(
    'id',
    instance.id,
  );
  container.encodeString(
    'object',
    'reserve_transaction',
  );
  return container.value;
}