Create, retrieve, list, and revoke Mollie mandates for customers.
All functions return result tuples. They do not raise for ordinary API, transport, or validation failures.
Summary
Functions
Creates a mandate for a customer.
Retrieves a customer mandate by ID.
Lists customer mandates.
Revokes a customer mandate.
Types
@type create_option() :: {:idempotency_key, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type create_params() :: map()
@type get_option() :: {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type list_option() :: {:from, String.t()} | {:limit, pos_integer()} | {:scopes, [String.t()]} | {:sort, :asc | :desc | String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type revoke_option() :: {:idempotency_key, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
Functions
@spec create(MollieEx.Client.t(), String.t(), create_params(), [create_option()]) :: {:ok, MollieEx.Mandate.t()} | {:error, MollieEx.Error.t()}
Creates a mandate for a customer.
Mandate creation supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec get(MollieEx.Client.t(), String.t(), String.t(), [get_option()]) :: {:ok, MollieEx.Mandate.t()} | {:error, MollieEx.Error.t()}
Retrieves a customer mandate by ID.
@spec list(MollieEx.Client.t(), String.t(), [list_option()]) :: {:ok, MollieEx.List.t(MollieEx.Mandate.t())} | {:error, MollieEx.Error.t()}
Lists customer mandates.
@spec revoke(MollieEx.Client.t(), String.t(), String.t(), [revoke_option()]) :: {:ok, :no_content} | {:error, MollieEx.Error.t()}
Revokes a customer mandate.
Mandate revocation supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.