Manage policy configurations: documents, APRs, fees, and rewards. Policies are attached to bundles which are then attached to accounts.
Summary
Functions
Creates a new credit policy.
Creates a new credit policy. Raises Marqeta.Error on failure.
Creates an APR policy.
Creates a document policy.
Creates a fee policy.
Creates a credit product policy.
Creates a reward policy.
Retrieves a credit policy by token.
Retrieves a credit policy by token. Raises Marqeta.Error on failure.
Retrieves an APR policy.
Retrieves a document policy.
Retrieves a fee policy.
Retrieves a credit product policy.
Retrieves a reward policy.
Lists credit policy resources.
Lists credit policy resources. Raises Marqeta.Error on failure.
Lists APR policies.
Lists document policies.
Lists fee policies.
Lists reward policies.
Returns a lazy Stream that auto-paginates credit policy resources.
Updates an existing credit policy.
Updates an existing credit policy. Raises Marqeta.Error on failure.
Updates an APR policy.
Updates a document policy.
Updates a fee policy.
Updates a credit product policy.
Updates a reward policy.
Functions
@spec create( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Creates a new credit policy.
Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.
Creates a new credit policy. Raises Marqeta.Error on failure.
@spec create_apr_policy( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Creates an APR policy.
@spec create_document_policy( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Creates a document policy.
@spec create_fee_policy( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Creates a fee policy.
@spec create_product_policy( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Creates a credit product policy.
@spec create_reward_policy( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Creates a reward policy.
@spec get( String.t(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Retrieves a credit policy by token.
Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.
Retrieves a credit policy by token. Raises Marqeta.Error on failure.
@spec get_apr_policy( String.t(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Retrieves an APR policy.
@spec get_document_policy( String.t(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Retrieves a document policy.
@spec get_fee_policy( String.t(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Retrieves a fee policy.
@spec get_product_policy( String.t(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Retrieves a credit product policy.
@spec get_reward_policy( String.t(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Retrieves a reward policy.
@spec list( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists credit policy resources.
Accepts standard Marqeta pagination params:
count, start_index, sort_by, sort_order, fields.
Use stream/2 to lazily iterate all pages automatically.
Lists credit policy resources. Raises Marqeta.Error on failure.
@spec list_apr_policies( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists APR policies.
@spec list_document_policies( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists document policies.
@spec list_fee_policies( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists fee policies.
@spec list_reward_policies( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists reward policies.
@spec stream( map(), keyword() ) :: Enumerable.t()
Returns a lazy Stream that auto-paginates credit policy resources.
@spec update(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Updates an existing credit policy.
Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.
Updates an existing credit policy. Raises Marqeta.Error on failure.
@spec update_apr_policy(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Updates an APR policy.
@spec update_document_policy(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Updates a document policy.
@spec update_fee_policy(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Updates a fee policy.
@spec update_product_policy(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Updates a credit product policy.
@spec update_reward_policy(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Updates a reward policy.