Class MethodHandler


  • public class MethodHandler
    extends Object
    Handles the Method API Mollie docs
    Author:
    Wout Schoovaerts
    • 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 id
        params - A map of query parameters
        Returns:
        The method
        Throws:
        MollieException - when something went wrong