Marqeta.Businesses (marqeta v1.0.0)

Copy Markdown View Source

Business account holders with KYC via EIN and beneficial owner structures. Businesses can own cards and hold GPAs.

Summary

Functions

Returns the GPA balance for a business.

Creates a new business.

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

Creates a note on a business.

Retrieves a business by token.

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

Lists business resources.

Lists business resources. Raises Marqeta.Error on failure.

Lists cards belonging to a business.

Lists child businesses of a parent business.

Returns a lazy Stream that auto-paginates business resources.

Streams transactions for a business.

Lists transactions for a business.

Updates an existing business.

Updates an existing business. Raises Marqeta.Error on failure.

Functions

balances(token, opts \\ [])

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

Returns the GPA balance for a business.

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

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

Creates a new business.

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

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

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

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

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

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

Creates a note on a business.

get(token, opts \\ [])

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

Retrieves a business by token.

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

get!(token, opts \\ [])

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

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

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

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

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

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

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

Lists cards belonging to a business.

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

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

Lists child businesses of a parent business.

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

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

Lists notes on a business.

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

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

Returns a lazy Stream that auto-paginates business resources.

stream_transactions(token, params \\ %{})

@spec stream_transactions(String.t(), map()) :: Enumerable.t()

Streams transactions for a business.

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

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

Lists transactions for a business.

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

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

Updates an existing business.

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

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

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

Updates an existing business. Raises Marqeta.Error on failure.