MollieEx.Profiles (mollie_ex v0.4.0)

Copy Markdown View Source

Create, retrieve, list, update, and delete Mollie profiles.

All functions return result tuples. They do not raise for ordinary API, transport, or validation failures.

Summary

Functions

Creates a Mollie profile.

Retrieves the profile tied to an API-key client.

Deletes a profile by ID.

Retrieves a profile by ID.

Lists Mollie profiles.

Types

create_option()

(since 0.4.0)
@type create_option() ::
  {:idempotency_key, String.t()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

create_params()

(since 0.4.0)
@type create_params() :: map()

current_option()

(since 0.4.0)
@type current_option() ::
  {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

delete_option()

(since 0.4.0)
@type delete_option() ::
  {:idempotency_key, String.t()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

get_option()

(since 0.4.0)
@type get_option() ::
  {:testmode, boolean()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

list_option()

(since 0.4.0)
@type list_option() ::
  {:from, String.t()}
  | {:limit, pos_integer()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

update_option()

(since 0.4.0)
@type update_option() ::
  {:idempotency_key, String.t()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

update_params()

(since 0.4.0)
@type update_params() :: map()

Functions

create(client, params, opts \\ [])

(since 0.4.0)
@spec create(MollieEx.Client.t(), create_params(), [create_option()]) ::
  {:ok, MollieEx.Profile.t()} | {:error, MollieEx.Error.t()}

Creates a Mollie profile.

Profile creation requires an organization/OAuth-style bearer credential.

current(client, opts \\ [])

(since 0.4.0)
@spec current(MollieEx.Client.t(), [current_option()]) ::
  {:ok, MollieEx.Profile.t()} | {:error, MollieEx.Error.t()}

Retrieves the profile tied to an API-key client.

delete(client, profile_id, opts \\ [])

(since 0.4.0)
@spec delete(MollieEx.Client.t(), String.t(), [delete_option()]) ::
  {:ok, :no_content} | {:error, MollieEx.Error.t()}

Deletes a profile by ID.

get(client, profile_id, opts \\ [])

(since 0.4.0)
@spec get(MollieEx.Client.t(), String.t(), [get_option()]) ::
  {:ok, MollieEx.Profile.t()} | {:error, MollieEx.Error.t()}

Retrieves a profile by ID.

list(client, opts \\ [])

(since 0.4.0)
@spec list(MollieEx.Client.t(), [list_option()]) ::
  {:ok, MollieEx.List.t(MollieEx.Profile.t())} | {:error, MollieEx.Error.t()}

Lists Mollie profiles.

update(client, profile_id, params, opts \\ [])

(since 0.4.0)
@spec update(MollieEx.Client.t(), String.t(), update_params(), [update_option()]) ::
  {:ok, MollieEx.Profile.t()} | {:error, MollieEx.Error.t()}

Updates a profile by ID.

Profile updates require an organization/OAuth-style bearer credential and support caller-owned idempotency keys.