# coding: utf-8

"""
    vault/kernel/core_api/proto/v1/accounts/core_api_account_schedule_tags.proto

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

    OpenAPI spec version: version not set
    
    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 common.vault.oas.api_client import ApiClient


class CoreAPICustomersApi(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 batch_get_customers(self, ids, **kwargs):  # noqa: E501
        """Retrieves customers for the customer IDs provided.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.batch_get_customers(ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] ids: A list of the IDs of customers that are to be retrieved.  Required. Min length: 1 characters. (required)
        :return: CustomersBatchGetCustomersResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.batch_get_customers_with_http_info(ids, **kwargs)  # noqa: E501
        else:
            (data) = self.batch_get_customers_with_http_info(ids, **kwargs)  # noqa: E501
            return data

    def batch_get_customers_with_http_info(self, ids, **kwargs):  # noqa: E501
        """Retrieves customers for the customer IDs provided.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.batch_get_customers_with_http_info(ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] ids: A list of the IDs of customers that are to be retrieved.  Required. Min length: 1 characters. (required)
        :return: CustomersBatchGetCustomersResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'ids' in params:
            query_params.append(('ids', params['ids']))  # noqa: E501
            collection_formats['ids'] = 'multi'  # noqa: E501

        header_params = {}

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/customers:batchGet', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersBatchGetCustomersResponse',  # 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 create_customer(self, body, **kwargs):  # noqa: E501
        """Creates a new 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(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersCreateCustomerRequest body: (required)
        :return: CustomersCustomer
                 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_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_customer_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def create_customer_with_http_info(self, body, **kwargs):  # noqa: E501
        """Creates a new 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_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersCreateCustomerRequest body: (required)
        :return: CustomersCustomer
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/customers', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersCustomer',  # 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 create_customer_address(self, body, **kwargs):  # noqa: E501
        """Creates a customer address.  # 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_address(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersCreateCustomerAddressRequest body: (required)
        :return: CustomersCustomerAddress
                 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_address_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_customer_address_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def create_customer_address_with_http_info(self, body, **kwargs):  # noqa: E501
        """Creates a customer address.  # 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_address_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersCreateCustomerAddressRequest body: (required)
        :return: CustomersCustomerAddress
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/customer-addresses', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersCustomerAddress',  # 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(self, id, **kwargs):  # noqa: E501
        """Retrieves 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.get_customer(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: The unique ID of the customer. (required)
        :return: CustomersCustomer
                 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_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_customer_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_customer_with_http_info(self, id, **kwargs):  # noqa: E501
        """Retrieves 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.get_customer_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: The unique ID of the customer. (required)
        :return: CustomersCustomer
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1/customers/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersCustomer',  # 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 list_customer_addresses(self, customer_id, page_size, **kwargs):  # noqa: E501
        """Retrieves a customer address. This could retrieve no addresses, a single address or multiple addresses.  # 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_customer_addresses(customer_id, page_size, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str customer_id: The unique ID of the customer.  Required. (required)
        :param int page_size: The number of addresses to be retrieved.  Required. Min: 1. Max: 1000. (required)
        :param bool include_previous: Includes previous addresses for the customer. A previous address has an end_timestamp which is in the past. Optional; defaults to false.
        :param str page_token: Token of the page the results are to be retrieved from. If empty, returns the first page of results. Optional.
        :return: CustomersListCustomerAddressesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_customer_addresses_with_http_info(customer_id, page_size, **kwargs)  # noqa: E501
        else:
            (data) = self.list_customer_addresses_with_http_info(customer_id, page_size, **kwargs)  # noqa: E501
            return data

    def list_customer_addresses_with_http_info(self, customer_id, page_size, **kwargs):  # noqa: E501
        """Retrieves a customer address. This could retrieve no addresses, a single address or multiple addresses.  # 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_customer_addresses_with_http_info(customer_id, page_size, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str customer_id: The unique ID of the customer.  Required. (required)
        :param int page_size: The number of addresses to be retrieved.  Required. Min: 1. Max: 1000. (required)
        :param bool include_previous: Includes previous addresses for the customer. A previous address has an end_timestamp which is in the past. Optional; defaults to false.
        :param str page_token: Token of the page the results are to be retrieved from. If empty, returns the first page of results. Optional.
        :return: CustomersListCustomerAddressesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'customer_id' in params:
            query_params.append(('customer_id', params['customer_id']))  # noqa: E501
        if 'include_previous' in params:
            query_params.append(('include_previous', params['include_previous']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501
        if 'page_token' in params:
            query_params.append(('page_token', params['page_token']))  # noqa: E501

        header_params = {}

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/customer-addresses', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersListCustomerAddressesResponse',  # 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 list_customers(self, page_size, **kwargs):  # noqa: E501
        """Lists customers with pagination.  # 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_customers(page_size, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int page_size: Number of customers to be listed.  Required. Min: 1. Max: 200. (required)
        :param list[str] statuses: List of inclusive OR customer status filters. Optional.
        :param list[str] email_identifiers: List of inclusive OR email identifier filters. Must be URL encoded. Optional.
        :param list[str] phone_identifiers: List of inclusive OR phone number identifier filters. Must be URL encoded. Optional.
        :param list[str] username_identifiers: List of inclusive OR username identifier filters. Must be URL encoded. Optional.
        :param str page_token: Token of the page the results are to retrieved from. If empty, returns the first page of results. Optional.
        :return: CustomersListCustomersResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_customers_with_http_info(page_size, **kwargs)  # noqa: E501
        else:
            (data) = self.list_customers_with_http_info(page_size, **kwargs)  # noqa: E501
            return data

    def list_customers_with_http_info(self, page_size, **kwargs):  # noqa: E501
        """Lists customers with pagination.  # 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_customers_with_http_info(page_size, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int page_size: Number of customers to be listed.  Required. Min: 1. Max: 200. (required)
        :param list[str] statuses: List of inclusive OR customer status filters. Optional.
        :param list[str] email_identifiers: List of inclusive OR email identifier filters. Must be URL encoded. Optional.
        :param list[str] phone_identifiers: List of inclusive OR phone number identifier filters. Must be URL encoded. Optional.
        :param list[str] username_identifiers: List of inclusive OR username identifier filters. Must be URL encoded. Optional.
        :param str page_token: Token of the page the results are to retrieved from. If empty, returns the first page of results. Optional.
        :return: CustomersListCustomersResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'statuses' in params:
            query_params.append(('statuses', params['statuses']))  # noqa: E501
            collection_formats['statuses'] = 'multi'  # noqa: E501
        if 'email_identifiers' in params:
            query_params.append(('email_identifiers', params['email_identifiers']))  # noqa: E501
            collection_formats['email_identifiers'] = 'multi'  # noqa: E501
        if 'phone_identifiers' in params:
            query_params.append(('phone_identifiers', params['phone_identifiers']))  # noqa: E501
            collection_formats['phone_identifiers'] = 'multi'  # noqa: E501
        if 'username_identifiers' in params:
            query_params.append(('username_identifiers', params['username_identifiers']))  # noqa: E501
            collection_formats['username_identifiers'] = 'multi'  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501
        if 'page_token' in params:
            query_params.append(('page_token', params['page_token']))  # noqa: E501

        header_params = {}

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/customers', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersListCustomersResponse',  # 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(self, body, customer_id, **kwargs):  # noqa: E501
        """Used to update a customer's status and identifiers.  # 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(body, customer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersUpdateCustomerRequest body: (required)
        :param str customer_id: The unique ID of the customer. This must be a string representation of a positive 64-bit signed integer. (required)
        :return: CustomersCustomer
                 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_with_http_info(body, customer_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_customer_with_http_info(body, customer_id, **kwargs)  # noqa: E501
            return data

    def update_customer_with_http_info(self, body, customer_id, **kwargs):  # noqa: E501
        """Used to update a customer's status and identifiers.  # 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_with_http_info(body, customer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersUpdateCustomerRequest body: (required)
        :param str customer_id: The unique ID of the customer. This must be a string representation of a positive 64-bit signed integer. (required)
        :return: CustomersCustomer
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/customers/{customer.id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersCustomer',  # 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_additional_details(self, body, customer_id, **kwargs):  # noqa: E501
        """Updates additional details for 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_additional_details(body, customer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersUpdateCustomerAdditionalDetailsRequest body: (required)
        :param str customer_id: The unique ID of the customer. (required)
        :return: CustomersCustomer
                 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_additional_details_with_http_info(body, customer_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_customer_additional_details_with_http_info(body, customer_id, **kwargs)  # noqa: E501
            return data

    def update_customer_additional_details_with_http_info(self, body, customer_id, **kwargs):  # noqa: E501
        """Updates additional details for 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_additional_details_with_http_info(body, customer_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersUpdateCustomerAdditionalDetailsRequest body: (required)
        :param str customer_id: The unique ID of the customer. (required)
        :return: CustomersCustomer
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/customers/{customer_id}:updateAdditionalDetails', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersCustomer',  # 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_address(self, body, customer_address_id, **kwargs):  # noqa: E501
        """Updates a customer address.  # 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_address(body, customer_address_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersUpdateCustomerAddressRequest body: (required)
        :param str customer_address_id: The address ID. Output only. (required)
        :return: CustomersCustomerAddress
                 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_address_with_http_info(body, customer_address_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_customer_address_with_http_info(body, customer_address_id, **kwargs)  # noqa: E501
            return data

    def update_customer_address_with_http_info(self, body, customer_address_id, **kwargs):  # noqa: E501
        """Updates a customer address.  # 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_address_with_http_info(body, customer_address_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CustomersUpdateCustomerAddressRequest body: (required)
        :param str customer_address_id: The address ID. Output only. (required)
        :return: CustomersCustomerAddress
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/customer-addresses/{customer_address.id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustomersCustomerAddress',  # 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)
