# coding: utf-8

"""
    Marqeta Core API

    Simplified management of your payment programs  # noqa: E501

    The version of the OpenAPI document: 3.0.0
    Contact: dev@swadesh.co
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


import re  # noqa: F401

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictInt, StrictStr

from typing import Optional

from marqeta_client.models.business_card_holder_list_response import BusinessCardHolderListResponse
from marqeta_client.models.business_card_holder_response import BusinessCardHolderResponse
from marqeta_client.models.business_card_holder_update import BusinessCardHolderUpdate
from marqeta_client.models.business_cardholder import BusinessCardholder
from marqeta_client.models.business_user_card_holder_list_response import BusinessUserCardHolderListResponse
from marqeta_client.models.card_holder_note_list_response import CardHolderNoteListResponse
from marqeta_client.models.cardholder_note_request_model import CardholderNoteRequestModel
from marqeta_client.models.cardholder_note_response_model import CardholderNoteResponseModel
from marqeta_client.models.cardholder_note_update_request_model import CardholderNoteUpdateRequestModel
from marqeta_client.models.dda_request import DDARequest
from marqeta_client.models.ssn_response_model import SsnResponseModel

from marqeta_client.api_client import ApiClient
from marqeta_client.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


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

    Do not edit the class manually.
    """

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

    @validate_arguments
    def get_businesses(self, count : Annotated[Optional[StrictInt], Field(description="Number of users to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, business_name_dba : Annotated[Optional[StrictStr], Field(description="Business name DBA")] = None, business_name_legal : Annotated[Optional[StrictStr], Field(description="Business name legal")] = None, search_type : Annotated[Optional[StrictStr], Field(description="Search type")] = None, fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, **kwargs) -> BusinessCardHolderListResponse:  # noqa: E501
        """Lists all businesses  # 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_businesses(count, start_index, business_name_dba, business_name_legal, search_type, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param count: Number of users to retrieve
        :type count: int
        :param start_index: Start index
        :type start_index: int
        :param business_name_dba: Business name DBA
        :type business_name_dba: str
        :param business_name_legal: Business name legal
        :type business_name_legal: str
        :param search_type: Search type
        :type search_type: str
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param sort_by: Sort order
        :type sort_by: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BusinessCardHolderListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_businesses_with_http_info(count, start_index, business_name_dba, business_name_legal, search_type, fields, sort_by, **kwargs)  # noqa: E501

    @validate_arguments
    def get_businesses_with_http_info(self, count : Annotated[Optional[StrictInt], Field(description="Number of users to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, business_name_dba : Annotated[Optional[StrictStr], Field(description="Business name DBA")] = None, business_name_legal : Annotated[Optional[StrictStr], Field(description="Business name legal")] = None, search_type : Annotated[Optional[StrictStr], Field(description="Search type")] = None, fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, **kwargs):  # noqa: E501
        """Lists all businesses  # 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_businesses_with_http_info(count, start_index, business_name_dba, business_name_legal, search_type, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param count: Number of users to retrieve
        :type count: int
        :param start_index: Start index
        :type start_index: int
        :param business_name_dba: Business name DBA
        :type business_name_dba: str
        :param business_name_legal: Business name legal
        :type business_name_legal: str
        :param search_type: Search type
        :type search_type: str
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param sort_by: Sort order
        :type sort_by: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BusinessCardHolderListResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'count',
            'start_index',
            'business_name_dba',
            'business_name_legal',
            'search_type',
            'fields',
            'sort_by'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_businesses" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        if _params.get('count') is not None:  # noqa: E501
            _query_params.append(('count', _params['count']))

        if _params.get('start_index') is not None:  # noqa: E501
            _query_params.append(('start_index', _params['start_index']))

        if _params.get('business_name_dba') is not None:  # noqa: E501
            _query_params.append(('business_name_dba', _params['business_name_dba']))

        if _params.get('business_name_legal') is not None:  # noqa: E501
            _query_params.append(('business_name_legal', _params['business_name_legal']))

        if _params.get('search_type') is not None:  # noqa: E501
            _query_params.append(('search_type', _params['search_type']))

        if _params.get('fields') is not None:  # noqa: E501
            _query_params.append(('fields', _params['fields']))

        if _params.get('sort_by') is not None:  # noqa: E501
            _query_params.append(('sort_by', _params['sort_by']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "BusinessCardHolderListResponse",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def get_businesses_parenttoken_children(self, parent_token : Annotated[StrictStr, Field(..., description="Token of parent business")], count : Annotated[Optional[StrictInt], Field(description="Number of users to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, **kwargs) -> BusinessUserCardHolderListResponse:  # noqa: E501
        """Lists all children of a parent business  # 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_businesses_parenttoken_children(parent_token, count, start_index, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param parent_token: Token of parent business (required)
        :type parent_token: str
        :param count: Number of users to retrieve
        :type count: int
        :param start_index: Start index
        :type start_index: int
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param sort_by: Sort order
        :type sort_by: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BusinessUserCardHolderListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_businesses_parenttoken_children_with_http_info(parent_token, count, start_index, fields, sort_by, **kwargs)  # noqa: E501

    @validate_arguments
    def get_businesses_parenttoken_children_with_http_info(self, parent_token : Annotated[StrictStr, Field(..., description="Token of parent business")], count : Annotated[Optional[StrictInt], Field(description="Number of users to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, **kwargs):  # noqa: E501
        """Lists all children of a parent business  # 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_businesses_parenttoken_children_with_http_info(parent_token, count, start_index, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param parent_token: Token of parent business (required)
        :type parent_token: str
        :param count: Number of users to retrieve
        :type count: int
        :param start_index: Start index
        :type start_index: int
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param sort_by: Sort order
        :type sort_by: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BusinessUserCardHolderListResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'parent_token',
            'count',
            'start_index',
            'fields',
            'sort_by'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_businesses_parenttoken_children" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['parent_token']:
            _path_params['parent_token'] = _params['parent_token']


        # process the query parameters
        _query_params = []
        if _params.get('count') is not None:  # noqa: E501
            _query_params.append(('count', _params['count']))

        if _params.get('start_index') is not None:  # noqa: E501
            _query_params.append(('start_index', _params['start_index']))

        if _params.get('fields') is not None:  # noqa: E501
            _query_params.append(('fields', _params['fields']))

        if _params.get('sort_by') is not None:  # noqa: E501
            _query_params.append(('sort_by', _params['sort_by']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "BusinessUserCardHolderListResponse",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses/{parent_token}/children', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def get_businesses_token(self, token : Annotated[StrictStr, Field(..., description="Business token")], fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, **kwargs) -> BusinessCardHolderResponse:  # noqa: E501
        """Returns a specific business  # 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_businesses_token(token, fields, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BusinessCardHolderResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_businesses_token_with_http_info(token, fields, **kwargs)  # noqa: E501

    @validate_arguments
    def get_businesses_token_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Business token")], fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, **kwargs):  # noqa: E501
        """Returns a specific business  # 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_businesses_token_with_http_info(token, fields, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BusinessCardHolderResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token',
            'fields'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_businesses_token" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['token']:
            _path_params['token'] = _params['token']


        # process the query parameters
        _query_params = []
        if _params.get('fields') is not None:  # noqa: E501
            _query_params.append(('fields', _params['fields']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "BusinessCardHolderResponse",
            '400': None,
            '404': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses/{token}', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def get_businesses_token_notes(self, token : Annotated[StrictStr, Field(..., description="Business token")], start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, count : Annotated[Optional[StrictInt], Field(description="Number of notes to retrieve")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Created by")] = None, created_by_user_role : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of created by user roles")] = None, include_private : Annotated[Optional[StrictBool], Field(description="Include private notes and private fields in note response")] = None, search_type : Annotated[Optional[StrictStr], Field(description="Search type")] = None, fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, **kwargs) -> CardHolderNoteListResponse:  # noqa: E501
        """Lists business notes  # 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_businesses_token_notes(token, start_index, count, created_by, created_by_user_role, include_private, search_type, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param start_index: Start index
        :type start_index: int
        :param count: Number of notes to retrieve
        :type count: int
        :param created_by: Created by
        :type created_by: str
        :param created_by_user_role: Comma-delimited list of created by user roles
        :type created_by_user_role: str
        :param include_private: Include private notes and private fields in note response
        :type include_private: bool
        :param search_type: Search type
        :type search_type: str
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param sort_by: Sort order
        :type sort_by: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: CardHolderNoteListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_businesses_token_notes_with_http_info(token, start_index, count, created_by, created_by_user_role, include_private, search_type, fields, sort_by, **kwargs)  # noqa: E501

    @validate_arguments
    def get_businesses_token_notes_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Business token")], start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, count : Annotated[Optional[StrictInt], Field(description="Number of notes to retrieve")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Created by")] = None, created_by_user_role : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of created by user roles")] = None, include_private : Annotated[Optional[StrictBool], Field(description="Include private notes and private fields in note response")] = None, search_type : Annotated[Optional[StrictStr], Field(description="Search type")] = None, fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, **kwargs):  # noqa: E501
        """Lists business notes  # 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_businesses_token_notes_with_http_info(token, start_index, count, created_by, created_by_user_role, include_private, search_type, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param start_index: Start index
        :type start_index: int
        :param count: Number of notes to retrieve
        :type count: int
        :param created_by: Created by
        :type created_by: str
        :param created_by_user_role: Comma-delimited list of created by user roles
        :type created_by_user_role: str
        :param include_private: Include private notes and private fields in note response
        :type include_private: bool
        :param search_type: Search type
        :type search_type: str
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param sort_by: Sort order
        :type sort_by: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(CardHolderNoteListResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token',
            'start_index',
            'count',
            'created_by',
            'created_by_user_role',
            'include_private',
            'search_type',
            'fields',
            'sort_by'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_businesses_token_notes" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['token']:
            _path_params['token'] = _params['token']


        # process the query parameters
        _query_params = []
        if _params.get('start_index') is not None:  # noqa: E501
            _query_params.append(('start_index', _params['start_index']))

        if _params.get('count') is not None:  # noqa: E501
            _query_params.append(('count', _params['count']))

        if _params.get('created_by') is not None:  # noqa: E501
            _query_params.append(('created_by', _params['created_by']))

        if _params.get('created_by_user_role') is not None:  # noqa: E501
            _query_params.append(('created_by_user_role', _params['created_by_user_role']))

        if _params.get('include_private') is not None:  # noqa: E501
            _query_params.append(('include_private', _params['include_private']))

        if _params.get('search_type') is not None:  # noqa: E501
            _query_params.append(('search_type', _params['search_type']))

        if _params.get('fields') is not None:  # noqa: E501
            _query_params.append(('fields', _params['fields']))

        if _params.get('sort_by') is not None:  # noqa: E501
            _query_params.append(('sort_by', _params['sort_by']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "CardHolderNoteListResponse",
            '400': None,
            '401': None,
            '403': None,
            '404': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses/{token}/notes', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def get_businesses_token_ssn(self, token : Annotated[StrictStr, Field(..., description="Business token")], full_ssn : Optional[StrictBool] = None, **kwargs) -> SsnResponseModel:  # noqa: E501
        """Returns a specific business proprietor's SSN  # 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_businesses_token_ssn(token, full_ssn, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param full_ssn:
        :type full_ssn: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: SsnResponseModel
        """
        kwargs['_return_http_data_only'] = True
        return self.get_businesses_token_ssn_with_http_info(token, full_ssn, **kwargs)  # noqa: E501

    @validate_arguments
    def get_businesses_token_ssn_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Business token")], full_ssn : Optional[StrictBool] = None, **kwargs):  # noqa: E501
        """Returns a specific business proprietor's SSN  # 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_businesses_token_ssn_with_http_info(token, full_ssn, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param full_ssn:
        :type full_ssn: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(SsnResponseModel, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token',
            'full_ssn'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_businesses_token_ssn" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['token']:
            _path_params['token'] = _params['token']


        # process the query parameters
        _query_params = []
        if _params.get('full_ssn') is not None:  # noqa: E501
            _query_params.append(('full_ssn', _params['full_ssn']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "SsnResponseModel",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses/{token}/ssn', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def post_businesses(self, body : Optional[BusinessCardholder] = None, **kwargs) -> BusinessCardHolderResponse:  # noqa: E501
        """Creates a business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.post_businesses(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: BusinessCardholder
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BusinessCardHolderResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.post_businesses_with_http_info(body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_businesses_with_http_info(self, body : Optional[BusinessCardholder] = None, **kwargs):  # noqa: E501
        """Creates a business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.post_businesses_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: BusinessCardholder
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BusinessCardHolderResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'body'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_businesses" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['body']:
            _body_params = _params['body']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '201': "BusinessCardHolderResponse",
            '400': None,
            '409': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def post_businesses_lookup(self, body : Optional[DDARequest] = None, **kwargs) -> BusinessCardholder:  # noqa: E501
        """Returns a specific business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.post_businesses_lookup(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: DDARequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BusinessCardholder
        """
        kwargs['_return_http_data_only'] = True
        return self.post_businesses_lookup_with_http_info(body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_businesses_lookup_with_http_info(self, body : Optional[DDARequest] = None, **kwargs):  # noqa: E501
        """Returns a specific business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.post_businesses_lookup_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: DDARequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BusinessCardholder, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'body'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_businesses_lookup" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['body']:
            _body_params = _params['body']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "BusinessCardholder",
            '404': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses/lookup', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def post_businesses_token_notes(self, token : Annotated[StrictStr, Field(..., description="Business token")], body : Optional[CardholderNoteRequestModel] = None, **kwargs) -> CardholderNoteResponseModel:  # noqa: E501
        """Creates a note for a business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.post_businesses_token_notes(token, body, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param body:
        :type body: CardholderNoteRequestModel
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: CardholderNoteResponseModel
        """
        kwargs['_return_http_data_only'] = True
        return self.post_businesses_token_notes_with_http_info(token, body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_businesses_token_notes_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Business token")], body : Optional[CardholderNoteRequestModel] = None, **kwargs):  # noqa: E501
        """Creates a note for a business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.post_businesses_token_notes_with_http_info(token, body, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param body:
        :type body: CardholderNoteRequestModel
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(CardholderNoteResponseModel, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token',
            'body'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_businesses_token_notes" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['token']:
            _path_params['token'] = _params['token']


        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['body']:
            _body_params = _params['body']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '201': "CardholderNoteResponseModel",
            '400': None,
            '401': None,
            '403': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses/{token}/notes', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def put_businesses_token(self, token : Annotated[StrictStr, Field(..., description="Business token")], body : Annotated[BusinessCardHolderUpdate, Field(..., description="Business object")], **kwargs) -> BusinessCardholder:  # noqa: E501
        """Updates a specific business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.put_businesses_token(token, body, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param body: Business object (required)
        :type body: BusinessCardHolderUpdate
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BusinessCardholder
        """
        kwargs['_return_http_data_only'] = True
        return self.put_businesses_token_with_http_info(token, body, **kwargs)  # noqa: E501

    @validate_arguments
    def put_businesses_token_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Business token")], body : Annotated[BusinessCardHolderUpdate, Field(..., description="Business object")], **kwargs):  # noqa: E501
        """Updates a specific business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.put_businesses_token_with_http_info(token, body, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param body: Business object (required)
        :type body: BusinessCardHolderUpdate
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BusinessCardholder, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token',
            'body'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method put_businesses_token" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['token']:
            _path_params['token'] = _params['token']


        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['body']:
            _body_params = _params['body']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "BusinessCardholder",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses/{token}', 'PUT',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def put_businesses_token_notes_notestoken(self, token : Annotated[StrictStr, Field(..., description="Business token")], notes_token : Annotated[StrictStr, Field(..., description="Notes token")], body : Optional[CardholderNoteUpdateRequestModel] = None, **kwargs) -> CardholderNoteResponseModel:  # noqa: E501
        """Updates a specific note for a business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.put_businesses_token_notes_notestoken(token, notes_token, body, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param notes_token: Notes token (required)
        :type notes_token: str
        :param body:
        :type body: CardholderNoteUpdateRequestModel
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: CardholderNoteResponseModel
        """
        kwargs['_return_http_data_only'] = True
        return self.put_businesses_token_notes_notestoken_with_http_info(token, notes_token, body, **kwargs)  # noqa: E501

    @validate_arguments
    def put_businesses_token_notes_notestoken_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Business token")], notes_token : Annotated[StrictStr, Field(..., description="Notes token")], body : Optional[CardholderNoteUpdateRequestModel] = None, **kwargs):  # noqa: E501
        """Updates a specific note for a business  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.put_businesses_token_notes_notestoken_with_http_info(token, notes_token, body, async_req=True)
        >>> result = thread.get()

        :param token: Business token (required)
        :type token: str
        :param notes_token: Notes token (required)
        :type notes_token: str
        :param body:
        :type body: CardholderNoteUpdateRequestModel
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(CardholderNoteResponseModel, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token',
            'notes_token',
            'body'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method put_businesses_token_notes_notestoken" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['token']:
            _path_params['token'] = _params['token']

        if _params['notes_token']:
            _path_params['notes_token'] = _params['notes_token']


        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['body']:
            _body_params = _params['body']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '201': "CardholderNoteResponseModel",
            '400': None,
            '401': None,
            '403': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/businesses/{token}/notes/{notes_token}', 'PUT',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))
