mollie v0.2.2 Mollie.Customers

Link to this section Summary

Functions

Creates a customer

Retrieve a single customer by its ID

Retrieve all customers created. Results are paginated

Delete a customer. All mandates and subscriptions created for this customer will be canceled as well

Update an existing customer

Link to this section Functions

Link to this function create(client, body)
create(Mollie.Client.t(), map()) :: Mollie.response()

Creates a customer.

Customer body example

%{
  "name" => "Customer A",
  "email" => "customer@example.com"
}

Example

Mollie.Customers.create client, customer_body

More info at: https://docs.mollie.com/reference/v2/customers-api/create-customer

Link to this function find(client, id, params \\ %{})
find(Mollie.Client.t(), binary(), map() | list()) :: Mollie.response()

Retrieve a single customer by its ID.

Example

Mollie.Customers.find client, "cst_8wmqcHMN4U"

More info at: https://docs.mollie.com/reference/v2/customers-api/get-customer

Link to this function list(client, params \\ %{})
list(Mollie.Client.t(), map() | list()) :: Mollie.response()

Retrieve all customers created. Results are paginated.

Example

Mollie.Customers.list client

More info at: https://docs.mollie.com/reference/v2/customers-api/list-customers

Link to this function remove(client, id, params \\ %{})
remove(Mollie.Client.t(), binary(), map() | list()) :: Mollie.response()

Delete a customer. All mandates and subscriptions created for this customer will be canceled as well.

Example

Mollie.Customers.remove client, "cst_8wmqcHMN4U"

More info at: https://docs.mollie.com/reference/v2/customers-api/delete-customer

Link to this function update(client, id, body)
update(Mollie.Client.t(), binary(), map()) :: Mollie.response()

Update an existing customer.

Customer body example

%{
  "name" => "Customer Anderson",
  "email" => "customer_anderson@example.com",
  "locale" => "en_US"
}

Example

Mollie.Customers.update client, "cst_8wmqcHMN4U", customer_body

More info at: https://docs.mollie.com/reference/v2/customers-api/update-customer