| 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.reporting._report_run import ReportRun as ReportRun |
| 8 |
from stripe.reporting._report_run_service import ( |
| 9 |
ReportRunService as ReportRunService, |
| 10 |
) |
| 11 |
from stripe.reporting._report_type import ReportType as ReportType |
| 12 |
from stripe.reporting._report_type_service import ( |
| 13 |
ReportTypeService as ReportTypeService, |
| 14 |
) |
| 15 |
|
| 16 |
# name -> (import_target, is_submodule) |
| 17 |
_import_map = { |
| 18 |
"ReportRun": ("stripe.reporting._report_run", False), |
| 19 |
"ReportRunService": ("stripe.reporting._report_run_service", False), |
| 20 |
"ReportType": ("stripe.reporting._report_type", False), |
| 21 |
"ReportTypeService": ("stripe.reporting._report_type_service", False), |
| 22 |
} |
| 23 |
if not TYPE_CHECKING: |
| 24 |
|
| 25 |
def __getattr__(name): |
| 26 |
try: |
| 27 |
target, is_submodule = _import_map[name] |
| 28 |
module = import_module(target) |
| 29 |
if is_submodule: |
| 30 |
return module |
| 31 |
|
| 32 |
return getattr( |
| 33 |
module, |
| 34 |
name, |
| 35 |
) |
| 36 |
except KeyError: |
| 37 |
raise AttributeError() |