# coding: utf-8

"""
    Hydrogen Proton API

    Financial engineering module of Hydrogen Atom  # noqa: E501

    OpenAPI spec version: 1.8.0
    Contact: info@hydrogenplatform.com
    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 proton_api.api_client import ApiClient


class PersonalFinancialManagementApi(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 budget_calculator(self, budget_calculator_request, **kwargs):  # noqa: E501
        """Budget Calculator  # noqa: E501

        Analyze spending against a defined budget  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.budget_calculator(budget_calculator_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param BudgetCalculatorRequest budget_calculator_request: Request payload for Budget Calculator (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.budget_calculator_with_http_info(budget_calculator_request, **kwargs)  # noqa: E501
        else:
            (data) = self.budget_calculator_with_http_info(budget_calculator_request, **kwargs)  # noqa: E501
            return data

    def budget_calculator_with_http_info(self, budget_calculator_request, **kwargs):  # noqa: E501
        """Budget Calculator  # noqa: E501

        Analyze spending against a defined budget  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.budget_calculator_with_http_info(budget_calculator_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param BudgetCalculatorRequest budget_calculator_request: Request payload for Budget Calculator (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['budget_calculator_request']  # noqa: E501
        all_params.append('async_req')
        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 budget_calculator" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'budget_calculator_request' is set
        if ('budget_calculator_request' not in params or
                params['budget_calculator_request'] is None):
            raise ValueError("Missing the required parameter `budget_calculator_request` when calling `budget_calculator`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'budget_calculator_request' in params:
            body_params = params['budget_calculator_request']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/budget_calculator', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='dict(str, object)',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _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 cash_flow_analysis(self, cash_flow_analysis_request, **kwargs):  # noqa: E501
        """Cash Flow Analysis  # noqa: E501

        Analyze income, expenses, and net income  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cash_flow_analysis(cash_flow_analysis_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CashFlowAnalysisRequest cash_flow_analysis_request: Request payload for Cash Flow Analysis (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.cash_flow_analysis_with_http_info(cash_flow_analysis_request, **kwargs)  # noqa: E501
        else:
            (data) = self.cash_flow_analysis_with_http_info(cash_flow_analysis_request, **kwargs)  # noqa: E501
            return data

    def cash_flow_analysis_with_http_info(self, cash_flow_analysis_request, **kwargs):  # noqa: E501
        """Cash Flow Analysis  # noqa: E501

        Analyze income, expenses, and net income  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cash_flow_analysis_with_http_info(cash_flow_analysis_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CashFlowAnalysisRequest cash_flow_analysis_request: Request payload for Cash Flow Analysis (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['cash_flow_analysis_request']  # noqa: E501
        all_params.append('async_req')
        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 cash_flow_analysis" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'cash_flow_analysis_request' is set
        if ('cash_flow_analysis_request' not in params or
                params['cash_flow_analysis_request'] is None):
            raise ValueError("Missing the required parameter `cash_flow_analysis_request` when calling `cash_flow_analysis`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'cash_flow_analysis_request' in params:
            body_params = params['cash_flow_analysis_request']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/cash_flow_analysis', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='dict(str, object)',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _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 fee_analysis(self, fee_analysis_request, **kwargs):  # noqa: E501
        """RFee Analysis  # noqa: E501

        Analyze fee data  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fee_analysis(fee_analysis_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FeeAnalysisRequest fee_analysis_request: Request payload for Fee Analysis (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.fee_analysis_with_http_info(fee_analysis_request, **kwargs)  # noqa: E501
        else:
            (data) = self.fee_analysis_with_http_info(fee_analysis_request, **kwargs)  # noqa: E501
            return data

    def fee_analysis_with_http_info(self, fee_analysis_request, **kwargs):  # noqa: E501
        """RFee Analysis  # noqa: E501

        Analyze fee data  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fee_analysis_with_http_info(fee_analysis_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FeeAnalysisRequest fee_analysis_request: Request payload for Fee Analysis (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['fee_analysis_request']  # noqa: E501
        all_params.append('async_req')
        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 fee_analysis" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'fee_analysis_request' is set
        if ('fee_analysis_request' not in params or
                params['fee_analysis_request'] is None):
            raise ValueError("Missing the required parameter `fee_analysis_request` when calling `fee_analysis`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'fee_analysis_request' in params:
            body_params = params['fee_analysis_request']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/fee_analysis', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='dict(str, object)',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _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 financial_picture(self, financial_picture_request, **kwargs):  # noqa: E501
        """Financial Picture  # noqa: E501

        Assess assets, liabilities, and net worth  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.financial_picture(financial_picture_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FinancialPictureRequest financial_picture_request: Request payload for Financial Picture (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.financial_picture_with_http_info(financial_picture_request, **kwargs)  # noqa: E501
        else:
            (data) = self.financial_picture_with_http_info(financial_picture_request, **kwargs)  # noqa: E501
            return data

    def financial_picture_with_http_info(self, financial_picture_request, **kwargs):  # noqa: E501
        """Financial Picture  # noqa: E501

        Assess assets, liabilities, and net worth  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.financial_picture_with_http_info(financial_picture_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FinancialPictureRequest financial_picture_request: Request payload for Financial Picture (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['financial_picture_request']  # noqa: E501
        all_params.append('async_req')
        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 financial_picture" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'financial_picture_request' is set
        if ('financial_picture_request' not in params or
                params['financial_picture_request'] is None):
            raise ValueError("Missing the required parameter `financial_picture_request` when calling `financial_picture`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'financial_picture_request' in params:
            body_params = params['financial_picture_request']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/financial_picture', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='dict(str, object)',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _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 recurring_transaction_analysis(self, recurring_transaction_analysis_request, **kwargs):  # noqa: E501
        """Recurring Transaction Analysis  # noqa: E501

        Analyze recurring transactions  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.recurring_transaction_analysis(recurring_transaction_analysis_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RecurringTransactionAnalysisRequest recurring_transaction_analysis_request: Request payload for Recurring Transaction Analysis (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.recurring_transaction_analysis_with_http_info(recurring_transaction_analysis_request, **kwargs)  # noqa: E501
        else:
            (data) = self.recurring_transaction_analysis_with_http_info(recurring_transaction_analysis_request, **kwargs)  # noqa: E501
            return data

    def recurring_transaction_analysis_with_http_info(self, recurring_transaction_analysis_request, **kwargs):  # noqa: E501
        """Recurring Transaction Analysis  # noqa: E501

        Analyze recurring transactions  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.recurring_transaction_analysis_with_http_info(recurring_transaction_analysis_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RecurringTransactionAnalysisRequest recurring_transaction_analysis_request: Request payload for Recurring Transaction Analysis (required)
        :return: dict(str, object)
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['recurring_transaction_analysis_request']  # noqa: E501
        all_params.append('async_req')
        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 recurring_transaction_analysis" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'recurring_transaction_analysis_request' is set
        if ('recurring_transaction_analysis_request' not in params or
                params['recurring_transaction_analysis_request'] is None):
            raise ValueError("Missing the required parameter `recurring_transaction_analysis_request` when calling `recurring_transaction_analysis`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'recurring_transaction_analysis_request' in params:
            body_params = params['recurring_transaction_analysis_request']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2']  # noqa: E501

        return self.api_client.call_api(
            '/recurring_transaction_analysis', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='dict(str, object)',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _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)
