MollieEx.Methods (mollie_ex v0.4.0)

Copy Markdown View Source

Retrieve Mollie payment methods.

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

Summary

Functions

Lists all Mollie payment methods, including unavailable methods.

Retrieves a Mollie payment method by ID.

Lists enabled Mollie payment methods.

Types

all_option()

(since 0.4.0)
@type all_option() ::
  {:amount, map()}
  | {:include, String.t()}
  | {:locale, String.t()}
  | {:profile_id, String.t()}
  | {:sequence_type, String.t()}
  | {:testmode, boolean()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

get_option()

(since 0.4.0)
@type get_option() ::
  {:currency, String.t()}
  | {:include, String.t()}
  | {:locale, String.t()}
  | {:profile_id, String.t()}
  | {:sequence_type, String.t()}
  | {:testmode, boolean()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

list_option()

(since 0.4.0)
@type list_option() ::
  {:amount, map()}
  | {:billing_country, String.t()}
  | {:include, String.t()}
  | {:include_wallets, String.t()}
  | {:locale, String.t()}
  | {:order_line_categories, String.t()}
  | {:profile_id, String.t()}
  | {:resource, String.t()}
  | {:sequence_type, String.t()}
  | {:testmode, boolean()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

Functions

all(client, opts \\ [])

(since 0.4.0)
@spec all(MollieEx.Client.t(), [all_option()]) ::
  {:ok, MollieEx.List.t(MollieEx.Method.t())} | {:error, MollieEx.Error.t()}

Lists all Mollie payment methods, including unavailable methods.

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

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

Retrieves a Mollie payment method by ID.

list(client, opts \\ [])

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

Lists enabled Mollie payment methods.