Marqeta.BusinessTransitions (marqeta v1.0.0)

Copy Markdown View Source

Manage business state transitions (UNVERIFIED → LIMITED → ACTIVE → SUSPENDED → CLOSED).

Summary

Functions

Creates a new business transition.

Creates a new business transition. Raises Marqeta.Error on failure.

Retrieves a business transition by token.

Retrieves a business transition by token. Raises Marqeta.Error on failure.

Lists business transition resources.

Lists business transition resources. Raises Marqeta.Error on failure.

Lists all state transitions for a business.

Returns a lazy Stream that auto-paginates business transition resources.

Functions

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

@spec create(
  map(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Creates a new business transition.

Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.

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

@spec create!(
  map(),
  keyword()
) :: map()

Creates a new business transition. Raises Marqeta.Error on failure.

get(token, opts \\ [])

@spec get(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Retrieves a business transition by token.

Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.

get!(token, opts \\ [])

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

Retrieves a business transition by token. Raises Marqeta.Error on failure.

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

@spec list(
  map(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Lists business transition resources.

Accepts standard Marqeta pagination params: count, start_index, sort_by, sort_order, fields.

Use stream/2 to lazily iterate all pages automatically.

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

@spec list!(
  map(),
  keyword()
) :: map()

Lists business transition resources. Raises Marqeta.Error on failure.

list_by_business(token, params \\ %{}, opts \\ [])

@spec list_by_business(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Marqeta.Error.t()}

Lists all state transitions for a business.

stream(params \\ %{}, opts \\ [])

@spec stream(
  map(),
  keyword()
) :: Enumerable.t()

Returns a lazy Stream that auto-paginates business transition resources.