<filename>swagger_client/api/banks_api.py<gh_stars>1-10
# coding: utf-8

"""
    finAPI RESTful Services

    finAPI RESTful Services  # noqa: E501

    OpenAPI spec version: v1.42.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class BanksApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def get_and_search_all_banks(self, **kwargs):  # noqa: E501
        """Get and search all banks  # noqa: E501

        Get and search banks from finAPI's database of banks. Must pass the authorized user's access_token, or your client's access_token. You can set optional search criteria to get only those banks that you are interested in. If you do not specify any search criteria, then this service functions as a 'get all' service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_and_search_all_banks(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[int] ids: A comma-separated list of bank identifiers. If specified, then only banks whose identifier match any of the given identifiers will be regarded. The maximum number of identifiers is 1000.
        :param str search: If specified, then only those banks will be contained in the result whose 'name', 'blz', 'bic' or 'city' contains the given search string (the matching works case-insensitive). If no banks contain the search string in any of the regarded fields, then the result will be an empty list. Note that you may also pass an IBAN in this field, in which case finAPI will try to find the related bank in its database and regard only this bank for the search. Also note: If the given search string consists of several terms (separated by whitespace), then ALL of these terms must apply to a bank in order for it to get included into the result.
        :param bool is_supported: If specified, then only supported (in case of 'true' value) or unsupported (in case of 'false' value) banks will be regarded.
        :param bool pins_are_volatile: If specified, then only those banks will be regarded that have the given value (true or false) for their 'pinsAreVolatile' field.
        :param list[str] supported_data_sources: Comma-separated list of data sources. Possible values: WEB_SCRAPER,FINTS_SERVER. If this parameter is specified, then only those banks will be regarded in the search that support ALL of the given data sources. Note that this does NOT imply that those data sources must be the only data sources that are supported by a bank.
        :param list[str] location: Comma-separated list of two-letter country codes (ISO 3166 ALPHA-2). If set, then only those banks will be regarded in the search that are located in the specified countries. Notes: Banks which do not have a location set (i.e. international institutes) will ALWAYS be regarded in the search, independent of what you specify for this field. When you pass a country code that doesn't exist in the ISO 3166 ALPHA-2 standard, then the service will respond with 400 BAD_REQUEST.
        :param bool is_test_bank: If specified, then only those banks will be regarded that have the given value (true or false) for their 'isTestBank' field.
        :param int page: Result page that you want to retrieve.
        :param int per_page: Maximum number of records per page. Can be at most 500. NOTE: Due to its validation and visualization, the swagger frontend might show very low performance, or even crashes, when a service responds with a lot of data. It is recommended to use a HTTP client like Postman or DHC instead of our swagger frontend for service calls with large page sizes.
        :param list[str] order: Determines the order of the results. You can order the results by 'id', 'name', 'blz', 'bic' or 'popularity'. The default order for all services is 'id,asc'. You can also order by multiple properties. In that case the order of the parameters passed is important. Example: '/banks?order=name,desc&order=id,asc' will return banks ordered by 'name' (descending), where banks with the same 'name' are ordered by 'id' (ascending). The general format is: 'property[,asc|desc]', with 'asc' being the default value. Please note that ordering by multiple fields is not supported in our swagger frontend, but you can test this feature with any HTTP tool of your choice (e.g. postman or DHC). 
        :return: PageableBankList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_and_search_all_banks_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_and_search_all_banks_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_and_search_all_banks_with_http_info(self, **kwargs):  # noqa: E501
        """Get and search all banks  # noqa: E501

        Get and search banks from finAPI's database of banks. Must pass the authorized user's access_token, or your client's access_token. You can set optional search criteria to get only those banks that you are interested in. If you do not specify any search criteria, then this service functions as a 'get all' service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_and_search_all_banks_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[int] ids: A comma-separated list of bank identifiers. If specified, then only banks whose identifier match any of the given identifiers will be regarded. The maximum number of identifiers is 1000.
        :param str search: If specified, then only those banks will be contained in the result whose 'name', 'blz', 'bic' or 'city' contains the given search string (the matching works case-insensitive). If no banks contain the search string in any of the regarded fields, then the result will be an empty list. Note that you may also pass an IBAN in this field, in which case finAPI will try to find the related bank in its database and regard only this bank for the search. Also note: If the given search string consists of several terms (separated by whitespace), then ALL of these terms must apply to a bank in order for it to get included into the result.
        :param bool is_supported: If specified, then only supported (in case of 'true' value) or unsupported (in case of 'false' value) banks will be regarded.
        :param bool pins_are_volatile: If specified, then only those banks will be regarded that have the given value (true or false) for their 'pinsAreVolatile' field.
        :param list[str] supported_data_sources: Comma-separated list of data sources. Possible values: WEB_SCRAPER,FINTS_SERVER. If this parameter is specified, then only those banks will be regarded in the search that support ALL of the given data sources. Note that this does NOT imply that those data sources must be the only data sources that are supported by a bank.
        :param list[str] location: Comma-separated list of two-letter country codes (ISO 3166 ALPHA-2). If set, then only those banks will be regarded in the search that are located in the specified countries. Notes: Banks which do not have a location set (i.e. international institutes) will ALWAYS be regarded in the search, independent of what you specify for this field. When you pass a country code that doesn't exist in the ISO 3166 ALPHA-2 standard, then the service will respond with 400 BAD_REQUEST.
        :param bool is_test_bank: If specified, then only those banks will be regarded that have the given value (true or false) for their 'isTestBank' field.
        :param int page: Result page that you want to retrieve.
        :param int per_page: Maximum number of records per page. Can be at most 500. NOTE: Due to its validation and visualization, the swagger frontend might show very low performance, or even crashes, when a service responds with a lot of data. It is recommended to use a HTTP client like Postman or DHC instead of our swagger frontend for service calls with large page sizes.
        :param list[str] order: Determines the order of the results. You can order the results by 'id', 'name', 'blz', 'bic' or 'popularity'. The default order for all services is 'id,asc'. You can also order by multiple properties. In that case the order of the parameters passed is important. Example: '/banks?order=name,desc&order=id,asc' will return banks ordered by 'name' (descending), where banks with the same 'name' are ordered by 'id' (ascending). The general format is: 'property[,asc|desc]', with 'asc' being the default value. Please note that ordering by multiple fields is not supported in our swagger frontend, but you can test this feature with any HTTP tool of your choice (e.g. postman or DHC). 
        :return: PageableBankList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['ids', 'search', 'is_supported', 'pins_are_volatile', 'supported_data_sources', 'location', 'is_test_bank', 'page', 'per_page', 'order']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_and_search_all_banks" % key
                )
            params[key] = val
        del params['kwargs']

        if 'page' in params and params['page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `get_and_search_all_banks`, must be a value greater than or equal to `1`")  # noqa: E501
        if 'per_page' in params and params['per_page'] > 500:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `get_and_search_all_banks`, must be a value less than or equal to `500`")  # noqa: E501
        if 'per_page' in params and params['per_page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `get_and_search_all_banks`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'ids' in params:
            query_params.append(('ids', params['ids']))  # noqa: E501
            collection_formats['ids'] = 'multi'  # noqa: E501
        if 'search' in params:
            query_params.append(('search', params['search']))  # noqa: E501
        if 'is_supported' in params:
            query_params.append(('isSupported', params['is_supported']))  # noqa: E501
        if 'pins_are_volatile' in params:
            query_params.append(('pinsAreVolatile', params['pins_are_volatile']))  # noqa: E501
        if 'supported_data_sources' in params:
            query_params.append(('supportedDataSources', params['supported_data_sources']))  # noqa: E501
            collection_formats['supportedDataSources'] = 'multi'  # noqa: E501
        if 'location' in params:
            query_params.append(('location', params['location']))  # noqa: E501
            collection_formats['location'] = 'multi'  # noqa: E501
        if 'is_test_bank' in params:
            query_params.append(('isTestBank', params['is_test_bank']))  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'per_page' in params:
            query_params.append(('perPage', params['per_page']))  # noqa: E501
        if 'order' in params:
            query_params.append(('order', params['order']))  # noqa: E501
            collection_formats['order'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['finapi_auth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/banks', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PageableBankList',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_bank(self, id, **kwargs):  # noqa: E501
        """Get a bank  # noqa: E501

        Get a single bank from finAPI's database of banks. You have to pass the bank's identifier, and either the authorized user's access_token, or your client's access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_bank(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: Identifier of requested bank (required)
        :return: Bank
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_bank_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_bank_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_bank_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a bank  # noqa: E501

        Get a single bank from finAPI's database of banks. You have to pass the bank's identifier, and either the authorized user's access_token, or your client's access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_bank_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: Identifier of requested bank (required)
        :return: Bank
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_bank" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_bank`")  # noqa: E501

        if 'id' in params and not re.search('[\\d]+', params['id']):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_bank`, must conform to the pattern `/[\\d]+/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['finapi_auth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/banks/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Bank',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_multiple_banks(self, ids, **kwargs):  # noqa: E501
        """Get multiple banks  # noqa: E501

        Get a list of multiple banks from finAPI's database of banks. You have to pass a list of bank identifiers, and either the authorized user's access_token, or your client's access token. Note that banks whose identifiers do not exist will not be contained in the result (If this applies to all of the given identifiers, then the result will be an empty list).<br/><br/><b>WARNING</b>: This service is deprecated and will be removed at some point. If you want to get multiple banks, please instead use the service 'Get and search all banks' and pass a comma-separated list of identifiers with the parameter 'ids'.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_multiple_banks(ids, async=True)
        >>> result = thread.get()

        :param async bool
        :param list[int] ids: Comma-separated list of identifiers of requested banks (required)
        :return: BankList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_multiple_banks_with_http_info(ids, **kwargs)  # noqa: E501
        else:
            (data) = self.get_multiple_banks_with_http_info(ids, **kwargs)  # noqa: E501
            return data

    def get_multiple_banks_with_http_info(self, ids, **kwargs):  # noqa: E501
        """Get multiple banks  # noqa: E501

        Get a list of multiple banks from finAPI's database of banks. You have to pass a list of bank identifiers, and either the authorized user's access_token, or your client's access token. Note that banks whose identifiers do not exist will not be contained in the result (If this applies to all of the given identifiers, then the result will be an empty list).<br/><br/><b>WARNING</b>: This service is deprecated and will be removed at some point. If you want to get multiple banks, please instead use the service 'Get and search all banks' and pass a comma-separated list of identifiers with the parameter 'ids'.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_multiple_banks_with_http_info(ids, async=True)
        >>> result = thread.get()

        :param async bool
        :param list[int] ids: Comma-separated list of identifiers of requested banks (required)
        :return: BankList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['ids']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_multiple_banks" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'ids' is set
        if ('ids' not in params or
                params['ids'] is None):
            raise ValueError("Missing the required parameter `ids` when calling `get_multiple_banks`")  # noqa: E501

        if 'ids' in params and not re.search('[\\d]+,[\\d,]+', params['ids']):  # noqa: E501
            raise ValueError("Invalid value for parameter `ids` when calling `get_multiple_banks`, must conform to the pattern `/[\\d]+,[\\d,]+/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'ids' in params:
            path_params['ids'] = params['ids']  # noqa: E501
            collection_formats['ids'] = 'csv'  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['finapi_auth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/banks/{ids}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BankList',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

<filename>swagger_client/api/banks_api.py<gh_stars>1-10
# coding: utf-8

"""
    finAPI RESTful Services

    finAPI RESTful Services  # noqa: E501

    OpenAPI spec version: v1.42.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class BanksApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def get_and_search_all_banks(self, **kwargs):  # noqa: E501
        """Get and search all banks  # noqa: E501

        Get and search banks from finAPI's database of banks. Must pass the authorized user's access_token, or your client's access_token. You can set optional search criteria to get only those banks that you are interested in. If you do not specify any search criteria, then this service functions as a 'get all' service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_and_search_all_banks(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[int] ids: A comma-separated list of bank identifiers. If specified, then only banks whose identifier match any of the given identifiers will be regarded. The maximum number of identifiers is 1000.
        :param str search: If specified, then only those banks will be contained in the result whose 'name', 'blz', 'bic' or 'city' contains the given search string (the matching works case-insensitive). If no banks contain the search string in any of the regarded fields, then the result will be an empty list. Note that you may also pass an IBAN in this field, in which case finAPI will try to find the related bank in its database and regard only this bank for the search. Also note: If the given search string consists of several terms (separated by whitespace), then ALL of these terms must apply to a bank in order for it to get included into the result.
        :param bool is_supported: If specified, then only supported (in case of 'true' value) or unsupported (in case of 'false' value) banks will be regarded.
        :param bool pins_are_volatile: If specified, then only those banks will be regarded that have the given value (true or false) for their 'pinsAreVolatile' field.
        :param list[str] supported_data_sources: Comma-separated list of data sources. Possible values: WEB_SCRAPER,FINTS_SERVER. If this parameter is specified, then only those banks will be regarded in the search that support ALL of the given data sources. Note that this does NOT imply that those data sources must be the only data sources that are supported by a bank.
        :param list[str] location: Comma-separated list of two-letter country codes (ISO 3166 ALPHA-2). If set, then only those banks will be regarded in the search that are located in the specified countries. Notes: Banks which do not have a location set (i.e. international institutes) will ALWAYS be regarded in the search, independent of what you specify for this field. When you pass a country code that doesn't exist in the ISO 3166 ALPHA-2 standard, then the service will respond with 400 BAD_REQUEST.
        :param bool is_test_bank: If specified, then only those banks will be regarded that have the given value (true or false) for their 'isTestBank' field.
        :param int page: Result page that you want to retrieve.
        :param int per_page: Maximum number of records per page. Can be at most 500. NOTE: Due to its validation and visualization, the swagger frontend might show very low performance, or even crashes, when a service responds with a lot of data. It is recommended to use a HTTP client like Postman or DHC instead of our swagger frontend for service calls with large page sizes.
        :param list[str] order: Determines the order of the results. You can order the results by 'id', 'name', 'blz', 'bic' or 'popularity'. The default order for all services is 'id,asc'. You can also order by multiple properties. In that case the order of the parameters passed is important. Example: '/banks?order=name,desc&order=id,asc' will return banks ordered by 'name' (descending), where banks with the same 'name' are ordered by 'id' (ascending). The general format is: 'property[,asc|desc]', with 'asc' being the default value. Please note that ordering by multiple fields is not supported in our swagger frontend, but you can test this feature with any HTTP tool of your choice (e.g. postman or DHC). 
        :return: PageableBankList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_and_search_all_banks_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_and_search_all_banks_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_and_search_all_banks_with_http_info(self, **kwargs):  # noqa: E501
        """Get and search all banks  # noqa: E501

        Get and search banks from finAPI's database of banks. Must pass the authorized user's access_token, or your client's access_token. You can set optional search criteria to get only those banks that you are interested in. If you do not specify any search criteria, then this service functions as a 'get all' service.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_and_search_all_banks_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[int] ids: A comma-separated list of bank identifiers. If specified, then only banks whose identifier match any of the given identifiers will be regarded. The maximum number of identifiers is 1000.
        :param str search: If specified, then only those banks will be contained in the result whose 'name', 'blz', 'bic' or 'city' contains the given search string (the matching works case-insensitive). If no banks contain the search string in any of the regarded fields, then the result will be an empty list. Note that you may also pass an IBAN in this field, in which case finAPI will try to find the related bank in its database and regard only this bank for the search. Also note: If the given search string consists of several terms (separated by whitespace), then ALL of these terms must apply to a bank in order for it to get included into the result.
        :param bool is_supported: If specified, then only supported (in case of 'true' value) or unsupported (in case of 'false' value) banks will be regarded.
        :param bool pins_are_volatile: If specified, then only those banks will be regarded that have the given value (true or false) for their 'pinsAreVolatile' field.
        :param list[str] supported_data_sources: Comma-separated list of data sources. Possible values: WEB_SCRAPER,FINTS_SERVER. If this parameter is specified, then only those banks will be regarded in the search that support ALL of the given data sources. Note that this does NOT imply that those data sources must be the only data sources that are supported by a bank.
        :param list[str] location: Comma-separated list of two-letter country codes (ISO 3166 ALPHA-2). If set, then only those banks will be regarded in the search that are located in the specified countries. Notes: Banks which do not have a location set (i.e. international institutes) will ALWAYS be regarded in the search, independent of what you specify for this field. When you pass a country code that doesn't exist in the ISO 3166 ALPHA-2 standard, then the service will respond with 400 BAD_REQUEST.
        :param bool is_test_bank: If specified, then only those banks will be regarded that have the given value (true or false) for their 'isTestBank' field.
        :param int page: Result page that you want to retrieve.
        :param int per_page: Maximum number of records per page. Can be at most 500. NOTE: Due to its validation and visualization, the swagger frontend might show very low performance, or even crashes, when a service responds with a lot of data. It is recommended to use a HTTP client like Postman or DHC instead of our swagger frontend for service calls with large page sizes.
        :param list[str] order: Determines the order of the results. You can order the results by 'id', 'name', 'blz', 'bic' or 'popularity'. The default order for all services is 'id,asc'. You can also order by multiple properties. In that case the order of the parameters passed is important. Example: '/banks?order=name,desc&order=id,asc' will return banks ordered by 'name' (descending), where banks with the same 'name' are ordered by 'id' (ascending). The general format is: 'property[,asc|desc]', with 'asc' being the default value. Please note that ordering by multiple fields is not supported in our swagger frontend, but you can test this feature with any HTTP tool of your choice (e.g. postman or DHC). 
        :return: PageableBankList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['ids', 'search', 'is_supported', 'pins_are_volatile', 'supported_data_sources', 'location', 'is_test_bank', 'page', 'per_page', 'order']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_and_search_all_banks" % key
                )
            params[key] = val
        del params['kwargs']

        if 'page' in params and params['page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `page` when calling `get_and_search_all_banks`, must be a value greater than or equal to `1`")  # noqa: E501
        if 'per_page' in params and params['per_page'] > 500:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `get_and_search_all_banks`, must be a value less than or equal to `500`")  # noqa: E501
        if 'per_page' in params and params['per_page'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `per_page` when calling `get_and_search_all_banks`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'ids' in params:
            query_params.append(('ids', params['ids']))  # noqa: E501
            collection_formats['ids'] = 'multi'  # noqa: E501
        if 'search' in params:
            query_params.append(('search', params['search']))  # noqa: E501
        if 'is_supported' in params:
            query_params.append(('isSupported', params['is_supported']))  # noqa: E501
        if 'pins_are_volatile' in params:
            query_params.append(('pinsAreVolatile', params['pins_are_volatile']))  # noqa: E501
        if 'supported_data_sources' in params:
            query_params.append(('supportedDataSources', params['supported_data_sources']))  # noqa: E501
            collection_formats['supportedDataSources'] = 'multi'  # noqa: E501
        if 'location' in params:
            query_params.append(('location', params['location']))  # noqa: E501
            collection_formats['location'] = 'multi'  # noqa: E501
        if 'is_test_bank' in params:
            query_params.append(('isTestBank', params['is_test_bank']))  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'per_page' in params:
            query_params.append(('perPage', params['per_page']))  # noqa: E501
        if 'order' in params:
            query_params.append(('order', params['order']))  # noqa: E501
            collection_formats['order'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['finapi_auth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/banks', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PageableBankList',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_bank(self, id, **kwargs):  # noqa: E501
        """Get a bank  # noqa: E501

        Get a single bank from finAPI's database of banks. You have to pass the bank's identifier, and either the authorized user's access_token, or your client's access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_bank(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: Identifier of requested bank (required)
        :return: Bank
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_bank_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_bank_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_bank_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a bank  # noqa: E501

        Get a single bank from finAPI's database of banks. You have to pass the bank's identifier, and either the authorized user's access_token, or your client's access token.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_bank_with_http_info(id, async=True)
        >>> result = thread.get()

        :param async bool
        :param int id: Identifier of requested bank (required)
        :return: Bank
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_bank" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_bank`")  # noqa: E501

        if 'id' in params and not re.search('[\\d]+', params['id']):  # noqa: E501
            raise ValueError("Invalid value for parameter `id` when calling `get_bank`, must conform to the pattern `/[\\d]+/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['finapi_auth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/banks/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Bank',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_multiple_banks(self, ids, **kwargs):  # noqa: E501
        """Get multiple banks  # noqa: E501

        Get a list of multiple banks from finAPI's database of banks. You have to pass a list of bank identifiers, and either the authorized user's access_token, or your client's access token. Note that banks whose identifiers do not exist will not be contained in the result (If this applies to all of the given identifiers, then the result will be an empty list).<br/><br/><b>WARNING</b>: This service is deprecated and will be removed at some point. If you want to get multiple banks, please instead use the service 'Get and search all banks' and pass a comma-separated list of identifiers with the parameter 'ids'.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_multiple_banks(ids, async=True)
        >>> result = thread.get()

        :param async bool
        :param list[int] ids: Comma-separated list of identifiers of requested banks (required)
        :return: BankList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_multiple_banks_with_http_info(ids, **kwargs)  # noqa: E501
        else:
            (data) = self.get_multiple_banks_with_http_info(ids, **kwargs)  # noqa: E501
            return data

    def get_multiple_banks_with_http_info(self, ids, **kwargs):  # noqa: E501
        """Get multiple banks  # noqa: E501

        Get a list of multiple banks from finAPI's database of banks. You have to pass a list of bank identifiers, and either the authorized user's access_token, or your client's access token. Note that banks whose identifiers do not exist will not be contained in the result (If this applies to all of the given identifiers, then the result will be an empty list).<br/><br/><b>WARNING</b>: This service is deprecated and will be removed at some point. If you want to get multiple banks, please instead use the service 'Get and search all banks' and pass a comma-separated list of identifiers with the parameter 'ids'.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_multiple_banks_with_http_info(ids, async=True)
        >>> result = thread.get()

        :param async bool
        :param list[int] ids: Comma-separated list of identifiers of requested banks (required)
        :return: BankList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['ids']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_multiple_banks" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'ids' is set
        if ('ids' not in params or
                params['ids'] is None):
            raise ValueError("Missing the required parameter `ids` when calling `get_multiple_banks`")  # noqa: E501

        if 'ids' in params and not re.search('[\\d]+,[\\d,]+', params['ids']):  # noqa: E501
            raise ValueError("Invalid value for parameter `ids` when calling `get_multiple_banks`, must conform to the pattern `/[\\d]+,[\\d,]+/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'ids' in params:
            path_params['ids'] = params['ids']  # noqa: E501
            collection_formats['ids'] = 'csv'  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['finapi_auth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/banks/{ids}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BankList',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

# coding: utf-8 finAPI RESTful Services      finAPI RESTful Services  # noqa: E501      OpenAPI spec version: v1.42.1          Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 # python 2 and python 3 compatibility library NOTE: This class is auto generated by the swagger code generator program.      Do not edit the class manually.     Ref: https://github.com/swagger-api/swagger-codegen # noqa: E501 Get and search all banks  # noqa: E501          Get and search banks from finAPI's database of banks. Must pass the authorized user's access_token, or your client's access_token. You can set optional search criteria to get only those banks that you are interested in. If you do not specify any search criteria, then this service functions as a 'get all' service.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_and_search_all_banks(async=True)         >>> result = thread.get()          :param async bool         :param list[int] ids: A comma-separated list of bank identifiers. If specified, then only banks whose identifier match any of the given identifiers will be regarded. The maximum number of identifiers is 1000.         :param str search: If specified, then only those banks will be contained in the result whose 'name', 'blz', 'bic' or 'city' contains the given search string (the matching works case-insensitive). If no banks contain the search string in any of the regarded fields, then the result will be an empty list. Note that you may also pass an IBAN in this field, in which case finAPI will try to find the related bank in its database and regard only this bank for the search. Also note: If the given search string consists of several terms (separated by whitespace), then ALL of these terms must apply to a bank in order for it to get included into the result.         :param bool is_supported: If specified, then only supported (in case of 'true' value) or unsupported (in case of 'false' value) banks will be regarded.         :param bool pins_are_volatile: If specified, then only those banks will be regarded that have the given value (true or false) for their 'pinsAreVolatile' field.         :param list[str] supported_data_sources: Comma-separated list of data sources. Possible values: WEB_SCRAPER,FINTS_SERVER. If this parameter is specified, then only those banks will be regarded in the search that support ALL of the given data sources. Note that this does NOT imply that those data sources must be the only data sources that are supported by a bank.         :param list[str] location: Comma-separated list of two-letter country codes (ISO 3166 ALPHA-2). If set, then only those banks will be regarded in the search that are located in the specified countries. Notes: Banks which do not have a location set (i.e. international institutes) will ALWAYS be regarded in the search, independent of what you specify for this field. When you pass a country code that doesn't exist in the ISO 3166 ALPHA-2 standard, then the service will respond with 400 BAD_REQUEST.         :param bool is_test_bank: If specified, then only those banks will be regarded that have the given value (true or false) for their 'isTestBank' field.         :param int page: Result page that you want to retrieve.         :param int per_page: Maximum number of records per page. Can be at most 500. NOTE: Due to its validation and visualization, the swagger frontend might show very low performance, or even crashes, when a service responds with a lot of data. It is recommended to use a HTTP client like Postman or DHC instead of our swagger frontend for service calls with large page sizes.         :param list[str] order: Determines the order of the results. You can order the results by 'id', 'name', 'blz', 'bic' or 'popularity'. The default order for all services is 'id,asc'. You can also order by multiple properties. In that case the order of the parameters passed is important. Example: '/banks?order=name,desc&order=id,asc' will return banks ordered by 'name' (descending), where banks with the same 'name' are ordered by 'id' (ascending). The general format is: 'property[,asc|desc]', with 'asc' being the default value. Please note that ordering by multiple fields is not supported in our swagger frontend, but you can test this feature with any HTTP tool of your choice (e.g. postman or DHC).          :return: PageableBankList                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get and search all banks  # noqa: E501          Get and search banks from finAPI's database of banks. Must pass the authorized user's access_token, or your client's access_token. You can set optional search criteria to get only those banks that you are interested in. If you do not specify any search criteria, then this service functions as a 'get all' service.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_and_search_all_banks_with_http_info(async=True)         >>> result = thread.get()          :param async bool         :param list[int] ids: A comma-separated list of bank identifiers. If specified, then only banks whose identifier match any of the given identifiers will be regarded. The maximum number of identifiers is 1000.         :param str search: If specified, then only those banks will be contained in the result whose 'name', 'blz', 'bic' or 'city' contains the given search string (the matching works case-insensitive). If no banks contain the search string in any of the regarded fields, then the result will be an empty list. Note that you may also pass an IBAN in this field, in which case finAPI will try to find the related bank in its database and regard only this bank for the search. Also note: If the given search string consists of several terms (separated by whitespace), then ALL of these terms must apply to a bank in order for it to get included into the result.         :param bool is_supported: If specified, then only supported (in case of 'true' value) or unsupported (in case of 'false' value) banks will be regarded.         :param bool pins_are_volatile: If specified, then only those banks will be regarded that have the given value (true or false) for their 'pinsAreVolatile' field.         :param list[str] supported_data_sources: Comma-separated list of data sources. Possible values: WEB_SCRAPER,FINTS_SERVER. If this parameter is specified, then only those banks will be regarded in the search that support ALL of the given data sources. Note that this does NOT imply that those data sources must be the only data sources that are supported by a bank.         :param list[str] location: Comma-separated list of two-letter country codes (ISO 3166 ALPHA-2). If set, then only those banks will be regarded in the search that are located in the specified countries. Notes: Banks which do not have a location set (i.e. international institutes) will ALWAYS be regarded in the search, independent of what you specify for this field. When you pass a country code that doesn't exist in the ISO 3166 ALPHA-2 standard, then the service will respond with 400 BAD_REQUEST.         :param bool is_test_bank: If specified, then only those banks will be regarded that have the given value (true or false) for their 'isTestBank' field.         :param int page: Result page that you want to retrieve.         :param int per_page: Maximum number of records per page. Can be at most 500. NOTE: Due to its validation and visualization, the swagger frontend might show very low performance, or even crashes, when a service responds with a lot of data. It is recommended to use a HTTP client like Postman or DHC instead of our swagger frontend for service calls with large page sizes.         :param list[str] order: Determines the order of the results. You can order the results by 'id', 'name', 'blz', 'bic' or 'popularity'. The default order for all services is 'id,asc'. You can also order by multiple properties. In that case the order of the parameters passed is important. Example: '/banks?order=name,desc&order=id,asc' will return banks ordered by 'name' (descending), where banks with the same 'name' are ordered by 'id' (ascending). The general format is: 'property[,asc|desc]', with 'asc' being the default value. Please note that ordering by multiple fields is not supported in our swagger frontend, but you can test this feature with any HTTP tool of your choice (e.g. postman or DHC).          :return: PageableBankList                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get a bank  # noqa: E501          Get a single bank from finAPI's database of banks. You have to pass the bank's identifier, and either the authorized user's access_token, or your client's access token.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_bank(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: Identifier of requested bank (required)         :return: Bank                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get a bank  # noqa: E501          Get a single bank from finAPI's database of banks. You have to pass the bank's identifier, and either the authorized user's access_token, or your client's access token.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_bank_with_http_info(id, async=True)         >>> result = thread.get()          :param async bool         :param int id: Identifier of requested bank (required)         :return: Bank                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get multiple banks  # noqa: E501          Get a list of multiple banks from finAPI's database of banks. You have to pass a list of bank identifiers, and either the authorized user's access_token, or your client's access token. Note that banks whose identifiers do not exist will not be contained in the result (If this applies to all of the given identifiers, then the result will be an empty list).<br/><br/><b>WARNING</b>: This service is deprecated and will be removed at some point. If you want to get multiple banks, please instead use the service 'Get and search all banks' and pass a comma-separated list of identifiers with the parameter 'ids'.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_multiple_banks(ids, async=True)         >>> result = thread.get()          :param async bool         :param list[int] ids: Comma-separated list of identifiers of requested banks (required)         :return: BankList                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get multiple banks  # noqa: E501          Get a list of multiple banks from finAPI's database of banks. You have to pass a list of bank identifiers, and either the authorized user's access_token, or your client's access token. Note that banks whose identifiers do not exist will not be contained in the result (If this applies to all of the given identifiers, then the result will be an empty list).<br/><br/><b>WARNING</b>: This service is deprecated and will be removed at some point. If you want to get multiple banks, please instead use the service 'Get and search all banks' and pass a comma-separated list of identifiers with the parameter 'ids'.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async=True         >>> thread = api.get_multiple_banks_with_http_info(ids, async=True)         >>> result = thread.get()          :param async bool         :param list[int] ids: Comma-separated list of identifiers of requested banks (required)         :return: BankList                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'ids' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501