JayaCurrencyConverter.Exchanges (Currency Converter v0.1.0) View Source

The Exchanges context.

Link to this section Summary

Functions

Gets a single transaction.

Returns the list of transactions.

Link to this section Functions

Link to this function

create_transaction(user, attrs \\ %{})

View Source

Creates a transaction.

Examples

iex> create_transaction(%{field: value})
{:ok, %Transaction{}}

iex> create_transaction(%{field: bad_value})
{:error, %Ecto.Changeset{}}

Gets a single transaction.

Raises Ecto.NoResultsError if the Transaction does not exist.

Examples

iex> get_transaction!(123)
%Transaction{}

iex> get_transaction!(456)
** (Ecto.NoResultsError)
Link to this function

list_transactions(user \\ nil)

View Source

Returns the list of transactions.

Examples

iex> list_transactions()
[%Transaction{}, ...]