Class MethodHandler
- java.lang.Object
-
- be.woutschoovaerts.mollie.handler.payments.MethodHandler
-
public class MethodHandler extends Object
Handles the Method API Mollie docs- Author:
- Wout Schoovaerts
-
-
Constructor Summary
Constructors Constructor Description MethodHandler(RestService restService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodResponse
getMethod(String methodId)
Retrieve a single method by its ID.MethodResponse
getMethod(String methodId, QueryParams params)
Retrieve a single method by its ID.Pagination<MethodListResponse>
listAllMethods()
Retrieve all payment methods that Mollie offers and can be activated by the Organization.Pagination<MethodListResponse>
listAllMethods(QueryParams params)
Retrieve all payment methods that Mollie offers and can be activated by the Organization.Pagination<MethodListResponse>
listMethods()
Retrieve all available payment methods.Pagination<MethodListResponse>
listMethods(QueryParams params)
Retrieve all available payment methods.
-
-
-
Constructor Detail
-
MethodHandler
public MethodHandler(RestService restService)
-
-
Method Detail
-
listMethods
public Pagination<MethodListResponse> listMethods() throws MollieException
Retrieve all available payment methods. The results are not paginated. For test mode, payment methods are returned that are enabled in the Dashboard (or the activation is pending). For live mode, payment methods are returned that have been activated on your account and have been enabled in the Dashboard. When using the first sequence type, methods will be returned if they can be used as a first payment in a recurring sequence and if they are enabled in the Dashboard. When using the recurring sequence type, payment methods that can be used for recurring payments or subscriptions will be returned. Enabling / disabling methods in the dashboard does not affect how they can be used for recurring payments.- Returns:
- The methods paginated
- Throws:
MollieException
- When something goes wrong
-
listMethods
public Pagination<MethodListResponse> listMethods(QueryParams params) throws MollieException
Retrieve all available payment methods. The results are not paginated. For test mode, payment methods are returned that are enabled in the Dashboard (or the activation is pending). For live mode, payment methods are returned that have been activated on your account and have been enabled in the Dashboard. When using the first sequence type, methods will be returned if they can be used as a first payment in a recurring sequence and if they are enabled in the Dashboard. When using the recurring sequence type, payment methods that can be used for recurring payments or subscriptions will be returned. Enabling / disabling methods in the dashboard does not affect how they can be used for recurring payments.- Parameters:
params
- A map of query parameters- Returns:
- The methods paginated
- Throws:
MollieException
- When something goes wrong
-
listAllMethods
public Pagination<MethodListResponse> listAllMethods() throws MollieException
Retrieve all payment methods that Mollie offers and can be activated by the Organization. The results are not paginated. New payment methods can be activated via the Enable payment method endpoint in the Profiles API.- Returns:
- The methods paginated
- Throws:
MollieException
- When something goes wrong
-
listAllMethods
public Pagination<MethodListResponse> listAllMethods(QueryParams params) throws MollieException
Retrieve all payment methods that Mollie offers and can be activated by the Organization. The results are not paginated. New payment methods can be activated via the Enable payment method endpoint in the Profiles API.- Parameters:
params
- A map of query parameters- Returns:
- The methods paginated
- Throws:
MollieException
- When something goes wrong
-
getMethod
public MethodResponse getMethod(String methodId) throws MollieException
Retrieve a single method by its ID. Note that if a method is not available on the website profile a status 404 Not found is returned. When the method is not enabled, a status 403 Forbidden is returned.- Parameters:
methodId
- the method id- Returns:
- The method
- Throws:
MollieException
- when something went wrong
-
getMethod
public MethodResponse getMethod(String methodId, QueryParams params) throws MollieException
Retrieve a single method by its ID. Note that if a method is not available on the website profile a status 404 Not found is returned. When the method is not enabled, a status 403 Forbidden is returned.- Parameters:
methodId
- the method idparams
- A map of query parameters- Returns:
- The method
- Throws:
MollieException
- when something went wrong
-
-