Marqeta.CardholderStatements (marqeta v1.0.0)

Copy Markdown View Source

Create and retrieve cardholder statements for prepaid accounts.

Summary

Functions

Creates a new cardholder statement.

Creates a new cardholder statement. Raises Marqeta.Error on failure.

Retrieves a cardholder statement by token.

Retrieves a cardholder statement by token. Raises Marqeta.Error on failure.

Lists cardholder statement resources.

Lists cardholder statement resources. Raises Marqeta.Error on failure.

Returns a lazy Stream that auto-paginates cardholder statement resources.

Updates an existing cardholder statement.

Updates an existing cardholder statement. Raises Marqeta.Error on failure.

Functions

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

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

Creates a new cardholder statement.

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

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

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

Creates a new cardholder statement. Raises Marqeta.Error on failure.

get(token, opts \\ [])

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

Retrieves a cardholder statement by token.

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

get!(token, opts \\ [])

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

Retrieves a cardholder statement by token. Raises Marqeta.Error on failure.

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

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

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

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

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

Returns a lazy Stream that auto-paginates cardholder statement resources.

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

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

Updates an existing cardholder statement.

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

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

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

Updates an existing cardholder statement. Raises Marqeta.Error on failure.