| 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.test_helpers.issuing._authorization_service import ( |
| 8 |
AuthorizationService as AuthorizationService, |
| 9 |
) |
| 10 |
from stripe.test_helpers.issuing._card_service import ( |
| 11 |
CardService as CardService, |
| 12 |
) |
| 13 |
from stripe.test_helpers.issuing._personalization_design_service import ( |
| 14 |
PersonalizationDesignService as PersonalizationDesignService, |
| 15 |
) |
| 16 |
from stripe.test_helpers.issuing._transaction_service import ( |
| 17 |
TransactionService as TransactionService, |
| 18 |
) |
| 19 |
|
| 20 |
# name -> (import_target, is_submodule) |
| 21 |
_import_map = { |
| 22 |
"AuthorizationService": ( |
| 23 |
"stripe.test_helpers.issuing._authorization_service", |
| 24 |
False, |
| 25 |
), |
| 26 |
"CardService": ("stripe.test_helpers.issuing._card_service", False), |
| 27 |
"PersonalizationDesignService": ( |
| 28 |
"stripe.test_helpers.issuing._personalization_design_service", |
| 29 |
False, |
| 30 |
), |
| 31 |
"TransactionService": ( |
| 32 |
"stripe.test_helpers.issuing._transaction_service", |
| 33 |
False, |
| 34 |
), |
| 35 |
} |
| 36 |
if not TYPE_CHECKING: |
| 37 |
|
| 38 |
def __getattr__(name): |
| 39 |
try: |
| 40 |
target, is_submodule = _import_map[name] |
| 41 |
module = import_module(target) |
| 42 |
if is_submodule: |
| 43 |
return module |
| 44 |
|
| 45 |
return getattr( |
| 46 |
module, |
| 47 |
name, |
| 48 |
) |
| 49 |
except KeyError: |
| 50 |
raise AttributeError() |