#!/usr/bin/env python
# coding: utf-8

"""
AccountintegrationApi.py
Copyright 2015 SmartBear Software

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
"""
from __future__ import absolute_import

# python 2 and python 3 compatibility library
from six import iteritems

from . import AbstractBaseApi


class AccountintegrationApi(AbstractBaseApi):

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

    def public_api_account_integration_list(
        self,
        content_type=None,
        **kwargs
    ):
        """
        Account Integration API
        Account Integration API
        :return: AccountIntegrationSerializer
        """
        all_params = [
        ]

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

        resource_path = '/api/v1/account_integration'.replace('{format}', 'json')
        method = 'GET'

        # path parameters
        allowed_params = [
        ]
        path_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        path_params = dict(path_param_items)
        # query parameters
        allowed_params = [
        ]
        query_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        query_params = dict(query_param_items)
        # headers
        allowed_params = [
        ]
        header_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        header_params = dict(header_param_items)
        # form parameters
        allowed_params = [
        ]
        form_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        form_params = dict(form_param_items)
        # files
        allowed_params = [
        ]
        file_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        files = dict(file_param_items)
        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept([])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        content_types = []
        if content_type is None or content_type not in content_types:
            content_type = self.api_client.select_header_content_type(content_types)
        header_params['Content-Type'] = content_type

        response = self.api_client.call_api(
            resource_path, method, path_params, query_params, header_params,
            body=body_params, post_params=form_params, files=files,
            response='AccountIntegrationSerializer')
        return response

    def public_api_account_integration_create(
        self,
        account_integration_type_id,
        integration_uid,
        account_id,
        content_type=None,
        **kwargs
    ):
        """
        Account Integration API
        Account Integration API
        :param str account_integration_type_id:(required)
        :param str integration_uid:(required)
        :param str account_id:(required)
        :return: AccountIntegrationSerializer
        """
        all_params = [
            'account_integration_type_id',
            'integration_uid',
            'account_id',
        ]

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

        resource_path = '/api/v1/account_integration'.replace('{format}', 'json')
        method = 'POST'

        # path parameters
        allowed_params = [
        ]
        path_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        path_params = dict(path_param_items)
        # query parameters
        allowed_params = [
        ]
        query_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        query_params = dict(query_param_items)
        # headers
        allowed_params = [
        ]
        header_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        header_params = dict(header_param_items)
        # form parameters
        allowed_params = [
            'account_integration_type_id',
            'integration_uid',
            'account_id',
        ]
        form_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        form_params = dict(form_param_items)
        # files
        allowed_params = [
        ]
        file_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        files = dict(file_param_items)
        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept([])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        content_types = []
        if content_type is None or content_type not in content_types:
            content_type = self.api_client.select_header_content_type(content_types)
        header_params['Content-Type'] = content_type

        response = self.api_client.call_api(
            resource_path, method, path_params, query_params, header_params,
            body=body_params, post_params=form_params, files=files,
            response='AccountIntegrationSerializer')
        return response

    def public_api_account_integration_retrieve(
        self,
        pk,
        content_type=None,
        **kwargs
    ):
        """
        Account Integration API
        Account Integration API
        :param str pk:(required)
        :return: AccountIntegrationSerializer
        """
        all_params = [
            'pk',
        ]

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

        resource_path = '/api/v1/account_integration/{pk}'.replace('{format}', 'json')
        method = 'GET'

        # path parameters
        allowed_params = [
            'pk',
        ]
        path_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        path_params = dict(path_param_items)
        # query parameters
        allowed_params = [
        ]
        query_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        query_params = dict(query_param_items)
        # headers
        allowed_params = [
        ]
        header_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        header_params = dict(header_param_items)
        # form parameters
        allowed_params = [
        ]
        form_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        form_params = dict(form_param_items)
        # files
        allowed_params = [
        ]
        file_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        files = dict(file_param_items)
        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept([])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        content_types = []
        if content_type is None or content_type not in content_types:
            content_type = self.api_client.select_header_content_type(content_types)
        header_params['Content-Type'] = content_type

        response = self.api_client.call_api(
            resource_path, method, path_params, query_params, header_params,
            body=body_params, post_params=form_params, files=files,
            response='AccountIntegrationSerializer')
        return response

    def public_api_account_integration_update(
        self,
        pk,
        account_integration_type_id,
        integration_uid,
        account_id,
        content_type=None,
        **kwargs
    ):
        """
        Account Integration API
        Account Integration API
        :param str pk:(required)
        :param str account_integration_type_id:(required)
        :param str integration_uid:(required)
        :param str account_id:(required)
        :return: AccountIntegrationSerializer
        """
        all_params = [
            'pk',
            'account_integration_type_id',
            'integration_uid',
            'account_id',
        ]

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

        resource_path = '/api/v1/account_integration/{pk}'.replace('{format}', 'json')
        method = 'PUT'

        # path parameters
        allowed_params = [
            'pk',
        ]
        path_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        path_params = dict(path_param_items)
        # query parameters
        allowed_params = [
        ]
        query_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        query_params = dict(query_param_items)
        # headers
        allowed_params = [
        ]
        header_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        header_params = dict(header_param_items)
        # form parameters
        allowed_params = [
            'account_integration_type_id',
            'integration_uid',
            'account_id',
        ]
        form_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        form_params = dict(form_param_items)
        # files
        allowed_params = [
        ]
        file_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        files = dict(file_param_items)
        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept([])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        content_types = []
        if content_type is None or content_type not in content_types:
            content_type = self.api_client.select_header_content_type(content_types)
        header_params['Content-Type'] = content_type

        response = self.api_client.call_api(
            resource_path, method, path_params, query_params, header_params,
            body=body_params, post_params=form_params, files=files,
            response='AccountIntegrationSerializer')
        return response

    def public_api_account_integration_destroy(
        self,
        pk,
        content_type=None,
        **kwargs
    ):
        """
        Account Integration API
        Account Integration API
        :param str pk:(required)
        :return: AccountIntegrationSerializer
        """
        all_params = [
            'pk',
        ]

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

        resource_path = '/api/v1/account_integration/{pk}'.replace('{format}', 'json')
        method = 'DELETE'

        # path parameters
        allowed_params = [
            'pk',
        ]
        path_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        path_params = dict(path_param_items)
        # query parameters
        allowed_params = [
        ]
        query_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        query_params = dict(query_param_items)
        # headers
        allowed_params = [
        ]
        header_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        header_params = dict(header_param_items)
        # form parameters
        allowed_params = [
        ]
        form_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        form_params = dict(form_param_items)
        # files
        allowed_params = [
        ]
        file_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        files = dict(file_param_items)
        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept([])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        content_types = []
        if content_type is None or content_type not in content_types:
            content_type = self.api_client.select_header_content_type(content_types)
        header_params['Content-Type'] = content_type

        response = self.api_client.call_api(
            resource_path, method, path_params, query_params, header_params,
            body=body_params, post_params=form_params, files=files,
            response='AccountIntegrationSerializer')
        return response

    def public_api_account_integration_partial_update(
        self,
        pk,
        content_type=None,
        **kwargs
    ):
        """
        Account Integration API
        Account Integration API
        :param str pk:(required)
        :param str account_integration_type_id:
        :param str integration_uid:
        :param str account_id:
        :return: AccountIntegrationSerializer
        """
        all_params = [
            'pk',
            'account_integration_type_id',
            'integration_uid',
            'account_id',
        ]

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

        resource_path = '/api/v1/account_integration/{pk}'.replace('{format}', 'json')
        method = 'PATCH'

        # path parameters
        allowed_params = [
            'pk',
        ]
        path_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        path_params = dict(path_param_items)
        # query parameters
        allowed_params = [
        ]
        query_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        query_params = dict(query_param_items)
        # headers
        allowed_params = [
        ]
        header_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        header_params = dict(header_param_items)
        # form parameters
        allowed_params = [
            'account_integration_type_id',
            'integration_uid',
            'account_id',
        ]
        form_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        form_params = dict(form_param_items)
        # files
        allowed_params = [
        ]
        file_param_items = [
            item
            for item in params.items() if item[0] in allowed_params
        ]
        files = dict(file_param_items)
        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept([])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        content_types = []
        if content_type is None or content_type not in content_types:
            content_type = self.api_client.select_header_content_type(content_types)
        header_params['Content-Type'] = content_type

        response = self.api_client.call_api(
            resource_path, method, path_params, query_params, header_params,
            body=body_params, post_params=form_params, files=files,
            response='AccountIntegrationSerializer')
        return response
