"""
    PocketSmith

    The public PocketSmith API  # noqa: E501

    The version of the OpenAPI document: 2.0+0.3.3
    Contact: <EMAIL>
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from pocketsmith.api_client import ApiClient, Endpoint as _Endpoint
from pocketsmith.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from pocketsmith.model.inline_object14 import InlineObject14
from pocketsmith.model.inline_object5 import InlineObject5
from pocketsmith.model.inline_response403 import InlineResponse403
from pocketsmith.model.institution import Institution


class InstitutionsApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.create_institution_endpoint = _Endpoint(
            settings={
                'response_type': (Institution,),
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/users/{id}/institutions',
                'operation_id': 'create_institution',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'inline_object14',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'inline_object14':
                        (InlineObject14,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                    'inline_object14': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.delete_institution_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/institutions/{id}',
                'operation_id': 'delete_institution',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.get_institution_endpoint = _Endpoint(
            settings={
                'response_type': (Institution,),
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/institutions/{id}',
                'operation_id': 'get_institution',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.list_institutions_endpoint = _Endpoint(
            settings={
                'response_type': ([Institution],),
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/users/{id}/institutions',
                'operation_id': 'list_institutions',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.update_institution_endpoint = _Endpoint(
            settings={
                'response_type': (Institution,),
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/institutions/{id}',
                'operation_id': 'update_institution',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'inline_object5',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'inline_object5':
                        (InlineObject5,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                    'inline_object5': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )

    def create_institution(
        self,
        id,
        **kwargs
    ):
        """Create institution in user  # noqa: E501

        Creates an institution belonging to a user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.create_institution(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the user

        Keyword Args:
            inline_object14 (InlineObject14): [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Institution
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.create_institution_endpoint.call_with_http_info(**kwargs)

    def delete_institution(
        self,
        id,
        **kwargs
    ):
        """Delete institution  # noqa: E501

        Deletes an institution and all data within. Alternatively, another institution can be provided to merge the data into to avoid losing it.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_institution(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the institution.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            None
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.delete_institution_endpoint.call_with_http_info(**kwargs)

    def get_institution(
        self,
        id,
        **kwargs
    ):
        """Get institution  # noqa: E501

        Gets an institution by its ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_institution(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the institution.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Institution
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.get_institution_endpoint.call_with_http_info(**kwargs)

    def list_institutions(
        self,
        id,
        **kwargs
    ):
        """List institutions in user  # noqa: E501

        Lists all the institutions belonging to the user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.list_institutions(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the user

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [Institution]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.list_institutions_endpoint.call_with_http_info(**kwargs)

    def update_institution(
        self,
        id,
        **kwargs
    ):
        """Update institution  # noqa: E501

        Updates the title and currency code for an institution.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.update_institution(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the institution.

        Keyword Args:
            inline_object5 (InlineObject5): [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Institution
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.update_institution_endpoint.call_with_http_info(**kwargs)


"""
    PocketSmith

    The public PocketSmith API  # noqa: E501

    The version of the OpenAPI document: 2.0+0.3.3
    Contact: <EMAIL>
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from pocketsmith.api_client import ApiClient, Endpoint as _Endpoint
from pocketsmith.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from pocketsmith.model.inline_object14 import InlineObject14
from pocketsmith.model.inline_object5 import InlineObject5
from pocketsmith.model.inline_response403 import InlineResponse403
from pocketsmith.model.institution import Institution


class InstitutionsApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.create_institution_endpoint = _Endpoint(
            settings={
                'response_type': (Institution,),
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/users/{id}/institutions',
                'operation_id': 'create_institution',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'inline_object14',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'inline_object14':
                        (InlineObject14,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                    'inline_object14': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.delete_institution_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/institutions/{id}',
                'operation_id': 'delete_institution',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.get_institution_endpoint = _Endpoint(
            settings={
                'response_type': (Institution,),
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/institutions/{id}',
                'operation_id': 'get_institution',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.list_institutions_endpoint = _Endpoint(
            settings={
                'response_type': ([Institution],),
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/users/{id}/institutions',
                'operation_id': 'list_institutions',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.update_institution_endpoint = _Endpoint(
            settings={
                'response_type': (Institution,),
                'auth': [
                    'developerKey'
                ],
                'endpoint_path': '/institutions/{id}',
                'operation_id': 'update_institution',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'inline_object5',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'inline_object5':
                        (InlineObject5,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                    'inline_object5': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )

    def create_institution(
        self,
        id,
        **kwargs
    ):
        """Create institution in user  # noqa: E501

        Creates an institution belonging to a user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.create_institution(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the user

        Keyword Args:
            inline_object14 (InlineObject14): [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Institution
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.create_institution_endpoint.call_with_http_info(**kwargs)

    def delete_institution(
        self,
        id,
        **kwargs
    ):
        """Delete institution  # noqa: E501

        Deletes an institution and all data within. Alternatively, another institution can be provided to merge the data into to avoid losing it.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_institution(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the institution.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            None
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.delete_institution_endpoint.call_with_http_info(**kwargs)

    def get_institution(
        self,
        id,
        **kwargs
    ):
        """Get institution  # noqa: E501

        Gets an institution by its ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_institution(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the institution.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Institution
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.get_institution_endpoint.call_with_http_info(**kwargs)

    def list_institutions(
        self,
        id,
        **kwargs
    ):
        """List institutions in user  # noqa: E501

        Lists all the institutions belonging to the user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.list_institutions(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the user

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [Institution]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.list_institutions_endpoint.call_with_http_info(**kwargs)

    def update_institution(
        self,
        id,
        **kwargs
    ):
        """Update institution  # noqa: E501

        Updates the title and currency code for an institution.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.update_institution(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): The unique identifier of the institution.

        Keyword Args:
            inline_object5 (InlineObject5): [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Institution
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.update_institution_endpoint.call_with_http_info(**kwargs)


PocketSmith      The public PocketSmith API  # noqa: E501      The version of the OpenAPI document: 2.0+0.3.3     Contact: <EMAIL>     Generated by: https://openapi-generator.tech # noqa: F401 # noqa: F401 # noqa: F401 NOTE: This class is auto generated by OpenAPI Generator     Ref: https://openapi-generator.tech      Do not edit the class manually. Create institution in user  # noqa: E501          Creates an institution belonging to a user.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.create_institution(id, async_req=True)         >>> result = thread.get()          Args:             id (int): The unique identifier of the user          Keyword Args:             inline_object14 (InlineObject14): [optional]             _return_http_data_only (bool): response data without head status                 code and headers. Default is True.             _preload_content (bool): if False, the urllib3.HTTPResponse object                 will be returned without reading/decoding response data.                 Default is True.             _request_timeout (int/float/tuple): timeout setting for this request. If                 one number provided, it will be total request timeout. It can also                 be a pair (tuple) of (connection, read) timeouts.                 Default is None.             _check_input_type (bool): specifies if type checking                 should be done one the data sent to the server.                 Default is True.             _check_return_type (bool): specifies if type checking                 should be done one the data received from the server.                 Default is True.             _host_index (int/None): specifies the index of the server                 that we want to use.                 Default is read from the configuration.             async_req (bool): execute request asynchronously          Returns:             Institution                 If the method is called asynchronously, returns the request                 thread. Delete institution  # noqa: E501          Deletes an institution and all data within. Alternatively, another institution can be provided to merge the data into to avoid losing it.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.delete_institution(id, async_req=True)         >>> result = thread.get()          Args:             id (int): The unique identifier of the institution.          Keyword Args:             _return_http_data_only (bool): response data without head status                 code and headers. Default is True.             _preload_content (bool): if False, the urllib3.HTTPResponse object                 will be returned without reading/decoding response data.                 Default is True.             _request_timeout (int/float/tuple): timeout setting for this request. If                 one number provided, it will be total request timeout. It can also                 be a pair (tuple) of (connection, read) timeouts.                 Default is None.             _check_input_type (bool): specifies if type checking                 should be done one the data sent to the server.                 Default is True.             _check_return_type (bool): specifies if type checking                 should be done one the data received from the server.                 Default is True.             _host_index (int/None): specifies the index of the server                 that we want to use.                 Default is read from the configuration.             async_req (bool): execute request asynchronously          Returns:             None                 If the method is called asynchronously, returns the request                 thread. Get institution  # noqa: E501          Gets an institution by its ID.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.get_institution(id, async_req=True)         >>> result = thread.get()          Args:             id (int): The unique identifier of the institution.          Keyword Args:             _return_http_data_only (bool): response data without head status                 code and headers. Default is True.             _preload_content (bool): if False, the urllib3.HTTPResponse object                 will be returned without reading/decoding response data.                 Default is True.             _request_timeout (int/float/tuple): timeout setting for this request. If                 one number provided, it will be total request timeout. It can also                 be a pair (tuple) of (connection, read) timeouts.                 Default is None.             _check_input_type (bool): specifies if type checking                 should be done one the data sent to the server.                 Default is True.             _check_return_type (bool): specifies if type checking                 should be done one the data received from the server.                 Default is True.             _host_index (int/None): specifies the index of the server                 that we want to use.                 Default is read from the configuration.             async_req (bool): execute request asynchronously          Returns:             Institution                 If the method is called asynchronously, returns the request                 thread. List institutions in user  # noqa: E501          Lists all the institutions belonging to the user.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.list_institutions(id, async_req=True)         >>> result = thread.get()          Args:             id (int): The unique identifier of the user          Keyword Args:             _return_http_data_only (bool): response data without head status                 code and headers. Default is True.             _preload_content (bool): if False, the urllib3.HTTPResponse object                 will be returned without reading/decoding response data.                 Default is True.             _request_timeout (int/float/tuple): timeout setting for this request. If                 one number provided, it will be total request timeout. It can also                 be a pair (tuple) of (connection, read) timeouts.                 Default is None.             _check_input_type (bool): specifies if type checking                 should be done one the data sent to the server.                 Default is True.             _check_return_type (bool): specifies if type checking                 should be done one the data received from the server.                 Default is True.             _host_index (int/None): specifies the index of the server                 that we want to use.                 Default is read from the configuration.             async_req (bool): execute request asynchronously          Returns:             [Institution]                 If the method is called asynchronously, returns the request                 thread. Update institution  # noqa: E501          Updates the title and currency code for an institution.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.update_institution(id, async_req=True)         >>> result = thread.get()          Args:             id (int): The unique identifier of the institution.          Keyword Args:             inline_object5 (InlineObject5): [optional]             _return_http_data_only (bool): response data without head status                 code and headers. Default is True.             _preload_content (bool): if False, the urllib3.HTTPResponse object                 will be returned without reading/decoding response data.                 Default is True.             _request_timeout (int/float/tuple): timeout setting for this request. If                 one number provided, it will be total request timeout. It can also                 be a pair (tuple) of (connection, read) timeouts.                 Default is None.             _check_input_type (bool): specifies if type checking                 should be done one the data sent to the server.                 Default is True.             _check_return_type (bool): specifies if type checking                 should be done one the data received from the server.                 Default is True.             _host_index (int/None): specifies the index of the server                 that we want to use.                 Default is read from the configuration.             async_req (bool): execute request asynchronously          Returns:             Institution                 If the method is called asynchronously, returns the request                 thread.