ibanity v0.6.0 Ibanity.Sandbox.FinancialInstitutionUser

Financial institution user API wrapper

Link to this section Summary

Link to this section Functions

Link to this function

create(request)

Creates a new financial institution user.

Returns {:ok, user} when successful, {:error, reason} otherwise.

Example

iex> [
...>   login: "jlopez",
...>   password: "password",
...>   last_name: "Lopez",
...>   first_name: "Jane"
...> ]
...> |> Request.attributes
...> |> Ibanity.FinancialInstitutionUser.create
{:ok, %Ibanity.FinancialInstitutionUser{id: "5178d658-0c33-440a-a3af-616a8e472617", ...}}
Link to this function

delete(request)

Deletes a financial institution user.

Returns {:ok, user} when successful, {:error, reason} otherwise.

Example

iex> |> Request.id(:id, "0934789d-e177-484f-b197-f60b40b0f9c4")
...> |> Ibanity.FinancialInstitutionUser.update
{:ok, %Ibanity.FinancialInstitutionUser{id: "5178d658-0c33-440a-a3af-616a8e472617", ...}}

Finds a financial institution user based on its id.

Returns {:ok, user} when successful, {:error, reason} otherwise.

Example

iex>
...> |> Request.attribute()
...> |> Ibanity.FinancialInstitutionUser.find
{:ok, %Ibanity.FinancialInstitutionUser{id: "5178d658-0c33-440a-a3af-616a8e472617", ...}}

Lists all financial institution users.

Returns {:ok, collection} where collection is of type Ibanity.Collection and its items are of type Ibanity.FinancialInstitutionUser, otherwise returns {:error, reason}.

Example

iex> Ibanity.FinancialInstitutionUser.list
{:ok, %Ibanity.Collection{items: [%Ibanity.FinancialInstitutionUser{...}], ...}}
Link to this function

update(request)

Updates a financial institution user.

Returns {:ok, user} when successful, {:error, reason} otherwise.

Example

iex> [
...>   login: "jlopez",
...>   password: "password",
...>   last_name: "Lopez",
...>   first_name: "Jane"
...> ]
...> |> Request.attributes
...> |> Request.id(:id, "0934789d-e177-484f-b197-f60b40b0f9c4")
...> |> Ibanity.FinancialInstitutionUser.update
{:ok, %Ibanity.FinancialInstitutionUser{id: "5178d658-0c33-440a-a3af-616a8e472617", ...}}