Mollie.Customers (mollie v0.7.2)
Creates a simple minimal representation of a customer in the Mollie API to use for the Mollie Checkout and Recurring features. These customers will appear in your Mollie Dashboard where you can manage their details, and also see their payments and subscriptions.
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
create(client, body)
Specs
create(Mollie.Client.t(), map()) :: Mollie.response()
Creates a customer.
Customer body example
%{
"name" => "Customer A",
"email" => "customer@example.com"
}
example
Example
Mollie.Customers.create client, customer_body
More info at: https://docs.mollie.com/reference/v2/customers-api/create-customer
find(client, id, params \\ %{})
Specs
find(Mollie.Client.t(), binary(), map() | list()) :: Mollie.response()
Retrieve a single customer by its ID.
example
Example
Mollie.Customers.find client, "cst_8wmqcHMN4U"
More info at: https://docs.mollie.com/reference/v2/customers-api/get-customer
list(client, params \\ %{})
Specs
list(Mollie.Client.t(), map() | list()) :: Mollie.response()
Retrieve all customers created. Results are paginated.
example
Example
Mollie.Customers.list client
More info at: https://docs.mollie.com/reference/v2/customers-api/list-customers
remove(client, id, params \\ %{})
Specs
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
Example
Mollie.Customers.remove client, "cst_8wmqcHMN4U"
More info at: https://docs.mollie.com/reference/v2/customers-api/delete-customer
update(client, id, body)
Specs
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
Example
Mollie.Customers.update client, "cst_8wmqcHMN4U", customer_body
More info at: https://docs.mollie.com/reference/v2/customers-api/update-customer