# 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.contacts_field import ContactsField
from ..types.file_content import FileContent
from ..types.idempotency_key import IdempotencyKey
from ..types.instrument import Instrument
from ..types.org_parent_id import OrgParentId
from ..types.orgaddress import Orgaddress
from ..types.organization_query_record import OrganizationQueryRecord
from ..types.orgcity import Orgcity
from ..types.orgcountry import Orgcountry
from ..types.orgentryname import Orgentryname
from ..types.orgidstring import Orgidstring
from ..types.orgname import Orgname
from ..types.orgstate import Orgstate
from ..types.orgtimezone import Orgtimezone
from ..types.orgtype import Orgtype
from ..types.orgwebsite import Orgwebsite
from ..types.orgzip import Orgzip
from ..types.reply_to_email import ReplyToEmail
from ..types.service_cost import ServiceCost
from ..types.settings_query_record import SettingsQueryRecord
from .raw_client import AsyncRawOrganizationClient, RawOrganizationClient
from .types.add_organization_response import AddOrganizationResponse
from .types.delete_organization_response import DeleteOrganizationResponse
from .types.edit_organization_response import EditOrganizationResponse

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


class OrganizationClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawOrganizationClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawOrganizationClient
        """
        return self._raw_client

    def add_organization(
        self,
        *,
        org_name: Orgname,
        org_type: Orgtype,
        reply_to_email: ReplyToEmail,
        idempotency_key: typing.Optional[IdempotencyKey] = None,
        services: typing.Optional[typing.Sequence[ServiceCost]] = OMIT,
        billing_info: typing.Optional[Instrument] = OMIT,
        contacts: typing.Optional[ContactsField] = OMIT,
        has_billing: typing.Optional[bool] = OMIT,
        has_residual: typing.Optional[bool] = OMIT,
        org_address: typing.Optional[Orgaddress] = OMIT,
        org_city: typing.Optional[Orgcity] = OMIT,
        org_country: typing.Optional[Orgcountry] = OMIT,
        org_entry_name: typing.Optional[Orgentryname] = OMIT,
        org_id: typing.Optional[Orgidstring] = OMIT,
        org_logo: typing.Optional[FileContent] = OMIT,
        org_parent_id: typing.Optional[OrgParentId] = OMIT,
        org_state: typing.Optional[Orgstate] = OMIT,
        org_timezone: typing.Optional[Orgtimezone] = OMIT,
        org_website: typing.Optional[Orgwebsite] = OMIT,
        org_zip: typing.Optional[Orgzip] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AddOrganizationResponse:
        """
        Creates an organization under a parent organization. This is also referred to as a suborganization.

        Parameters
        ----------
        org_name : Orgname

        org_type : Orgtype

        reply_to_email : ReplyToEmail

        idempotency_key : typing.Optional[IdempotencyKey]

        services : typing.Optional[typing.Sequence[ServiceCost]]

        billing_info : typing.Optional[Instrument]

        contacts : typing.Optional[ContactsField]

        has_billing : typing.Optional[bool]

        has_residual : typing.Optional[bool]

        org_address : typing.Optional[Orgaddress]

        org_city : typing.Optional[Orgcity]

        org_country : typing.Optional[Orgcountry]

        org_entry_name : typing.Optional[Orgentryname]

        org_id : typing.Optional[Orgidstring]

        org_logo : typing.Optional[FileContent]

        org_parent_id : typing.Optional[OrgParentId]

        org_state : typing.Optional[Orgstate]

        org_timezone : typing.Optional[Orgtimezone]

        org_website : typing.Optional[Orgwebsite]

        org_zip : typing.Optional[Orgzip]

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

        Returns
        -------
        AddOrganizationResponse
            Success.

        Examples
        --------
        from payabli import Contacts, FileContent, Instrument, payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.organization.add_organization(
            idempotency_key="6B29FC40-CA47-1067-B31D-00DD010662DA",
            billing_info=Instrument(
                ach_account="123123123",
                ach_routing="123123123",
                billing_address="123 Walnut Street",
                billing_city="Johnson City",
                billing_country="US",
                billing_state="TN",
                billing_zip="37615",
            ),
            contacts=[
                Contacts(
                    contact_email="herman@hermanscoatings.com",
                    contact_name="Herman Martinez",
                    contact_phone="3055550000",
                    contact_title="Owner",
                )
            ],
            has_billing=True,
            has_residual=True,
            org_address="123 Walnut Street",
            org_city="Johnson City",
            org_country="US",
            org_entry_name="pilgrim-planner",
            org_id="123",
            org_logo=FileContent(
                f_content="TXkgdGVzdCBmaWxlHJ==...",
                filename="my-doc.pdf",
                ftype="pdf",
                furl="https://mysite.com/my-doc.pdf",
            ),
            org_name="Pilgrim Planner",
            org_parent_id=236,
            org_state="TN",
            org_timezone=-5,
            org_type=0,
            org_website="www.pilgrimageplanner.com",
            org_zip="37615",
            reply_to_email="email@example.com",
        )
        """
        _response = self._raw_client.add_organization(
            org_name=org_name,
            org_type=org_type,
            reply_to_email=reply_to_email,
            idempotency_key=idempotency_key,
            services=services,
            billing_info=billing_info,
            contacts=contacts,
            has_billing=has_billing,
            has_residual=has_residual,
            org_address=org_address,
            org_city=org_city,
            org_country=org_country,
            org_entry_name=org_entry_name,
            org_id=org_id,
            org_logo=org_logo,
            org_parent_id=org_parent_id,
            org_state=org_state,
            org_timezone=org_timezone,
            org_website=org_website,
            org_zip=org_zip,
            request_options=request_options,
        )
        return _response.data

    def delete_organization(
        self, org_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> DeleteOrganizationResponse:
        """
        Delete an organization by ID.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

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

        Returns
        -------
        DeleteOrganizationResponse
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.organization.delete_organization(
            org_id=123,
        )
        """
        _response = self._raw_client.delete_organization(org_id, request_options=request_options)
        return _response.data

    def edit_organization(
        self,
        org_id: int,
        *,
        services: typing.Optional[typing.Sequence[ServiceCost]] = OMIT,
        billing_info: typing.Optional[Instrument] = OMIT,
        contacts: typing.Optional[ContactsField] = OMIT,
        has_billing: typing.Optional[bool] = OMIT,
        has_residual: typing.Optional[bool] = OMIT,
        org_address: typing.Optional[Orgaddress] = OMIT,
        org_city: typing.Optional[Orgcity] = OMIT,
        org_country: typing.Optional[Orgcountry] = OMIT,
        org_entry_name: typing.Optional[Orgentryname] = OMIT,
        organization_data_org_id: typing.Optional[Orgidstring] = OMIT,
        org_logo: typing.Optional[FileContent] = OMIT,
        org_name: typing.Optional[Orgname] = OMIT,
        org_parent_id: typing.Optional[OrgParentId] = OMIT,
        org_state: typing.Optional[Orgstate] = OMIT,
        org_timezone: typing.Optional[Orgtimezone] = OMIT,
        org_type: typing.Optional[Orgtype] = OMIT,
        org_website: typing.Optional[Orgwebsite] = OMIT,
        org_zip: typing.Optional[Orgzip] = OMIT,
        reply_to_email: typing.Optional[ReplyToEmail] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> EditOrganizationResponse:
        """
        Updates an organization's details by ID.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        services : typing.Optional[typing.Sequence[ServiceCost]]

        billing_info : typing.Optional[Instrument]

        contacts : typing.Optional[ContactsField]

        has_billing : typing.Optional[bool]

        has_residual : typing.Optional[bool]

        org_address : typing.Optional[Orgaddress]

        org_city : typing.Optional[Orgcity]

        org_country : typing.Optional[Orgcountry]

        org_entry_name : typing.Optional[Orgentryname]

        organization_data_org_id : typing.Optional[Orgidstring]

        org_logo : typing.Optional[FileContent]

        org_name : typing.Optional[Orgname]

        org_parent_id : typing.Optional[OrgParentId]

        org_state : typing.Optional[Orgstate]

        org_timezone : typing.Optional[Orgtimezone]

        org_type : typing.Optional[Orgtype]

        org_website : typing.Optional[Orgwebsite]

        org_zip : typing.Optional[Orgzip]

        reply_to_email : typing.Optional[ReplyToEmail]

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

        Returns
        -------
        EditOrganizationResponse
            Success

        Examples
        --------
        from payabli import Contacts, payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.organization.edit_organization(
            org_id=123,
            contacts=[
                Contacts(
                    contact_email="herman@hermanscoatings.com",
                    contact_name="Herman Martinez",
                    contact_phone="3055550000",
                    contact_title="Owner",
                )
            ],
            org_address="123 Walnut Street",
            org_city="Johnson City",
            org_country="US",
            org_entry_name="pilgrim-planner",
            organization_data_org_id="123",
            org_name="Pilgrim Planner",
            org_state="TN",
            org_timezone=-5,
            org_type=0,
            org_website="www.pilgrimageplanner.com",
            org_zip="37615",
        )
        """
        _response = self._raw_client.edit_organization(
            org_id,
            services=services,
            billing_info=billing_info,
            contacts=contacts,
            has_billing=has_billing,
            has_residual=has_residual,
            org_address=org_address,
            org_city=org_city,
            org_country=org_country,
            org_entry_name=org_entry_name,
            organization_data_org_id=organization_data_org_id,
            org_logo=org_logo,
            org_name=org_name,
            org_parent_id=org_parent_id,
            org_state=org_state,
            org_timezone=org_timezone,
            org_type=org_type,
            org_website=org_website,
            org_zip=org_zip,
            reply_to_email=reply_to_email,
            request_options=request_options,
        )
        return _response.data

    def get_basic_organization(
        self, entry: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> OrganizationQueryRecord:
        """
        Gets an organization's basic information by entry name (entrypoint identifier).

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

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

        Returns
        -------
        OrganizationQueryRecord
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.organization.get_basic_organization(
            entry="8cfec329267",
        )
        """
        _response = self._raw_client.get_basic_organization(entry, request_options=request_options)
        return _response.data

    def get_basic_organization_by_id(
        self, org_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> OrganizationQueryRecord:
        """
        Gets an organizations basic details by org ID.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

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

        Returns
        -------
        OrganizationQueryRecord
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.organization.get_basic_organization_by_id(
            org_id=123,
        )
        """
        _response = self._raw_client.get_basic_organization_by_id(org_id, request_options=request_options)
        return _response.data

    def get_organization(
        self, org_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> OrganizationQueryRecord:
        """
        Retrieves details for an organization by ID.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

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

        Returns
        -------
        OrganizationQueryRecord
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.organization.get_organization(
            org_id=123,
        )
        """
        _response = self._raw_client.get_organization(org_id, request_options=request_options)
        return _response.data

    def get_settings_organization(
        self, org_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SettingsQueryRecord:
        """
        Retrieves an organization's settings.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

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

        Returns
        -------
        SettingsQueryRecord
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.organization.get_settings_organization(
            org_id=123,
        )
        """
        _response = self._raw_client.get_settings_organization(org_id, request_options=request_options)
        return _response.data


class AsyncOrganizationClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawOrganizationClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawOrganizationClient
        """
        return self._raw_client

    async def add_organization(
        self,
        *,
        org_name: Orgname,
        org_type: Orgtype,
        reply_to_email: ReplyToEmail,
        idempotency_key: typing.Optional[IdempotencyKey] = None,
        services: typing.Optional[typing.Sequence[ServiceCost]] = OMIT,
        billing_info: typing.Optional[Instrument] = OMIT,
        contacts: typing.Optional[ContactsField] = OMIT,
        has_billing: typing.Optional[bool] = OMIT,
        has_residual: typing.Optional[bool] = OMIT,
        org_address: typing.Optional[Orgaddress] = OMIT,
        org_city: typing.Optional[Orgcity] = OMIT,
        org_country: typing.Optional[Orgcountry] = OMIT,
        org_entry_name: typing.Optional[Orgentryname] = OMIT,
        org_id: typing.Optional[Orgidstring] = OMIT,
        org_logo: typing.Optional[FileContent] = OMIT,
        org_parent_id: typing.Optional[OrgParentId] = OMIT,
        org_state: typing.Optional[Orgstate] = OMIT,
        org_timezone: typing.Optional[Orgtimezone] = OMIT,
        org_website: typing.Optional[Orgwebsite] = OMIT,
        org_zip: typing.Optional[Orgzip] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AddOrganizationResponse:
        """
        Creates an organization under a parent organization. This is also referred to as a suborganization.

        Parameters
        ----------
        org_name : Orgname

        org_type : Orgtype

        reply_to_email : ReplyToEmail

        idempotency_key : typing.Optional[IdempotencyKey]

        services : typing.Optional[typing.Sequence[ServiceCost]]

        billing_info : typing.Optional[Instrument]

        contacts : typing.Optional[ContactsField]

        has_billing : typing.Optional[bool]

        has_residual : typing.Optional[bool]

        org_address : typing.Optional[Orgaddress]

        org_city : typing.Optional[Orgcity]

        org_country : typing.Optional[Orgcountry]

        org_entry_name : typing.Optional[Orgentryname]

        org_id : typing.Optional[Orgidstring]

        org_logo : typing.Optional[FileContent]

        org_parent_id : typing.Optional[OrgParentId]

        org_state : typing.Optional[Orgstate]

        org_timezone : typing.Optional[Orgtimezone]

        org_website : typing.Optional[Orgwebsite]

        org_zip : typing.Optional[Orgzip]

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

        Returns
        -------
        AddOrganizationResponse
            Success.

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli, Contacts, FileContent, Instrument

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.organization.add_organization(
                idempotency_key="6B29FC40-CA47-1067-B31D-00DD010662DA",
                billing_info=Instrument(
                    ach_account="123123123",
                    ach_routing="123123123",
                    billing_address="123 Walnut Street",
                    billing_city="Johnson City",
                    billing_country="US",
                    billing_state="TN",
                    billing_zip="37615",
                ),
                contacts=[
                    Contacts(
                        contact_email="herman@hermanscoatings.com",
                        contact_name="Herman Martinez",
                        contact_phone="3055550000",
                        contact_title="Owner",
                    )
                ],
                has_billing=True,
                has_residual=True,
                org_address="123 Walnut Street",
                org_city="Johnson City",
                org_country="US",
                org_entry_name="pilgrim-planner",
                org_id="123",
                org_logo=FileContent(
                    f_content="TXkgdGVzdCBmaWxlHJ==...",
                    filename="my-doc.pdf",
                    ftype="pdf",
                    furl="https://mysite.com/my-doc.pdf",
                ),
                org_name="Pilgrim Planner",
                org_parent_id=236,
                org_state="TN",
                org_timezone=-5,
                org_type=0,
                org_website="www.pilgrimageplanner.com",
                org_zip="37615",
                reply_to_email="email@example.com",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.add_organization(
            org_name=org_name,
            org_type=org_type,
            reply_to_email=reply_to_email,
            idempotency_key=idempotency_key,
            services=services,
            billing_info=billing_info,
            contacts=contacts,
            has_billing=has_billing,
            has_residual=has_residual,
            org_address=org_address,
            org_city=org_city,
            org_country=org_country,
            org_entry_name=org_entry_name,
            org_id=org_id,
            org_logo=org_logo,
            org_parent_id=org_parent_id,
            org_state=org_state,
            org_timezone=org_timezone,
            org_website=org_website,
            org_zip=org_zip,
            request_options=request_options,
        )
        return _response.data

    async def delete_organization(
        self, org_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> DeleteOrganizationResponse:
        """
        Delete an organization by ID.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

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

        Returns
        -------
        DeleteOrganizationResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.organization.delete_organization(
                org_id=123,
            )


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

    async def edit_organization(
        self,
        org_id: int,
        *,
        services: typing.Optional[typing.Sequence[ServiceCost]] = OMIT,
        billing_info: typing.Optional[Instrument] = OMIT,
        contacts: typing.Optional[ContactsField] = OMIT,
        has_billing: typing.Optional[bool] = OMIT,
        has_residual: typing.Optional[bool] = OMIT,
        org_address: typing.Optional[Orgaddress] = OMIT,
        org_city: typing.Optional[Orgcity] = OMIT,
        org_country: typing.Optional[Orgcountry] = OMIT,
        org_entry_name: typing.Optional[Orgentryname] = OMIT,
        organization_data_org_id: typing.Optional[Orgidstring] = OMIT,
        org_logo: typing.Optional[FileContent] = OMIT,
        org_name: typing.Optional[Orgname] = OMIT,
        org_parent_id: typing.Optional[OrgParentId] = OMIT,
        org_state: typing.Optional[Orgstate] = OMIT,
        org_timezone: typing.Optional[Orgtimezone] = OMIT,
        org_type: typing.Optional[Orgtype] = OMIT,
        org_website: typing.Optional[Orgwebsite] = OMIT,
        org_zip: typing.Optional[Orgzip] = OMIT,
        reply_to_email: typing.Optional[ReplyToEmail] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> EditOrganizationResponse:
        """
        Updates an organization's details by ID.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        services : typing.Optional[typing.Sequence[ServiceCost]]

        billing_info : typing.Optional[Instrument]

        contacts : typing.Optional[ContactsField]

        has_billing : typing.Optional[bool]

        has_residual : typing.Optional[bool]

        org_address : typing.Optional[Orgaddress]

        org_city : typing.Optional[Orgcity]

        org_country : typing.Optional[Orgcountry]

        org_entry_name : typing.Optional[Orgentryname]

        organization_data_org_id : typing.Optional[Orgidstring]

        org_logo : typing.Optional[FileContent]

        org_name : typing.Optional[Orgname]

        org_parent_id : typing.Optional[OrgParentId]

        org_state : typing.Optional[Orgstate]

        org_timezone : typing.Optional[Orgtimezone]

        org_type : typing.Optional[Orgtype]

        org_website : typing.Optional[Orgwebsite]

        org_zip : typing.Optional[Orgzip]

        reply_to_email : typing.Optional[ReplyToEmail]

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

        Returns
        -------
        EditOrganizationResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli, Contacts

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.organization.edit_organization(
                org_id=123,
                contacts=[
                    Contacts(
                        contact_email="herman@hermanscoatings.com",
                        contact_name="Herman Martinez",
                        contact_phone="3055550000",
                        contact_title="Owner",
                    )
                ],
                org_address="123 Walnut Street",
                org_city="Johnson City",
                org_country="US",
                org_entry_name="pilgrim-planner",
                organization_data_org_id="123",
                org_name="Pilgrim Planner",
                org_state="TN",
                org_timezone=-5,
                org_type=0,
                org_website="www.pilgrimageplanner.com",
                org_zip="37615",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.edit_organization(
            org_id,
            services=services,
            billing_info=billing_info,
            contacts=contacts,
            has_billing=has_billing,
            has_residual=has_residual,
            org_address=org_address,
            org_city=org_city,
            org_country=org_country,
            org_entry_name=org_entry_name,
            organization_data_org_id=organization_data_org_id,
            org_logo=org_logo,
            org_name=org_name,
            org_parent_id=org_parent_id,
            org_state=org_state,
            org_timezone=org_timezone,
            org_type=org_type,
            org_website=org_website,
            org_zip=org_zip,
            reply_to_email=reply_to_email,
            request_options=request_options,
        )
        return _response.data

    async def get_basic_organization(
        self, entry: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> OrganizationQueryRecord:
        """
        Gets an organization's basic information by entry name (entrypoint identifier).

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

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

        Returns
        -------
        OrganizationQueryRecord
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.organization.get_basic_organization(
                entry="8cfec329267",
            )


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

    async def get_basic_organization_by_id(
        self, org_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> OrganizationQueryRecord:
        """
        Gets an organizations basic details by org ID.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

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

        Returns
        -------
        OrganizationQueryRecord
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.organization.get_basic_organization_by_id(
                org_id=123,
            )


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

    async def get_organization(
        self, org_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> OrganizationQueryRecord:
        """
        Retrieves details for an organization by ID.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

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

        Returns
        -------
        OrganizationQueryRecord
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.organization.get_organization(
                org_id=123,
            )


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

    async def get_settings_organization(
        self, org_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SettingsQueryRecord:
        """
        Retrieves an organization's settings.

        Parameters
        ----------
        org_id : int
            The numeric identifier for organization, assigned by Payabli.

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

        Returns
        -------
        SettingsQueryRecord
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.organization.get_settings_organization(
                org_id=123,
            )


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