Unit.API.AccountLimitOverrides (Unit v1.0.0)

Copy Markdown View Source

API module for per-account limit overrides.

Limit overrides adjust ACH, wire, check deposit, check payment, or book transfer limits for a specific deposit or wallet account, above or below the defaults set at the deposit-product level.

Requires Bank Operations role.

Example

# Raise wire limit for a specific VIP customer account
{:ok, override} = Unit.API.AccountLimitOverrides.create(account_id, %{
  limits: %{
    wire: %{
      daily_transfer: %{soft_limit: 500_000_00, hard_limit: 1_000_000_00}
    }
  }
})

Summary

Functions

Cancel (delete) the active limit override for an account.

Create a limit override for an account.

Get the current limit override for an account.

Update the active limit override for an account.

Functions

cancel(account_id, opts \\ [])

@spec cancel(
  String.t(),
  keyword()
) :: {:ok, nil} | {:error, term()}

Cancel (delete) the active limit override for an account.

create(account_id, params, opts \\ [])

@spec create(String.t(), map(), keyword()) ::
  {:ok, Unit.Resource.AccountLimitOverride.t()} | {:error, term()}

Create a limit override for an account.

Required params

  • :limits — map of limit overrides per rail

Optional

  • :expired_at — ISO 8601 datetime when override expires

get(account_id, opts \\ [])

@spec get(
  String.t(),
  keyword()
) :: {:ok, Unit.Resource.AccountLimitOverride.t()} | {:error, term()}

Get the current limit override for an account.

update(account_id, params, opts \\ [])

@spec update(String.t(), map(), keyword()) ::
  {:ok, Unit.Resource.AccountLimitOverride.t()} | {:error, term()}

Update the active limit override for an account.