Marqeta.Credit.Applications (marqeta v1.0.0)

Copy Markdown View Source

Manage the credit card application lifecycle, including regulatory disclosure retrieval and status transitions.

Summary

Functions

Creates a new credit application.

Creates a new credit application. Raises Marqeta.Error on failure.

Retrieves regulatory disclosures for an application.

Retrieves a credit application by token.

Retrieves a credit application by token. Raises Marqeta.Error on failure.

Lists credit application resources.

Lists credit application resources. Raises Marqeta.Error on failure.

Returns a lazy Stream that auto-paginates credit application resources.

Transitions an application to a new state.

Updates an existing credit application.

Updates an existing credit application. Raises Marqeta.Error on failure.

Functions

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

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

Creates a new credit application.

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

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

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

Creates a new credit application. Raises Marqeta.Error on failure.

disclosures(application_token, opts \\ [])

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

Retrieves regulatory disclosures for an application.

get(token, opts \\ [])

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

Retrieves a credit application by token.

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

get!(token, opts \\ [])

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

Retrieves a credit application by token. Raises Marqeta.Error on failure.

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

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

Lists credit application 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 credit application resources. Raises Marqeta.Error on failure.

list_transitions(application_token, params \\ %{}, opts \\ [])

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

Lists application transitions.

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

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

Returns a lazy Stream that auto-paginates credit application resources.

transition(application_token, params, opts \\ [])

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

Transitions an application to a new state.

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

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

Updates an existing credit application.

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

update!(token, params, opts \\ [])

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

Updates an existing credit application. Raises Marqeta.Error on failure.