| 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.params.v2 import billing as billing, core as core |
| 8 |
|
| 9 |
# name -> (import_target, is_submodule) |
| 10 |
_import_map = { |
| 11 |
"billing": ("stripe.params.v2.billing", True), |
| 12 |
"core": ("stripe.params.v2.core", True), |
| 13 |
} |
| 14 |
if not TYPE_CHECKING: |
| 15 |
|
| 16 |
def __getattr__(name): |
| 17 |
try: |
| 18 |
target, is_submodule = _import_map[name] |
| 19 |
module = import_module(target) |
| 20 |
if is_submodule: |
| 21 |
return module |
| 22 |
|
| 23 |
return getattr( |
| 24 |
module, |
| 25 |
name, |
| 26 |
) |
| 27 |
except KeyError: |
| 28 |
raise AttributeError() |