encode<V> static method

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

Implementation

static V encode<V>(
  ConnectCollectionTransfer instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeInt(
    'amount',
    instance.amount,
  );
  container.encodeString(
    'currency',
    instance.currency,
  );
  AccountOrId.encode(
    instance.destination,
    container.nestedSingleValueContainer('destination').encoder,
  );
  container.encodeString(
    'id',
    instance.id,
  );
  container.encodeBool(
    'livemode',
    instance.livemode,
  );
  container.encodeString(
    'object',
    'connect_collection_transfer',
  );
  return container.value;
}