# 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.access_token_response import AccessTokenResponse
from marqeta_client.models.card_holder_model import CardHolderModel
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.client_access_token_request import ClientAccessTokenRequest
from marqeta_client.models.client_access_token_response import ClientAccessTokenResponse
from marqeta_client.models.login_request_model import LoginRequestModel
from marqeta_client.models.login_response_model import LoginResponseModel
from marqeta_client.models.one_time_request_model import OneTimeRequestModel
from marqeta_client.models.password_update_model import PasswordUpdateModel
from marqeta_client.models.reset_user_password_email_model import ResetUserPasswordEmailModel
from marqeta_client.models.reset_user_password_model import ResetUserPasswordModel
from marqeta_client.models.ssn_response_model import SsnResponseModel
from marqeta_client.models.user_card_holder_list_response import UserCardHolderListResponse
from marqeta_client.models.user_card_holder_response import UserCardHolderResponse
from marqeta_client.models.user_card_holder_search_model import UserCardHolderSearchModel
from marqeta_client.models.user_card_holder_update_model import UserCardHolderUpdateModel

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


class UsersApi(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_users(self, count : Annotated[Optional[StrictInt], Field(description="Number of users to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = 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) -> UserCardHolderListResponse:  # noqa: E501
        """Lists all users  # 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_users(count, start_index, 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 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: UserCardHolderListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_users_with_http_info(count, start_index, search_type, fields, sort_by, **kwargs)  # noqa: E501

    @validate_arguments
    def get_users_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, 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 users  # 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_users_with_http_info(count, start_index, 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 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(UserCardHolderListResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'count',
            'start_index',
            '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_users" % _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('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': "UserCardHolderListResponse",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users', '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_users_auth_clientaccesstoken_token(self, token : Annotated[StrictStr, Field(..., description="Client access token")], application_token : Optional[StrictStr] = None, **kwargs) -> ClientAccessTokenResponse:  # noqa: E501
        """Returns a client access token  # 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_users_auth_clientaccesstoken_token(token, application_token, async_req=True)
        >>> result = thread.get()

        :param token: Client access token (required)
        :type token: str
        :param application_token:
        :type application_token: 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: ClientAccessTokenResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_users_auth_clientaccesstoken_token_with_http_info(token, application_token, **kwargs)  # noqa: E501

    @validate_arguments
    def get_users_auth_clientaccesstoken_token_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Client access token")], application_token : Optional[StrictStr] = None, **kwargs):  # noqa: E501
        """Returns a client access token  # 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_users_auth_clientaccesstoken_token_with_http_info(token, application_token, async_req=True)
        >>> result = thread.get()

        :param token: Client access token (required)
        :type token: str
        :param application_token:
        :type application_token: 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(ClientAccessTokenResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token',
            'application_token'
        ]
        _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_users_auth_clientaccesstoken_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('application_token') is not None:  # noqa: E501
            _query_params.append(('application_token', _params['application_token']))

        # 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': "ClientAccessTokenResponse",
            '400': None,
            '401': None,
            '403': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/auth/clientaccesstoken/{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_users_parenttoken_children(self, parent_token : Annotated[StrictStr, Field(..., description="Token of parent cardholder")], 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) -> UserCardHolderListResponse:  # noqa: E501
        """Lists all children of a parent user  # 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_users_parenttoken_children(parent_token, count, start_index, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param parent_token: Token of parent cardholder (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: UserCardHolderListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_users_parenttoken_children_with_http_info(parent_token, count, start_index, fields, sort_by, **kwargs)  # noqa: E501

    @validate_arguments
    def get_users_parenttoken_children_with_http_info(self, parent_token : Annotated[StrictStr, Field(..., description="Token of parent cardholder")], 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 user  # 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_users_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 cardholder (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(UserCardHolderListResponse, 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_users_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': "UserCardHolderListResponse",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/{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_users_phonenumber_phonenumber(self, phone_number : Annotated[StrictStr, Field(..., description="Phone number")], 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) -> UserCardHolderListResponse:  # noqa: E501
        """Lists all users who match a phone number  # 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_users_phonenumber_phonenumber(phone_number, count, start_index, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param phone_number: Phone number (required)
        :type phone_number: 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: UserCardHolderListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_users_phonenumber_phonenumber_with_http_info(phone_number, count, start_index, fields, sort_by, **kwargs)  # noqa: E501

    @validate_arguments
    def get_users_phonenumber_phonenumber_with_http_info(self, phone_number : Annotated[StrictStr, Field(..., description="Phone number")], 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 users who match a phone number  # 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_users_phonenumber_phonenumber_with_http_info(phone_number, count, start_index, fields, sort_by, async_req=True)
        >>> result = thread.get()

        :param phone_number: Phone number (required)
        :type phone_number: 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(UserCardHolderListResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'phone_number',
            '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_users_phonenumber_phonenumber" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

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


        # 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': "UserCardHolderListResponse",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/phonenumber/{phone_number}', '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_users_token(self, token : Annotated[StrictStr, Field(..., description="User 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) -> UserCardHolderResponse:  # noqa: E501
        """Returns a specific user  # 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_users_token(token, fields, async_req=True)
        >>> result = thread.get()

        :param token: User 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: UserCardHolderResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_users_token_with_http_info(token, fields, **kwargs)  # noqa: E501

    @validate_arguments
    def get_users_token_with_http_info(self, token : Annotated[StrictStr, Field(..., description="User 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 user  # 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_users_token_with_http_info(token, fields, async_req=True)
        >>> result = thread.get()

        :param token: User 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(UserCardHolderResponse, 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_users_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': "UserCardHolderResponse",
            '400': None,
            '404': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/{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_users_token_notes(self, token : Annotated[StrictStr, Field(..., description="User 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 cardholder 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_users_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: User 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_users_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_users_token_notes_with_http_info(self, token : Annotated[StrictStr, Field(..., description="User 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 cardholder 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_users_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: User 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_users_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(
            '/users/{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_users_token_ssn(self, token : Annotated[StrictStr, Field(..., description="User token")], full_ssn : Optional[StrictBool] = None, **kwargs) -> SsnResponseModel:  # noqa: E501
        """Returns a specific user'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_users_token_ssn(token, full_ssn, async_req=True)
        >>> result = thread.get()

        :param token: User 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_users_token_ssn_with_http_info(token, full_ssn, **kwargs)  # noqa: E501

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

        :param token: User 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_users_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(
            '/users/{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_users(self, body : Optional[CardHolderModel] = None, **kwargs) -> UserCardHolderResponse:  # noqa: E501
        """Creates a user  # 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_users(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: CardHolderModel
        :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: UserCardHolderResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_with_http_info(body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_with_http_info(self, body : Optional[CardHolderModel] = None, **kwargs):  # noqa: E501
        """Creates a user  # 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_users_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: CardHolderModel
        :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(UserCardHolderResponse, 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_users" % _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': "UserCardHolderResponse",
            '400': None,
            '409': None,
            '412': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users', '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_users_auth_changepassword(self, body : Annotated[PasswordUpdateModel, Field(..., description="Password update object")], **kwargs) -> None:  # noqa: E501
        """Updates a user password  # 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_users_auth_changepassword(body, async_req=True)
        >>> result = thread.get()

        :param body: Password update object (required)
        :type body: PasswordUpdateModel
        :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: None
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_changepassword_with_http_info(body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_changepassword_with_http_info(self, body : Annotated[PasswordUpdateModel, Field(..., description="Password update object")], **kwargs):  # noqa: E501
        """Updates a user password  # 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_users_auth_changepassword_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param body: Password update object (required)
        :type body: PasswordUpdateModel
        :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: None
        """

        _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_users_auth_changepassword" % _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 `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 = {}

        return self.api_client.call_api(
            '/users/auth/changepassword', '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_users_auth_clientaccesstoken(self, body : Optional[ClientAccessTokenRequest] = None, **kwargs) -> ClientAccessTokenResponse:  # noqa: E501
        """Creates a client access token  # 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_users_auth_clientaccesstoken(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: ClientAccessTokenRequest
        :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: ClientAccessTokenResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_clientaccesstoken_with_http_info(body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_clientaccesstoken_with_http_info(self, body : Optional[ClientAccessTokenRequest] = None, **kwargs):  # noqa: E501
        """Creates a client access token  # 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_users_auth_clientaccesstoken_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: ClientAccessTokenRequest
        :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(ClientAccessTokenResponse, 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_users_auth_clientaccesstoken" % _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': "ClientAccessTokenResponse",
            '400': None,
            '401': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/auth/clientaccesstoken', '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_users_auth_login(self, body : Annotated[Optional[LoginRequestModel], Field(description="User login object")] = None, **kwargs) -> LoginResponseModel:  # noqa: E501
        """Logs in a user  # 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_users_auth_login(body, async_req=True)
        >>> result = thread.get()

        :param body: User login object
        :type body: LoginRequestModel
        :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: LoginResponseModel
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_login_with_http_info(body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_login_with_http_info(self, body : Annotated[Optional[LoginRequestModel], Field(description="User login object")] = None, **kwargs):  # noqa: E501
        """Logs in a user  # 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_users_auth_login_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param body: User login object
        :type body: LoginRequestModel
        :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(LoginResponseModel, 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_users_auth_login" % _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 = {
            '204': "LoginResponseModel",
            '400': None,
            '401': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/auth/login', '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_users_auth_logout(self, **kwargs) -> None:  # noqa: E501
        """Logs out a user  # 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_users_auth_logout(async_req=True)
        >>> result = thread.get()

        :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: None
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_logout_with_http_info(**kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_logout_with_http_info(self, **kwargs):  # noqa: E501
        """Logs out a user  # 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_users_auth_logout_with_http_info(async_req=True)
        >>> result = thread.get()

        :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: None
        """

        _params = locals()

        _all_params = [
        ]
        _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_users_auth_logout" % _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
        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {}

        return self.api_client.call_api(
            '/users/auth/logout', '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_users_auth_onetime(self, body : Annotated[Optional[OneTimeRequestModel], Field(description="One-time object")] = None, **kwargs) -> AccessTokenResponse:  # noqa: E501
        """Creates a one-time token  # 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_users_auth_onetime(body, async_req=True)
        >>> result = thread.get()

        :param body: One-time object
        :type body: OneTimeRequestModel
        :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: AccessTokenResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_onetime_with_http_info(body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_onetime_with_http_info(self, body : Annotated[Optional[OneTimeRequestModel], Field(description="One-time object")] = None, **kwargs):  # noqa: E501
        """Creates a one-time token  # 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_users_auth_onetime_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param body: One-time object
        :type body: OneTimeRequestModel
        :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(AccessTokenResponse, 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_users_auth_onetime" % _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': "AccessTokenResponse",
            '400': None,
            '401': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/auth/onetime', '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_users_auth_resetpassword(self, body : Optional[ResetUserPasswordEmailModel] = None, **kwargs) -> None:  # noqa: E501
        """Generates a reset password email  # 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_users_auth_resetpassword(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: ResetUserPasswordEmailModel
        :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: None
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_resetpassword_with_http_info(body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_resetpassword_with_http_info(self, body : Optional[ResetUserPasswordEmailModel] = None, **kwargs):  # noqa: E501
        """Generates a reset password email  # 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_users_auth_resetpassword_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param body:
        :type body: ResetUserPasswordEmailModel
        :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: None
        """

        _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_users_auth_resetpassword" % _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 `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 = {}

        return self.api_client.call_api(
            '/users/auth/resetpassword', '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_users_auth_resetpassword_token(self, token : Annotated[StrictStr, Field(..., description="Reset password verification token")], body : Optional[ResetUserPasswordModel] = None, **kwargs) -> None:  # noqa: E501
        """Resets a user password  # 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_users_auth_resetpassword_token(token, body, async_req=True)
        >>> result = thread.get()

        :param token: Reset password verification token (required)
        :type token: str
        :param body:
        :type body: ResetUserPasswordModel
        :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: None
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_resetpassword_token_with_http_info(token, body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_resetpassword_token_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Reset password verification token")], body : Optional[ResetUserPasswordModel] = None, **kwargs):  # noqa: E501
        """Resets a user password  # 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_users_auth_resetpassword_token_with_http_info(token, body, async_req=True)
        >>> result = thread.get()

        :param token: Reset password verification token (required)
        :type token: str
        :param body:
        :type body: ResetUserPasswordModel
        :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: None
        """

        _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_users_auth_resetpassword_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 `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 = {}

        return self.api_client.call_api(
            '/users/auth/resetpassword/{token}', '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_users_auth_verifyemail(self, **kwargs) -> None:  # noqa: E501
        """Generates an email verification request  # 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_users_auth_verifyemail(async_req=True)
        >>> result = thread.get()

        :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: None
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_verifyemail_with_http_info(**kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_verifyemail_with_http_info(self, **kwargs):  # noqa: E501
        """Generates an email verification request  # 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_users_auth_verifyemail_with_http_info(async_req=True)
        >>> result = thread.get()

        :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: None
        """

        _params = locals()

        _all_params = [
        ]
        _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_users_auth_verifyemail" % _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
        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {}

        return self.api_client.call_api(
            '/users/auth/verifyemail', '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_users_auth_verifyemail_token(self, token : Annotated[StrictStr, Field(..., description="Email verification token")], **kwargs) -> None:  # noqa: E501
        """Verifies the email token  # 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_users_auth_verifyemail_token(token, async_req=True)
        >>> result = thread.get()

        :param token: Email verification token (required)
        :type token: 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: None
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_auth_verifyemail_token_with_http_info(token, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_auth_verifyemail_token_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Email verification token")], **kwargs):  # noqa: E501
        """Verifies the email token  # 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_users_auth_verifyemail_token_with_http_info(token, async_req=True)
        >>> result = thread.get()

        :param token: Email verification token (required)
        :type token: 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: None
        """

        _params = locals()

        _all_params = [
            'token'
        ]
        _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_users_auth_verifyemail_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
        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {}

        return self.api_client.call_api(
            '/users/auth/verifyemail/{token}', '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_users_lookup(self, count : Annotated[Optional[StrictInt], Field(description="Number of users to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = 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, body : Optional[UserCardHolderSearchModel] = None, **kwargs) -> UserCardHolderListResponse:  # noqa: E501
        """Lists all users  # 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_users_lookup(count, start_index, search_type, fields, sort_by, body, 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 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 body:
        :type body: UserCardHolderSearchModel
        :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: UserCardHolderListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.post_users_lookup_with_http_info(count, start_index, search_type, fields, sort_by, body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_lookup_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, 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, body : Optional[UserCardHolderSearchModel] = None, **kwargs):  # noqa: E501
        """Lists all users  # 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_users_lookup_with_http_info(count, start_index, search_type, fields, sort_by, body, 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 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 body:
        :type body: UserCardHolderSearchModel
        :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(UserCardHolderListResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'count',
            'start_index',
            'search_type',
            'fields',
            'sort_by',
            '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_users_lookup" % _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('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
        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': "UserCardHolderListResponse",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/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_users_token_notes(self, token : Annotated[StrictStr, Field(..., description="User token")], body : Optional[CardholderNoteRequestModel] = None, **kwargs) -> CardholderNoteResponseModel:  # noqa: E501
        """Creates a note for the cardholder  # 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_users_token_notes(token, body, async_req=True)
        >>> result = thread.get()

        :param token: User 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_users_token_notes_with_http_info(token, body, **kwargs)  # noqa: E501

    @validate_arguments
    def post_users_token_notes_with_http_info(self, token : Annotated[StrictStr, Field(..., description="User token")], body : Optional[CardholderNoteRequestModel] = None, **kwargs):  # noqa: E501
        """Creates a note for the cardholder  # 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_users_token_notes_with_http_info(token, body, async_req=True)
        >>> result = thread.get()

        :param token: User 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_users_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(
            '/users/{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_users_token(self, token : Annotated[StrictStr, Field(..., description="User token")], body : Annotated[UserCardHolderUpdateModel, Field(..., description="User object")], **kwargs) -> CardHolderModel:  # noqa: E501
        """Updates a specific user  # 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_users_token(token, body, async_req=True)
        >>> result = thread.get()

        :param token: User token (required)
        :type token: str
        :param body: User object (required)
        :type body: UserCardHolderUpdateModel
        :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: CardHolderModel
        """
        kwargs['_return_http_data_only'] = True
        return self.put_users_token_with_http_info(token, body, **kwargs)  # noqa: E501

    @validate_arguments
    def put_users_token_with_http_info(self, token : Annotated[StrictStr, Field(..., description="User token")], body : Annotated[UserCardHolderUpdateModel, Field(..., description="User object")], **kwargs):  # noqa: E501
        """Updates a specific user  # 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_users_token_with_http_info(token, body, async_req=True)
        >>> result = thread.get()

        :param token: User token (required)
        :type token: str
        :param body: User object (required)
        :type body: UserCardHolderUpdateModel
        :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(CardHolderModel, 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_users_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': "CardHolderModel",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/users/{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_users_token_notes_notestoken(self, token : Annotated[StrictStr, Field(..., description="User token")], notes_token : Annotated[StrictStr, Field(..., description="Notes token")], body : Optional[CardholderNoteUpdateRequestModel] = None, **kwargs) -> CardholderNoteResponseModel:  # noqa: E501
        """Updates a specific note for a cardholder  # 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_users_token_notes_notestoken(token, notes_token, body, async_req=True)
        >>> result = thread.get()

        :param token: User 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_users_token_notes_notestoken_with_http_info(token, notes_token, body, **kwargs)  # noqa: E501

    @validate_arguments
    def put_users_token_notes_notestoken_with_http_info(self, token : Annotated[StrictStr, Field(..., description="User token")], notes_token : Annotated[StrictStr, Field(..., description="Notes token")], body : Optional[CardholderNoteUpdateRequestModel] = None, **kwargs):  # noqa: E501
        """Updates a specific note for a cardholder  # 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_users_token_notes_notestoken_with_http_info(token, notes_token, body, async_req=True)
        >>> result = thread.get()

        :param token: User 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_users_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(
            '/users/{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'))
