Increase.Accounts (Increase v1.0.0)

Copy Markdown View Source

Accounts are your bank accounts with Increase. They store money, receive transfers, and send payments. They earn interest and have depository insurance.

See https://increase.com/documentation/api/accounts for the full API reference for this resource.

Summary

Functions

Retrieve the current and available balances for an account in minor units of the account's currency. Learn more about [account balances].

Functions

balance(client, account_id, params \\ %{}, opts \\ [])

@spec balance(
  Increase.Client.t() | keyword() | nil,
  String.t(),
  map() | keyword(),
  keyword()
) ::
  {:ok, Increase.Accounts.BalanceLookup.t()} | {:error, Increase.Error.t()}

Retrieve the current and available balances for an account in minor units of the account's currency. Learn more about [account balances].

GET /accounts/{account_id}/balance

close(client, account_id, opts \\ [])

@spec close(Increase.Client.t() | keyword() | nil, String.t(), keyword()) ::
  {:ok, Increase.Accounts.Account.t()} | {:error, Increase.Error.t()}

Close an Account

POST /accounts/{account_id}/close

create(client, params \\ %{}, opts \\ [])

@spec create(Increase.Client.t() | keyword() | nil, map() | keyword(), keyword()) ::
  {:ok, Increase.Accounts.Account.t()} | {:error, Increase.Error.t()}

Create an Account

POST /accounts

list(client, params \\ %{}, opts \\ [])

@spec list(Increase.Client.t() | keyword() | nil, map() | keyword(), keyword()) ::
  {:ok, Increase.Page.t()} | {:error, Increase.Error.t()}

List Accounts

Returns a %Increase.Page{} whose data is a list of %__MODULE__. Account{} structs. Page through results with Increase.Page.auto_paging_stream/1 or Increase.Page.auto_paging_each/2.

GET /accounts

retrieve(client, account_id, opts \\ [])

@spec retrieve(Increase.Client.t() | keyword() | nil, String.t(), keyword()) ::
  {:ok, Increase.Accounts.Account.t()} | {:error, Increase.Error.t()}

Retrieve an Account

GET /accounts/{account_id}

update(client, account_id, params \\ %{}, opts \\ [])

@spec update(
  Increase.Client.t() | keyword() | nil,
  String.t(),
  map() | keyword(),
  keyword()
) ::
  {:ok, Increase.Accounts.Account.t()} | {:error, Increase.Error.t()}

Update an Account

PATCH /accounts/{account_id}