encode<V> static method

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

Implementation

static V encode<V>(
  FinancialConnectionsTransaction instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'account',
    instance.account,
  );
  container.encodeInt(
    'amount',
    instance.amount,
  );
  container.encodeString(
    'currency',
    instance.currency,
  );
  container.encodeString(
    'description',
    instance.description,
  );
  container.encodeString(
    'id',
    instance.id,
  );
  container.encodeBool(
    'livemode',
    instance.livemode,
  );
  container.encodeString(
    'object',
    'financial_connections.transaction',
  );
  container.encodeString(
    'status',
    instance.status,
  );
  BankConnectionsResourceTransactionResourceStatusTransitions.encode(
    instance.statusTransitions,
    container.nestedSingleValueContainer('status_transitions').encoder,
  );
  container.encodeDateTime(
    'transacted_at',
    instance.transactedAt,
  );
  container.encodeString(
    'transaction_refresh',
    instance.transactionRefresh,
  );
  container.encodeDateTime(
    'updated',
    instance.updated,
  );
  return container.value;
}