encode<V> static method

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

Implementation

static V encode<V>(
  InvoiceTransferData instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.amount != null) {
    container.encodeInt(
      'amount',
      instance.amount!,
    );
  }
  AccountOrId.encode(
    instance.destination,
    container.nestedSingleValueContainer('destination').encoder,
  );
  return container.value;
}