# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from importlib import import_module
from typing_extensions import TYPE_CHECKING

if TYPE_CHECKING:
    from stripe.financial_connections._account import Account as Account
    from stripe.financial_connections._account_inferred_balance import (
        AccountInferredBalance as AccountInferredBalance,
    )
    from stripe.financial_connections._account_inferred_balance_service import (
        AccountInferredBalanceService as AccountInferredBalanceService,
    )
    from stripe.financial_connections._account_owner import (
        AccountOwner as AccountOwner,
    )
    from stripe.financial_connections._account_owner_service import (
        AccountOwnerService as AccountOwnerService,
    )
    from stripe.financial_connections._account_ownership import (
        AccountOwnership as AccountOwnership,
    )
    from stripe.financial_connections._account_service import (
        AccountService as AccountService,
    )
    from stripe.financial_connections._authorization import (
        Authorization as Authorization,
    )
    from stripe.financial_connections._authorization_service import (
        AuthorizationService as AuthorizationService,
    )
    from stripe.financial_connections._institution import (
        Institution as Institution,
    )
    from stripe.financial_connections._institution_service import (
        InstitutionService as InstitutionService,
    )
    from stripe.financial_connections._session import Session as Session
    from stripe.financial_connections._session_service import (
        SessionService as SessionService,
    )
    from stripe.financial_connections._transaction import (
        Transaction as Transaction,
    )
    from stripe.financial_connections._transaction_service import (
        TransactionService as TransactionService,
    )

# name -> (import_target, is_submodule)
_import_map = {
    "Account": ("stripe.financial_connections._account", False),
    "AccountInferredBalance": (
        "stripe.financial_connections._account_inferred_balance",
        False,
    ),
    "AccountInferredBalanceService": (
        "stripe.financial_connections._account_inferred_balance_service",
        False,
    ),
    "AccountOwner": ("stripe.financial_connections._account_owner", False),
    "AccountOwnerService": (
        "stripe.financial_connections._account_owner_service",
        False,
    ),
    "AccountOwnership": (
        "stripe.financial_connections._account_ownership",
        False,
    ),
    "AccountService": ("stripe.financial_connections._account_service", False),
    "Authorization": ("stripe.financial_connections._authorization", False),
    "AuthorizationService": (
        "stripe.financial_connections._authorization_service",
        False,
    ),
    "Institution": ("stripe.financial_connections._institution", False),
    "InstitutionService": (
        "stripe.financial_connections._institution_service",
        False,
    ),
    "Session": ("stripe.financial_connections._session", False),
    "SessionService": ("stripe.financial_connections._session_service", False),
    "Transaction": ("stripe.financial_connections._transaction", False),
    "TransactionService": (
        "stripe.financial_connections._transaction_service",
        False,
    ),
}
if not TYPE_CHECKING:

    def __getattr__(name):
        try:
            target, is_submodule = _import_map[name]
            module = import_module(target)
            if is_submodule:
                return module

            return getattr(
                module,
                name,
            )
        except KeyError:
            raise AttributeError()
