encode<V> static method

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

Implementation

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