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

# isort: skip_file

import typing
from importlib import import_module

if typing.TYPE_CHECKING:
    from .delete_invoices_id_approvers_response import DeleteInvoicesIdApproversResponse
    from .get_invoices_id_approvers_response import GetInvoicesIdApproversResponse
    from .get_invoices_root_request_payment_status import GetInvoicesRootRequestPaymentStatus
    from .get_invoices_root_request_status import GetInvoicesRootRequestStatus
    from .get_invoices_root_response import GetInvoicesRootResponse
    from .get_invoices_uploads_response import GetInvoicesUploadsResponse
    from .patch_invoices_id_request_items_item import PatchInvoicesIdRequestItemsItem
    from .patch_invoices_id_request_type import PatchInvoicesIdRequestType
    from .post_invoices_id_approve_response import PostInvoicesIdApproveResponse
    from .post_invoices_id_approve_response_invoice import PostInvoicesIdApproveResponseInvoice
    from .post_invoices_id_approvers_response import PostInvoicesIdApproversResponse
    from .post_invoices_id_flag_response import PostInvoicesIdFlagResponse
    from .post_invoices_id_flag_response_invoice import PostInvoicesIdFlagResponseInvoice
    from .post_invoices_mark_exported_request_invoices_item import PostInvoicesMarkExportedRequestInvoicesItem
    from .post_invoices_mark_unexported_request_invoices_item import PostInvoicesMarkUnexportedRequestInvoicesItem
    from .post_invoices_root_request_items_item import PostInvoicesRootRequestItemsItem
    from .post_invoices_root_request_type import PostInvoicesRootRequestType
    from .post_invoices_root_response import PostInvoicesRootResponse
    from .post_invoices_root_response_items import PostInvoicesRootResponseItems
_dynamic_imports: typing.Dict[str, str] = {
    "DeleteInvoicesIdApproversResponse": ".delete_invoices_id_approvers_response",
    "GetInvoicesIdApproversResponse": ".get_invoices_id_approvers_response",
    "GetInvoicesRootRequestPaymentStatus": ".get_invoices_root_request_payment_status",
    "GetInvoicesRootRequestStatus": ".get_invoices_root_request_status",
    "GetInvoicesRootResponse": ".get_invoices_root_response",
    "GetInvoicesUploadsResponse": ".get_invoices_uploads_response",
    "PatchInvoicesIdRequestItemsItem": ".patch_invoices_id_request_items_item",
    "PatchInvoicesIdRequestType": ".patch_invoices_id_request_type",
    "PostInvoicesIdApproveResponse": ".post_invoices_id_approve_response",
    "PostInvoicesIdApproveResponseInvoice": ".post_invoices_id_approve_response_invoice",
    "PostInvoicesIdApproversResponse": ".post_invoices_id_approvers_response",
    "PostInvoicesIdFlagResponse": ".post_invoices_id_flag_response",
    "PostInvoicesIdFlagResponseInvoice": ".post_invoices_id_flag_response_invoice",
    "PostInvoicesMarkExportedRequestInvoicesItem": ".post_invoices_mark_exported_request_invoices_item",
    "PostInvoicesMarkUnexportedRequestInvoicesItem": ".post_invoices_mark_unexported_request_invoices_item",
    "PostInvoicesRootRequestItemsItem": ".post_invoices_root_request_items_item",
    "PostInvoicesRootRequestType": ".post_invoices_root_request_type",
    "PostInvoicesRootResponse": ".post_invoices_root_response",
    "PostInvoicesRootResponseItems": ".post_invoices_root_response_items",
}


def __getattr__(attr_name: str) -> typing.Any:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
    try:
        module = import_module(module_name, __package__)
        if module_name == f".{attr_name}":
            return module
        else:
            return getattr(module, attr_name)
    except ImportError as e:
        raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
    except AttributeError as e:
        raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
    lazy_attrs = list(_dynamic_imports.keys())
    return sorted(lazy_attrs)


__all__ = [
    "DeleteInvoicesIdApproversResponse",
    "GetInvoicesIdApproversResponse",
    "GetInvoicesRootRequestPaymentStatus",
    "GetInvoicesRootRequestStatus",
    "GetInvoicesRootResponse",
    "GetInvoicesUploadsResponse",
    "PatchInvoicesIdRequestItemsItem",
    "PatchInvoicesIdRequestType",
    "PostInvoicesIdApproveResponse",
    "PostInvoicesIdApproveResponseInvoice",
    "PostInvoicesIdApproversResponse",
    "PostInvoicesIdFlagResponse",
    "PostInvoicesIdFlagResponseInvoice",
    "PostInvoicesMarkExportedRequestInvoicesItem",
    "PostInvoicesMarkUnexportedRequestInvoicesItem",
    "PostInvoicesRootRequestItemsItem",
    "PostInvoicesRootRequestType",
    "PostInvoicesRootResponse",
    "PostInvoicesRootResponseItems",
]
