Create, retrieve, list, update, and delete Mollie customers.
All functions return result tuples. They do not raise for ordinary API, transport, or validation failures.
Customer creation accepts a caller-owned idempotency key. The SDK never generates idempotency keys implicitly.
{:ok, customer} =
MollieEx.Customers.create(
client,
%{
name: "Jane Doe",
email: "jane@example.org"
},
idempotency_key: "0e4f812e-5d50-4fcb-8c42-153f17e52147"
)
Summary
Functions
Creates a Mollie customer.
Deletes a Mollie customer by ID.
Retrieves a Mollie customer by ID.
Lists Mollie customers.
Updates a Mollie customer by ID.
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 delete_option() :: {:idempotency_key, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type get_option() :: {:include, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type list_option() :: {:from, String.t()} | {:limit, pos_integer()} | {:sort, :asc | :desc | String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type update_option() :: {:idempotency_key, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type update_params() :: map()
Functions
@spec create(MollieEx.Client.t(), create_params(), [create_option()]) :: {:ok, MollieEx.Customer.t()} | {:error, MollieEx.Error.t()}
Creates a Mollie customer.
Customer creation supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec delete(MollieEx.Client.t(), String.t(), [delete_option()]) :: {:ok, :no_content} | {:error, MollieEx.Error.t()}
Deletes a Mollie customer by ID.
Customer deletion supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec get(MollieEx.Client.t(), String.t(), [get_option()]) :: {:ok, MollieEx.Customer.t()} | {:error, MollieEx.Error.t()}
Retrieves a Mollie customer by ID.
@spec list(MollieEx.Client.t(), [list_option()]) :: {:ok, MollieEx.List.t(MollieEx.Customer.t())} | {:error, MollieEx.Error.t()}
Lists Mollie customers.
@spec update(MollieEx.Client.t(), String.t(), update_params(), [update_option()]) :: {:ok, MollieEx.Customer.t()} | {:error, MollieEx.Error.t()}
Updates a Mollie customer by ID.
Customer updates support caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.