# coding: utf-8

"""
    Mauve Admin API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0.12
    
    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 mauve_client.api_client import ApiClient


class CustomersApi(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 create_customer_request_post(self, accept, **kwargs):  # noqa: E501
        """Create a customer.  # noqa: E501

        Create a customer.  # 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_customer_request_post(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str salutation:
        :param str title:
        :param str first_name:
        :param str last_name:
        :param str company:
        :param str company2:
        :param datetime birthday:
        :param str email:
        :param str phone:
        :param str username:
        :param str password_hash:
        :param str street:
        :param str house_no:
        :param str postal_code:
        :param str city:
        :param str district:
        :param str country_code:
        :param str additional_addressinformation:
        :param str comment:
        :param str customer_group:
        :param bool inactive:
        :return: CreateCustomerResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_customer_request_post_with_http_info(accept, **kwargs)  # noqa: E501
        else:
            (data) = self.create_customer_request_post_with_http_info(accept, **kwargs)  # noqa: E501
            return data

    def create_customer_request_post_with_http_info(self, accept, **kwargs):  # noqa: E501
        """Create a customer.  # noqa: E501

        Create a customer.  # 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_customer_request_post_with_http_info(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str salutation:
        :param str title:
        :param str first_name:
        :param str last_name:
        :param str company:
        :param str company2:
        :param datetime birthday:
        :param str email:
        :param str phone:
        :param str username:
        :param str password_hash:
        :param str street:
        :param str house_no:
        :param str postal_code:
        :param str city:
        :param str district:
        :param str country_code:
        :param str additional_addressinformation:
        :param str comment:
        :param str customer_group:
        :param bool inactive:
        :return: CreateCustomerResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['accept', 'salutation', 'title', 'first_name', 'last_name', 'company', 'company2', 'birthday', 'email', 'phone', 'username', 'password_hash', 'street', 'house_no', 'postal_code', 'city', 'district', 'country_code', 'additional_addressinformation', 'comment', 'customer_group', 'inactive']  # 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 create_customer_request_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'accept' is set
        if ('accept' not in params or
                params['accept'] is None):
            raise ValueError("Missing the required parameter `accept` when calling `create_customer_request_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}
        if 'salutation' in params:
            form_params.append(('Salutation', params['salutation']))  # noqa: E501
        if 'title' in params:
            form_params.append(('Title', params['title']))  # noqa: E501
        if 'first_name' in params:
            form_params.append(('FirstName', params['first_name']))  # noqa: E501
        if 'last_name' in params:
            form_params.append(('LastName', params['last_name']))  # noqa: E501
        if 'company' in params:
            form_params.append(('Company', params['company']))  # noqa: E501
        if 'company2' in params:
            form_params.append(('Company2', params['company2']))  # noqa: E501
        if 'birthday' in params:
            form_params.append(('Birthday', params['birthday']))  # noqa: E501
        if 'email' in params:
            form_params.append(('Email', params['email']))  # noqa: E501
        if 'phone' in params:
            form_params.append(('Phone', params['phone']))  # noqa: E501
        if 'username' in params:
            form_params.append(('Username', params['username']))  # noqa: E501
        if 'password_hash' in params:
            form_params.append(('PasswordHash', params['password_hash']))  # noqa: E501
        if 'street' in params:
            form_params.append(('Street', params['street']))  # noqa: E501
        if 'house_no' in params:
            form_params.append(('HouseNo', params['house_no']))  # noqa: E501
        if 'postal_code' in params:
            form_params.append(('PostalCode', params['postal_code']))  # noqa: E501
        if 'city' in params:
            form_params.append(('City', params['city']))  # noqa: E501
        if 'district' in params:
            form_params.append(('District', params['district']))  # noqa: E501
        if 'country_code' in params:
            form_params.append(('CountryCode', params['country_code']))  # noqa: E501
        if 'additional_addressinformation' in params:
            form_params.append(('AdditionalAddressinformation', params['additional_addressinformation']))  # noqa: E501
        if 'comment' in params:
            form_params.append(('Comment', params['comment']))  # noqa: E501
        if 'customer_group' in params:
            form_params.append(('CustomerGroup', params['customer_group']))  # noqa: E501
        if 'inactive' in params:
            form_params.append(('Inactive', params['inactive']))  # noqa: E501

        body_params = None
        # 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/x-www-form-urlencoded'])  # noqa: E501

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

        return self.api_client.call_api(
            '/customers/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateCustomerResponse',  # 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 delete_customer_request_customer_number_delete(self, accept, customer_number, **kwargs):  # noqa: E501
        """Delete a specific customer.  # noqa: E501

        Delete a specific customer.  # 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_customer_request_customer_number_delete(accept, customer_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str customer_number: Alphanumerical unique identifier of a customer (always end with \"-K\") (in german: Kunden-Nr.) (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_customer_request_customer_number_delete_with_http_info(accept, customer_number, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_customer_request_customer_number_delete_with_http_info(accept, customer_number, **kwargs)  # noqa: E501
            return data

    def delete_customer_request_customer_number_delete_with_http_info(self, accept, customer_number, **kwargs):  # noqa: E501
        """Delete a specific customer.  # noqa: E501

        Delete a specific customer.  # 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_customer_request_customer_number_delete_with_http_info(accept, customer_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str customer_number: Alphanumerical unique identifier of a customer (always end with \"-K\") (in german: Kunden-Nr.) (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        return self.api_client.call_api(
            '/customers/{CustomerNumber}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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 get_customer_request_customer_number_get(self, accept, customer_number, **kwargs):  # noqa: E501
        """Retrieve a specific customer.  # noqa: E501

        Retrieve a specific customer.  # 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_customer_request_customer_number_get(accept, customer_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str customer_number: Alphanumerical unique identifier of a customer (always end with \"-K\") (in german: Kunden-Nr.) (required)
        :param str include: Return additional data specified by a comma-separated list of values (current possible values: \"additional_addresses\", \"extended_address_information\").
        :return: GetCustomerResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_customer_request_customer_number_get_with_http_info(accept, customer_number, **kwargs)  # noqa: E501
        else:
            (data) = self.get_customer_request_customer_number_get_with_http_info(accept, customer_number, **kwargs)  # noqa: E501
            return data

    def get_customer_request_customer_number_get_with_http_info(self, accept, customer_number, **kwargs):  # noqa: E501
        """Retrieve a specific customer.  # noqa: E501

        Retrieve a specific customer.  # 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_customer_request_customer_number_get_with_http_info(accept, customer_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str customer_number: Alphanumerical unique identifier of a customer (always end with \"-K\") (in german: Kunden-Nr.) (required)
        :param str include: Return additional data specified by a comma-separated list of values (current possible values: \"additional_addresses\", \"extended_address_information\").
        :return: GetCustomerResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []
        if 'include' in params:
            query_params.append(('Include', params['include']))  # noqa: E501

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/customers/{CustomerNumber}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetCustomerResponse',  # 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 search_customers_request_get(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of customers.  # noqa: E501

        Retrieve a list of customers.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_customers_request_get(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str email: Return only customers with this primary email address
        :param str include: Return additional data specified by a comma-separated list of values (current possible values: \"additional_addresses\", \"extended_address_information\").
        :param int offset: The (zero-based) offset of the first item in the collection to return (default: 0)
        :param int limit: The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used. (default: 1000, maximum: 1000)
        :return: SearchCustomersResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_customers_request_get_with_http_info(accept, **kwargs)  # noqa: E501
        else:
            (data) = self.search_customers_request_get_with_http_info(accept, **kwargs)  # noqa: E501
            return data

    def search_customers_request_get_with_http_info(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of customers.  # noqa: E501

        Retrieve a list of customers.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_customers_request_get_with_http_info(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str email: Return only customers with this primary email address
        :param str include: Return additional data specified by a comma-separated list of values (current possible values: \"additional_addresses\", \"extended_address_information\").
        :param int offset: The (zero-based) offset of the first item in the collection to return (default: 0)
        :param int limit: The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used. (default: 1000, maximum: 1000)
        :return: SearchCustomersResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['accept', 'email', 'include', 'offset', 'limit']  # 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 search_customers_request_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'accept' is set
        if ('accept' not in params or
                params['accept'] is None):
            raise ValueError("Missing the required parameter `accept` when calling `search_customers_request_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'email' in params:
            query_params.append(('Email', params['email']))  # noqa: E501
        if 'include' in params:
            query_params.append(('Include', params['include']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('Offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('Limit', params['limit']))  # noqa: E501

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/customers/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchCustomersResponse',  # 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 update_customer_request_customer_number_update(self, accept, customer_number, **kwargs):  # noqa: E501
        """Update a customer.  # noqa: E501

        Update a customer.  # 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_customer_request_customer_number_update(accept, customer_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str customer_number: Alphanumerical unique identifier of a customer (always end with \"-K\") (in german: Kunden-Nr.) (required)
        :param UpdateCustomerRequest body:
        :param str customer_group: The name of the customer group (needs to be a valid entry from the corresponding reference list) (if not provided the default customer group is taken)
        :param str salutation: The salutation (needs to be a valid entry from the corresponding reference list) (if not provided the default salutation is taken)
        :param str title: The title (e.g. Doctor etc
        :param str first_name: The firstname
        :param str last_name: The lastname
        :param str company: The company name
        :param str company2: The secondary company name
        :param datetime birthday: The birthday
        :param str email: The primary email address
        :param str phone: The primary telephone number
        :param str username: The username for the shop account
        :param str password_hash: The password hash for the shop account
        :param str street: The street name of the customers primary address
        :param str house_no: The alphanumeric house number of the customers primary address
        :param str postal_code: The alphanumeric postal code of the customers primary address
        :param str city: The city of the customers primary address
        :param str district: The district of the customers primary address
        :param str country_code: The country code (ISO 3166-2) of the customers primary address (e.g. DE, CH)
        :param str additional_addressinformation: Additional address information of the customers primary address
        :param str comment: An optional customer comment
        :param bool inactive: Indicates whether the customer is marked as inactive
        :return: UpdateCustomerResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_customer_request_customer_number_update_with_http_info(accept, customer_number, **kwargs)  # noqa: E501
        else:
            (data) = self.update_customer_request_customer_number_update_with_http_info(accept, customer_number, **kwargs)  # noqa: E501
            return data

    def update_customer_request_customer_number_update_with_http_info(self, accept, customer_number, **kwargs):  # noqa: E501
        """Update a customer.  # noqa: E501

        Update a customer.  # 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_customer_request_customer_number_update_with_http_info(accept, customer_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str customer_number: Alphanumerical unique identifier of a customer (always end with \"-K\") (in german: Kunden-Nr.) (required)
        :param UpdateCustomerRequest body:
        :param str customer_group: The name of the customer group (needs to be a valid entry from the corresponding reference list) (if not provided the default customer group is taken)
        :param str salutation: The salutation (needs to be a valid entry from the corresponding reference list) (if not provided the default salutation is taken)
        :param str title: The title (e.g. Doctor etc
        :param str first_name: The firstname
        :param str last_name: The lastname
        :param str company: The company name
        :param str company2: The secondary company name
        :param datetime birthday: The birthday
        :param str email: The primary email address
        :param str phone: The primary telephone number
        :param str username: The username for the shop account
        :param str password_hash: The password hash for the shop account
        :param str street: The street name of the customers primary address
        :param str house_no: The alphanumeric house number of the customers primary address
        :param str postal_code: The alphanumeric postal code of the customers primary address
        :param str city: The city of the customers primary address
        :param str district: The district of the customers primary address
        :param str country_code: The country code (ISO 3166-2) of the customers primary address (e.g. DE, CH)
        :param str additional_addressinformation: Additional address information of the customers primary address
        :param str comment: An optional customer comment
        :param bool inactive: Indicates whether the customer is marked as inactive
        :return: UpdateCustomerResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['accept', 'customer_number', 'body', 'customer_group', 'salutation', 'title', 'first_name', 'last_name', 'company', 'company2', 'birthday', 'email', 'phone', 'username', 'password_hash', 'street', 'house_no', 'postal_code', 'city', 'district', 'country_code', 'additional_addressinformation', 'comment', 'inactive']  # 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 update_customer_request_customer_number_update" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'accept' is set
        if ('accept' not in params or
                params['accept'] is None):
            raise ValueError("Missing the required parameter `accept` when calling `update_customer_request_customer_number_update`")  # noqa: E501
        # verify the required parameter 'customer_number' is set
        if ('customer_number' not in params or
                params['customer_number'] is None):
            raise ValueError("Missing the required parameter `customer_number` when calling `update_customer_request_customer_number_update`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'customer_group' in params:
            query_params.append(('CustomerGroup', params['customer_group']))  # noqa: E501
        if 'salutation' in params:
            query_params.append(('Salutation', params['salutation']))  # noqa: E501
        if 'title' in params:
            query_params.append(('Title', params['title']))  # noqa: E501
        if 'first_name' in params:
            query_params.append(('FirstName', params['first_name']))  # noqa: E501
        if 'last_name' in params:
            query_params.append(('LastName', params['last_name']))  # noqa: E501
        if 'company' in params:
            query_params.append(('Company', params['company']))  # noqa: E501
        if 'company2' in params:
            query_params.append(('Company2', params['company2']))  # noqa: E501
        if 'birthday' in params:
            query_params.append(('Birthday', params['birthday']))  # noqa: E501
        if 'email' in params:
            query_params.append(('Email', params['email']))  # noqa: E501
        if 'phone' in params:
            query_params.append(('Phone', params['phone']))  # noqa: E501
        if 'username' in params:
            query_params.append(('Username', params['username']))  # noqa: E501
        if 'password_hash' in params:
            query_params.append(('PasswordHash', params['password_hash']))  # noqa: E501
        if 'street' in params:
            query_params.append(('Street', params['street']))  # noqa: E501
        if 'house_no' in params:
            query_params.append(('HouseNo', params['house_no']))  # noqa: E501
        if 'postal_code' in params:
            query_params.append(('PostalCode', params['postal_code']))  # noqa: E501
        if 'city' in params:
            query_params.append(('City', params['city']))  # noqa: E501
        if 'district' in params:
            query_params.append(('District', params['district']))  # noqa: E501
        if 'country_code' in params:
            query_params.append(('CountryCode', params['country_code']))  # noqa: E501
        if 'additional_addressinformation' in params:
            query_params.append(('AdditionalAddressinformation', params['additional_addressinformation']))  # noqa: E501
        if 'comment' in params:
            query_params.append(('Comment', params['comment']))  # noqa: E501
        if 'inactive' in params:
            query_params.append(('Inactive', params['inactive']))  # noqa: E501

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/customers/{CustomerNumber}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UpdateCustomerResponse',  # 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)
