Tipalti.Payees (tipalti_client v1.0.0)

Copy Markdown View Source

Modern REST API — payee onboarding and management.

Endpoint shapes follow Tipalti's documented conventions for the modern REST API (resource-oriented URLs under /api/v1, cursor-based pagination via a cursor/limit query pair and a next_cursor field in list responses, JSON bodies, OAuth2 bearer auth). If your Tipalti instance's exact response envelope differs, override Tipalti.Config :rest_base_url is not enough on its own — open an issue or adjust @base_path / extract_page/1 in this module to match; the request/auth/pagination/ error-handling machinery underneath (Tipalti.Client, Tipalti.Pagination) is meant to be reused as-is.

Summary

Functions

Reactivates a previously suspended payee.

Creates a new payee.

Retrieves a single payee by ID.

Lists payees. Returns a single page; see stream/2 to walk every page.

Same as list/2 but raises on error.

Returns a lazy Stream of every payee across all pages, fetching pages on demand as the stream is consumed.

Suspends a payee, blocking further payments until reactivated.

Updates an existing payee.

Functions

activate(config, payee_id)

@spec activate(Tipalti.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Exception.t()}

Reactivates a previously suspended payee.

activate!(config, payee_id)

@spec activate!(Tipalti.Config.t(), String.t()) :: map()

create(config, attrs)

@spec create(Tipalti.Config.t(), map()) :: {:ok, map()} | {:error, Exception.t()}

Creates a new payee.

create!(config, attrs)

@spec create!(Tipalti.Config.t(), map()) :: map()

get(config, payee_id)

@spec get(Tipalti.Config.t(), String.t()) :: {:ok, map()} | {:error, Exception.t()}

Retrieves a single payee by ID.

get!(config, payee_id)

@spec get!(Tipalti.Config.t(), String.t()) :: map()

list(config, opts \\ [])

@spec list(
  Tipalti.Config.t(),
  keyword()
) :: {:ok, map()} | {:error, Exception.t()}

Lists payees. Returns a single page; see stream/2 to walk every page.

list!(config, opts \\ [])

@spec list!(
  Tipalti.Config.t(),
  keyword()
) :: map()

Same as list/2 but raises on error.

stream(config, opts \\ [])

@spec stream(
  Tipalti.Config.t(),
  keyword()
) :: Enumerable.t()

Returns a lazy Stream of every payee across all pages, fetching pages on demand as the stream is consumed.

suspend(config, payee_id)

@spec suspend(Tipalti.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Exception.t()}

Suspends a payee, blocking further payments until reactivated.

suspend!(config, payee_id)

@spec suspend!(Tipalti.Config.t(), String.t()) :: map()

update(config, payee_id, attrs)

@spec update(Tipalti.Config.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Exception.t()}

Updates an existing payee.

update!(config, payee_id, attrs)

@spec update!(Tipalti.Config.t(), String.t(), map()) :: map()