public class CustomerHandler extends AbstractHandler
| Constructor and Description |
|---|
CustomerHandler(String baseUrl) |
| Modifier and Type | Method and Description |
|---|---|
CustomerResponse |
createCustomer(CustomerRequest body)
Creates a simple minimal representation of a customer in the Mollie API to use for the Mollie Checkout and Recurring features.
|
CustomerResponse |
createCustomer(CustomerRequest body,
QueryParams params)
Creates a simple minimal representation of a customer in the Mollie API to use for the Mollie Checkout and Recurring features.
|
PaymentResponse |
createCustomerPayment(String customerId,
PaymentRequest body)
Creates a payment for the customer.
|
PaymentResponse |
createCustomerPayment(String customerId,
PaymentRequest body,
QueryParams params)
Creates a payment for the customer.
|
void |
deleteCustomer(String customerId)
Delete a customer.
|
void |
deleteCustomer(String customerId,
QueryParams params)
Delete a customer.
|
CustomerResponse |
getCustomer(String customerId)
Retrieve a single customer by its ID.
|
CustomerResponse |
getCustomer(String customerId,
QueryParams params)
Retrieve a single customer by its ID.
|
Pagination<PaymentListResponse> |
listCustomerPayments(String customerId)
Retrieve all payments linked to the customer.
|
Pagination<PaymentListResponse> |
listCustomerPayments(String customerId,
QueryParams params)
Retrieve all payments linked to the customer.
|
Pagination<CustomerListResponse> |
listCustomers()
Retrieve all customers created.
|
Pagination<CustomerListResponse> |
listCustomers(QueryParams params)
Retrieve all customers created.
|
CustomerResponse |
updateCustomer(String customerId,
CustomerRequest body)
Update an existing customer.
|
CustomerResponse |
updateCustomer(String customerId,
CustomerRequest body,
QueryParams params)
Update an existing customer.
|
delete, delete, delete, get, get, patch, patch, post, post, postWithoutBody, validateResponsepublic CustomerHandler(String baseUrl)
public CustomerResponse createCustomer(CustomerRequest body) throws MollieException
body - CustomerRequest objectMollieException - when something went wrongpublic CustomerResponse createCustomer(CustomerRequest body, QueryParams params) throws MollieException
body - CustomerRequest objectparams - A map of query parametersMollieException - when something went wrongpublic CustomerResponse getCustomer(String customerId) throws MollieException
customerId - a customer idMollieException - when something went wrongpublic CustomerResponse getCustomer(String customerId, QueryParams params) throws MollieException
customerId - a customer idparams - A map of query parametersMollieException - when something went wrongpublic CustomerResponse updateCustomer(String customerId, CustomerRequest body) throws MollieException
body - CustomerRequest objectMollieException - when something went wrongpublic CustomerResponse updateCustomer(String customerId, CustomerRequest body, QueryParams params) throws MollieException
body - CustomerRequest objectparams - A map of query parametersMollieException - when something went wrongpublic void deleteCustomer(String customerId) throws MollieException
customerId - a customer idMollieException - when something went wrongpublic void deleteCustomer(String customerId, QueryParams params) throws MollieException
customerId - a customer idparams - A map of query parametersMollieException - when something went wrongpublic Pagination<CustomerListResponse> listCustomers() throws MollieException
The results are paginated.
MollieException - when something went wrongpublic Pagination<CustomerListResponse> listCustomers(QueryParams params) throws MollieException
The results are paginated.
params - A map of query parametersMollieException - when something went wrongpublic PaymentResponse createCustomerPayment(String customerId, PaymentRequest body) throws MollieException
Linking customers to payments enables a number of Mollie Checkout features
customerId - a customer idbody - PaymentRequest objectMollieException - when something went wrongpublic PaymentResponse createCustomerPayment(String customerId, PaymentRequest body, QueryParams params) throws MollieException
Linking customers to payments enables a number of Mollie Checkout features
customerId - a customer idbody - PaymentRequest objectparams - A map of query parametersMollieException - when something went wrongpublic Pagination<PaymentListResponse> listCustomerPayments(String customerId) throws MollieException
customerId - a customer idMollieException - when something went wrongpublic Pagination<PaymentListResponse> listCustomerPayments(String customerId, QueryParams params) throws MollieException
customerId - a customer idparams - A map of query parametersMollieException - when something went wrongCopyright © 2020. All rights reserved.