| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from importlib import import_module |
| 4 |
from typing_extensions import TYPE_CHECKING |
| 5 |
|
| 6 |
if TYPE_CHECKING: |
| 7 |
from stripe.identity._verification_report import ( |
| 8 |
VerificationReport as VerificationReport, |
| 9 |
) |
| 10 |
from stripe.identity._verification_report_service import ( |
| 11 |
VerificationReportService as VerificationReportService, |
| 12 |
) |
| 13 |
from stripe.identity._verification_session import ( |
| 14 |
VerificationSession as VerificationSession, |
| 15 |
) |
| 16 |
from stripe.identity._verification_session_service import ( |
| 17 |
VerificationSessionService as VerificationSessionService, |
| 18 |
) |
| 19 |
|
| 20 |
# name -> (import_target, is_submodule) |
| 21 |
_import_map = { |
| 22 |
"VerificationReport": ("stripe.identity._verification_report", False), |
| 23 |
"VerificationReportService": ( |
| 24 |
"stripe.identity._verification_report_service", |
| 25 |
False, |
| 26 |
), |
| 27 |
"VerificationSession": ("stripe.identity._verification_session", False), |
| 28 |
"VerificationSessionService": ( |
| 29 |
"stripe.identity._verification_session_service", |
| 30 |
False, |
| 31 |
), |
| 32 |
} |
| 33 |
if not TYPE_CHECKING: |
| 34 |
|
| 35 |
def __getattr__(name): |
| 36 |
try: |
| 37 |
target, is_submodule = _import_map[name] |
| 38 |
module = import_module(target) |
| 39 |
if is_submodule: |
| 40 |
return module |
| 41 |
|
| 42 |
return getattr( |
| 43 |
module, |
| 44 |
name, |
| 45 |
) |
| 46 |
except KeyError: |
| 47 |
raise AttributeError() |