# 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.cascade import Cascade
from ..types.configure_apple_pay_organization_api_response import ConfigureApplePayOrganizationApiResponse
from ..types.configure_apple_paypoint_api_response import ConfigureApplePaypointApiResponse
from ..types.configure_google_paypoint_api_response import ConfigureGooglePaypointApiResponse
from ..types.entry import Entry
from ..types.is_enabled import IsEnabled
from ..types.organization_id import OrganizationId
from .raw_client import AsyncRawWalletClient, RawWalletClient

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


class WalletClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawWalletClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawWalletClient
        """
        return self._raw_client

    def configure_apple_pay_organization(
        self,
        *,
        cascade: typing.Optional[Cascade] = OMIT,
        is_enabled: typing.Optional[IsEnabled] = OMIT,
        org_id: typing.Optional[OrganizationId] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ConfigureApplePayOrganizationApiResponse:
        """
        Configure and activate Apple Pay for a Payabli organization

        Parameters
        ----------
        cascade : typing.Optional[Cascade]

        is_enabled : typing.Optional[IsEnabled]

        org_id : typing.Optional[OrganizationId]

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

        Returns
        -------
        ConfigureApplePayOrganizationApiResponse
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.wallet.configure_apple_pay_organization(
            cascade=True,
            is_enabled=True,
            org_id=901,
        )
        """
        _response = self._raw_client.configure_apple_pay_organization(
            cascade=cascade, is_enabled=is_enabled, org_id=org_id, request_options=request_options
        )
        return _response.data

    def configure_apple_pay_paypoint(
        self,
        *,
        entry: typing.Optional[Entry] = OMIT,
        is_enabled: typing.Optional[IsEnabled] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ConfigureApplePaypointApiResponse:
        """
        Configure and activate Apple Pay for a Payabli paypoint

        Parameters
        ----------
        entry : typing.Optional[Entry]

        is_enabled : typing.Optional[IsEnabled]
            When `true`, Apple Pay is enabled.

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

        Returns
        -------
        ConfigureApplePaypointApiResponse
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.wallet.configure_apple_pay_paypoint(
            entry="8cfec329267",
            is_enabled=True,
        )
        """
        _response = self._raw_client.configure_apple_pay_paypoint(
            entry=entry, is_enabled=is_enabled, request_options=request_options
        )
        return _response.data

    def configure_google_pay_organization(
        self,
        *,
        cascade: typing.Optional[Cascade] = OMIT,
        is_enabled: typing.Optional[IsEnabled] = OMIT,
        org_id: typing.Optional[OrganizationId] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ConfigureApplePayOrganizationApiResponse:
        """
        Configure and activate Google Pay for a Payabli organization

        Parameters
        ----------
        cascade : typing.Optional[Cascade]

        is_enabled : typing.Optional[IsEnabled]

        org_id : typing.Optional[OrganizationId]

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

        Returns
        -------
        ConfigureApplePayOrganizationApiResponse
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.wallet.configure_google_pay_organization(
            cascade=True,
            is_enabled=True,
            org_id=901,
        )
        """
        _response = self._raw_client.configure_google_pay_organization(
            cascade=cascade, is_enabled=is_enabled, org_id=org_id, request_options=request_options
        )
        return _response.data

    def configure_google_pay_paypoint(
        self,
        *,
        entry: typing.Optional[Entry] = OMIT,
        is_enabled: typing.Optional[IsEnabled] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ConfigureGooglePaypointApiResponse:
        """
        Configure and activate Google Pay for a Payabli paypoint

        Parameters
        ----------
        entry : typing.Optional[Entry]

        is_enabled : typing.Optional[IsEnabled]
            When `true`, Google Pay is enabled.

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

        Returns
        -------
        ConfigureGooglePaypointApiResponse
            Success

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

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.wallet.configure_google_pay_paypoint(
            entry="8cfec329267",
            is_enabled=True,
        )
        """
        _response = self._raw_client.configure_google_pay_paypoint(
            entry=entry, is_enabled=is_enabled, request_options=request_options
        )
        return _response.data


class AsyncWalletClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawWalletClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawWalletClient
        """
        return self._raw_client

    async def configure_apple_pay_organization(
        self,
        *,
        cascade: typing.Optional[Cascade] = OMIT,
        is_enabled: typing.Optional[IsEnabled] = OMIT,
        org_id: typing.Optional[OrganizationId] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ConfigureApplePayOrganizationApiResponse:
        """
        Configure and activate Apple Pay for a Payabli organization

        Parameters
        ----------
        cascade : typing.Optional[Cascade]

        is_enabled : typing.Optional[IsEnabled]

        org_id : typing.Optional[OrganizationId]

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

        Returns
        -------
        ConfigureApplePayOrganizationApiResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.wallet.configure_apple_pay_organization(
                cascade=True,
                is_enabled=True,
                org_id=901,
            )


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

    async def configure_apple_pay_paypoint(
        self,
        *,
        entry: typing.Optional[Entry] = OMIT,
        is_enabled: typing.Optional[IsEnabled] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ConfigureApplePaypointApiResponse:
        """
        Configure and activate Apple Pay for a Payabli paypoint

        Parameters
        ----------
        entry : typing.Optional[Entry]

        is_enabled : typing.Optional[IsEnabled]
            When `true`, Apple Pay is enabled.

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

        Returns
        -------
        ConfigureApplePaypointApiResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.wallet.configure_apple_pay_paypoint(
                entry="8cfec329267",
                is_enabled=True,
            )


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

    async def configure_google_pay_organization(
        self,
        *,
        cascade: typing.Optional[Cascade] = OMIT,
        is_enabled: typing.Optional[IsEnabled] = OMIT,
        org_id: typing.Optional[OrganizationId] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ConfigureApplePayOrganizationApiResponse:
        """
        Configure and activate Google Pay for a Payabli organization

        Parameters
        ----------
        cascade : typing.Optional[Cascade]

        is_enabled : typing.Optional[IsEnabled]

        org_id : typing.Optional[OrganizationId]

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

        Returns
        -------
        ConfigureApplePayOrganizationApiResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.wallet.configure_google_pay_organization(
                cascade=True,
                is_enabled=True,
                org_id=901,
            )


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

    async def configure_google_pay_paypoint(
        self,
        *,
        entry: typing.Optional[Entry] = OMIT,
        is_enabled: typing.Optional[IsEnabled] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ConfigureGooglePaypointApiResponse:
        """
        Configure and activate Google Pay for a Payabli paypoint

        Parameters
        ----------
        entry : typing.Optional[Entry]

        is_enabled : typing.Optional[IsEnabled]
            When `true`, Google Pay is enabled.

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

        Returns
        -------
        ConfigureGooglePaypointApiResponse
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.wallet.configure_google_pay_paypoint(
                entry="8cfec329267",
                is_enabled=True,
            )


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