# This file was auto-generated by Fern from our API Definition.

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.additional_data import AdditionalData
from ..types.email import Email
from ..types.language import Language
from ..types.mfa_data import MfaData
from ..types.mfa_mode import MfaMode
from ..types.mfa_validation_code import MfaValidationCode
from ..types.name_user import NameUser
from ..types.org_scope import OrgScope
from ..types.payabli_api_response import PayabliApiResponse
from ..types.payabli_api_response_mfa_basic import PayabliApiResponseMfaBasic
from ..types.payabli_api_response_user_mfa import PayabliApiResponseUserMfa
from ..types.phone_number import PhoneNumber
from ..types.timezone import Timezone
from ..types.user_query_record import UserQueryRecord
from ..types.usr_access import UsrAccess
from ..types.usr_status import UsrStatus
from .raw_client import AsyncRawUserClient, RawUserClient
from .types.add_user_response import AddUserResponse
from .types.auth_reset_user_response import AuthResetUserResponse
from .types.change_psw_user_response import ChangePswUserResponse
from .types.delete_user_response import DeleteUserResponse
from .types.edit_mfa_user_response import EditMfaUserResponse
from .types.logout_user_response import LogoutUserResponse

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class UserClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawUserClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawUserClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawUserClient
        """
        return self._raw_client

    def add_user(
        self,
        *,
        access: typing.Optional[typing.Sequence[UsrAccess]] = OMIT,
        additional_data: typing.Optional[AdditionalData] = OMIT,
        email: typing.Optional[Email] = OMIT,
        language: typing.Optional[Language] = OMIT,
        mfa_data: typing.Optional[MfaData] = OMIT,
        name: typing.Optional[NameUser] = OMIT,
        phone: typing.Optional[PhoneNumber] = OMIT,
        pwd: typing.Optional[str] = OMIT,
        scope: typing.Optional[typing.Sequence[OrgScope]] = OMIT,
        time_zone: typing.Optional[Timezone] = OMIT,
        usr_status: typing.Optional[UsrStatus] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AddUserResponse:
        """
        Parameters
        ----------
        access : typing.Optional[typing.Sequence[UsrAccess]]

        additional_data : typing.Optional[AdditionalData]

        email : typing.Optional[Email]
            The user's email address.

        language : typing.Optional[Language]

        mfa_data : typing.Optional[MfaData]

        name : typing.Optional[NameUser]

        phone : typing.Optional[PhoneNumber]
            The user's phone number.

        pwd : typing.Optional[str]

        scope : typing.Optional[typing.Sequence[OrgScope]]

        time_zone : typing.Optional[Timezone]

        usr_status : typing.Optional[UsrStatus]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AddUserResponse
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.add_user()
        """
        _response = self._raw_client.add_user(
            access=access,
            additional_data=additional_data,
            email=email,
            language=language,
            mfa_data=mfa_data,
            name=name,
            phone=phone,
            pwd=pwd,
            scope=scope,
            time_zone=time_zone,
            usr_status=usr_status,
            request_options=request_options,
        )
        return _response.data

    def auth_refresh_user(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PayabliApiResponseUserMfa:
        """
        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponseUserMfa
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.auth_refresh_user()
        """
        _response = self._raw_client.auth_refresh_user(request_options=request_options)
        return _response.data

    def auth_reset_user(
        self,
        *,
        email: typing.Optional[Email] = OMIT,
        entry: typing.Optional[str] = OMIT,
        entry_type: typing.Optional[int] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AuthResetUserResponse:
        """
        Parameters
        ----------
        email : typing.Optional[Email]
            The user's email address.

        entry : typing.Optional[str]
            Identifier for entrypoint originating the request (used by front-end apps)

        entry_type : typing.Optional[int]
            Type of entry identifier: 0 - partner, 2 - paypoint. This is used by front-end apps, required if an Entry is indicated.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AuthResetUserResponse
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.auth_reset_user()
        """
        _response = self._raw_client.auth_reset_user(
            email=email, entry=entry, entry_type=entry_type, request_options=request_options
        )
        return _response.data

    def auth_user(
        self,
        provider: str,
        *,
        email: typing.Optional[Email] = OMIT,
        entry: typing.Optional[str] = OMIT,
        entry_type: typing.Optional[int] = OMIT,
        psw: typing.Optional[str] = OMIT,
        user_id: typing.Optional[int] = OMIT,
        user_token_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponseMfaBasic:
        """
        This endpoint requires an application API token.

        Parameters
        ----------
        provider : str
            Auth provider. This fields is optional and defaults to null for the built-in provider.

        email : typing.Optional[Email]

        entry : typing.Optional[str]
            Identifier for entry point originating the request (used by front-end apps)

        entry_type : typing.Optional[int]
            Type of entry identifier: 0 - partner, 2 - paypoint. This is used by front-end apps, required if an Entry is indicated.

        psw : typing.Optional[str]

        user_id : typing.Optional[int]

        user_token_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponseMfaBasic
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.auth_user(
            provider="provider",
        )
        """
        _response = self._raw_client.auth_user(
            provider,
            email=email,
            entry=entry,
            entry_type=entry_type,
            psw=psw,
            user_id=user_id,
            user_token_id=user_token_id,
            request_options=request_options,
        )
        return _response.data

    def change_psw_user(
        self, *, psw: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None
    ) -> ChangePswUserResponse:
        """
        Parameters
        ----------
        psw : typing.Optional[str]
            New User password

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ChangePswUserResponse
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.change_psw_user()
        """
        _response = self._raw_client.change_psw_user(psw=psw, request_options=request_options)
        return _response.data

    def delete_user(
        self, user_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> DeleteUserResponse:
        """
        Parameters
        ----------
        user_id : int
            The Payabli-generated `userId` value.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        DeleteUserResponse
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.delete_user(
            user_id=1000000,
        )
        """
        _response = self._raw_client.delete_user(user_id, request_options=request_options)
        return _response.data

    def edit_mfa_user(
        self,
        user_id: int,
        *,
        mfa: typing.Optional[bool] = OMIT,
        mfa_mode: typing.Optional[MfaMode] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> EditMfaUserResponse:
        """
        Parameters
        ----------
        user_id : int
            User Identifier

        mfa : typing.Optional[bool]

        mfa_mode : typing.Optional[MfaMode]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        EditMfaUserResponse
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.edit_mfa_user(
            user_id=1000000,
        )
        """
        _response = self._raw_client.edit_mfa_user(user_id, mfa=mfa, mfa_mode=mfa_mode, request_options=request_options)
        return _response.data

    def edit_user(
        self,
        user_id: int,
        *,
        access: typing.Optional[typing.Sequence[UsrAccess]] = OMIT,
        additional_data: typing.Optional[AdditionalData] = OMIT,
        email: typing.Optional[Email] = OMIT,
        language: typing.Optional[Language] = OMIT,
        mfa_data: typing.Optional[MfaData] = OMIT,
        name: typing.Optional[NameUser] = OMIT,
        phone: typing.Optional[PhoneNumber] = OMIT,
        pwd: typing.Optional[str] = OMIT,
        scope: typing.Optional[typing.Sequence[OrgScope]] = OMIT,
        time_zone: typing.Optional[Timezone] = OMIT,
        usr_status: typing.Optional[UsrStatus] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponse:
        """
        Parameters
        ----------
        user_id : int
            User Identifier

        access : typing.Optional[typing.Sequence[UsrAccess]]

        additional_data : typing.Optional[AdditionalData]

        email : typing.Optional[Email]
            The user's email address.

        language : typing.Optional[Language]

        mfa_data : typing.Optional[MfaData]

        name : typing.Optional[NameUser]

        phone : typing.Optional[PhoneNumber]
            The user's phone number.

        pwd : typing.Optional[str]

        scope : typing.Optional[typing.Sequence[OrgScope]]

        time_zone : typing.Optional[Timezone]

        usr_status : typing.Optional[UsrStatus]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponse
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.edit_user(
            user_id=1000000,
        )
        """
        _response = self._raw_client.edit_user(
            user_id,
            access=access,
            additional_data=additional_data,
            email=email,
            language=language,
            mfa_data=mfa_data,
            name=name,
            phone=phone,
            pwd=pwd,
            scope=scope,
            time_zone=time_zone,
            usr_status=usr_status,
            request_options=request_options,
        )
        return _response.data

    def get_user(
        self,
        user_id: int,
        *,
        entry: typing.Optional[str] = None,
        level: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserQueryRecord:
        """
        Parameters
        ----------
        user_id : int
            The Payabli-generated `userId` value.

        entry : typing.Optional[str]
            The entrypoint identifier.

        level : typing.Optional[int]
            Entry level: 0 - partner, 2 - paypoint

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserQueryRecord
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.get_user(
            user_id=1000000,
            entry="478ae1234",
        )
        """
        _response = self._raw_client.get_user(user_id, entry=entry, level=level, request_options=request_options)
        return _response.data

    def logout_user(self, *, request_options: typing.Optional[RequestOptions] = None) -> LogoutUserResponse:
        """
        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        LogoutUserResponse
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.logout_user()
        """
        _response = self._raw_client.logout_user(request_options=request_options)
        return _response.data

    def resend_mfa_code(
        self, entry: str, entry_type: int, usrname: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PayabliApiResponseMfaBasic:
        """
        Parameters
        ----------
        entry : str


        entry_type : int


        usrname : str


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponseMfaBasic
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.resend_mfa_code(
            entry="Entry",
            entry_type=1,
            usrname="usrname",
        )
        """
        _response = self._raw_client.resend_mfa_code(entry, entry_type, usrname, request_options=request_options)
        return _response.data

    def validate_mfa_user(
        self,
        *,
        mfa_code: typing.Optional[str] = OMIT,
        mfa_validation_code: typing.Optional[MfaValidationCode] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponseUserMfa:
        """
        Parameters
        ----------
        mfa_code : typing.Optional[str]

        mfa_validation_code : typing.Optional[MfaValidationCode]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponseUserMfa
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.user.validate_mfa_user()
        """
        _response = self._raw_client.validate_mfa_user(
            mfa_code=mfa_code, mfa_validation_code=mfa_validation_code, request_options=request_options
        )
        return _response.data


class AsyncUserClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawUserClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawUserClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawUserClient
        """
        return self._raw_client

    async def add_user(
        self,
        *,
        access: typing.Optional[typing.Sequence[UsrAccess]] = OMIT,
        additional_data: typing.Optional[AdditionalData] = OMIT,
        email: typing.Optional[Email] = OMIT,
        language: typing.Optional[Language] = OMIT,
        mfa_data: typing.Optional[MfaData] = OMIT,
        name: typing.Optional[NameUser] = OMIT,
        phone: typing.Optional[PhoneNumber] = OMIT,
        pwd: typing.Optional[str] = OMIT,
        scope: typing.Optional[typing.Sequence[OrgScope]] = OMIT,
        time_zone: typing.Optional[Timezone] = OMIT,
        usr_status: typing.Optional[UsrStatus] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AddUserResponse:
        """
        Parameters
        ----------
        access : typing.Optional[typing.Sequence[UsrAccess]]

        additional_data : typing.Optional[AdditionalData]

        email : typing.Optional[Email]
            The user's email address.

        language : typing.Optional[Language]

        mfa_data : typing.Optional[MfaData]

        name : typing.Optional[NameUser]

        phone : typing.Optional[PhoneNumber]
            The user's phone number.

        pwd : typing.Optional[str]

        scope : typing.Optional[typing.Sequence[OrgScope]]

        time_zone : typing.Optional[Timezone]

        usr_status : typing.Optional[UsrStatus]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AddUserResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.add_user()


        asyncio.run(main())
        """
        _response = await self._raw_client.add_user(
            access=access,
            additional_data=additional_data,
            email=email,
            language=language,
            mfa_data=mfa_data,
            name=name,
            phone=phone,
            pwd=pwd,
            scope=scope,
            time_zone=time_zone,
            usr_status=usr_status,
            request_options=request_options,
        )
        return _response.data

    async def auth_refresh_user(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PayabliApiResponseUserMfa:
        """
        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponseUserMfa
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.auth_refresh_user()


        asyncio.run(main())
        """
        _response = await self._raw_client.auth_refresh_user(request_options=request_options)
        return _response.data

    async def auth_reset_user(
        self,
        *,
        email: typing.Optional[Email] = OMIT,
        entry: typing.Optional[str] = OMIT,
        entry_type: typing.Optional[int] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AuthResetUserResponse:
        """
        Parameters
        ----------
        email : typing.Optional[Email]
            The user's email address.

        entry : typing.Optional[str]
            Identifier for entrypoint originating the request (used by front-end apps)

        entry_type : typing.Optional[int]
            Type of entry identifier: 0 - partner, 2 - paypoint. This is used by front-end apps, required if an Entry is indicated.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AuthResetUserResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.auth_reset_user()


        asyncio.run(main())
        """
        _response = await self._raw_client.auth_reset_user(
            email=email, entry=entry, entry_type=entry_type, request_options=request_options
        )
        return _response.data

    async def auth_user(
        self,
        provider: str,
        *,
        email: typing.Optional[Email] = OMIT,
        entry: typing.Optional[str] = OMIT,
        entry_type: typing.Optional[int] = OMIT,
        psw: typing.Optional[str] = OMIT,
        user_id: typing.Optional[int] = OMIT,
        user_token_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponseMfaBasic:
        """
        This endpoint requires an application API token.

        Parameters
        ----------
        provider : str
            Auth provider. This fields is optional and defaults to null for the built-in provider.

        email : typing.Optional[Email]

        entry : typing.Optional[str]
            Identifier for entry point originating the request (used by front-end apps)

        entry_type : typing.Optional[int]
            Type of entry identifier: 0 - partner, 2 - paypoint. This is used by front-end apps, required if an Entry is indicated.

        psw : typing.Optional[str]

        user_id : typing.Optional[int]

        user_token_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponseMfaBasic
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.auth_user(
                provider="provider",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.auth_user(
            provider,
            email=email,
            entry=entry,
            entry_type=entry_type,
            psw=psw,
            user_id=user_id,
            user_token_id=user_token_id,
            request_options=request_options,
        )
        return _response.data

    async def change_psw_user(
        self, *, psw: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None
    ) -> ChangePswUserResponse:
        """
        Parameters
        ----------
        psw : typing.Optional[str]
            New User password

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ChangePswUserResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.change_psw_user()


        asyncio.run(main())
        """
        _response = await self._raw_client.change_psw_user(psw=psw, request_options=request_options)
        return _response.data

    async def delete_user(
        self, user_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> DeleteUserResponse:
        """
        Parameters
        ----------
        user_id : int
            The Payabli-generated `userId` value.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        DeleteUserResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.delete_user(
                user_id=1000000,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.delete_user(user_id, request_options=request_options)
        return _response.data

    async def edit_mfa_user(
        self,
        user_id: int,
        *,
        mfa: typing.Optional[bool] = OMIT,
        mfa_mode: typing.Optional[MfaMode] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> EditMfaUserResponse:
        """
        Parameters
        ----------
        user_id : int
            User Identifier

        mfa : typing.Optional[bool]

        mfa_mode : typing.Optional[MfaMode]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        EditMfaUserResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.edit_mfa_user(
                user_id=1000000,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.edit_mfa_user(
            user_id, mfa=mfa, mfa_mode=mfa_mode, request_options=request_options
        )
        return _response.data

    async def edit_user(
        self,
        user_id: int,
        *,
        access: typing.Optional[typing.Sequence[UsrAccess]] = OMIT,
        additional_data: typing.Optional[AdditionalData] = OMIT,
        email: typing.Optional[Email] = OMIT,
        language: typing.Optional[Language] = OMIT,
        mfa_data: typing.Optional[MfaData] = OMIT,
        name: typing.Optional[NameUser] = OMIT,
        phone: typing.Optional[PhoneNumber] = OMIT,
        pwd: typing.Optional[str] = OMIT,
        scope: typing.Optional[typing.Sequence[OrgScope]] = OMIT,
        time_zone: typing.Optional[Timezone] = OMIT,
        usr_status: typing.Optional[UsrStatus] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponse:
        """
        Parameters
        ----------
        user_id : int
            User Identifier

        access : typing.Optional[typing.Sequence[UsrAccess]]

        additional_data : typing.Optional[AdditionalData]

        email : typing.Optional[Email]
            The user's email address.

        language : typing.Optional[Language]

        mfa_data : typing.Optional[MfaData]

        name : typing.Optional[NameUser]

        phone : typing.Optional[PhoneNumber]
            The user's phone number.

        pwd : typing.Optional[str]

        scope : typing.Optional[typing.Sequence[OrgScope]]

        time_zone : typing.Optional[Timezone]

        usr_status : typing.Optional[UsrStatus]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.edit_user(
                user_id=1000000,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.edit_user(
            user_id,
            access=access,
            additional_data=additional_data,
            email=email,
            language=language,
            mfa_data=mfa_data,
            name=name,
            phone=phone,
            pwd=pwd,
            scope=scope,
            time_zone=time_zone,
            usr_status=usr_status,
            request_options=request_options,
        )
        return _response.data

    async def get_user(
        self,
        user_id: int,
        *,
        entry: typing.Optional[str] = None,
        level: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserQueryRecord:
        """
        Parameters
        ----------
        user_id : int
            The Payabli-generated `userId` value.

        entry : typing.Optional[str]
            The entrypoint identifier.

        level : typing.Optional[int]
            Entry level: 0 - partner, 2 - paypoint

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserQueryRecord
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.get_user(
                user_id=1000000,
                entry="478ae1234",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_user(user_id, entry=entry, level=level, request_options=request_options)
        return _response.data

    async def logout_user(self, *, request_options: typing.Optional[RequestOptions] = None) -> LogoutUserResponse:
        """
        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        LogoutUserResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.logout_user()


        asyncio.run(main())
        """
        _response = await self._raw_client.logout_user(request_options=request_options)
        return _response.data

    async def resend_mfa_code(
        self, entry: str, entry_type: int, usrname: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PayabliApiResponseMfaBasic:
        """
        Parameters
        ----------
        entry : str


        entry_type : int


        usrname : str


        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponseMfaBasic
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.resend_mfa_code(
                entry="Entry",
                entry_type=1,
                usrname="usrname",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.resend_mfa_code(entry, entry_type, usrname, request_options=request_options)
        return _response.data

    async def validate_mfa_user(
        self,
        *,
        mfa_code: typing.Optional[str] = OMIT,
        mfa_validation_code: typing.Optional[MfaValidationCode] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponseUserMfa:
        """
        Parameters
        ----------
        mfa_code : typing.Optional[str]

        mfa_validation_code : typing.Optional[MfaValidationCode]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PayabliApiResponseUserMfa
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.user.validate_mfa_user()


        asyncio.run(main())
        """
        _response = await self._raw_client.validate_mfa_user(
            mfa_code=mfa_code, mfa_validation_code=mfa_validation_code, request_options=request_options
        )
        return _response.data
