| 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.radar._early_fraud_warning import ( |
| 8 |
EarlyFraudWarning as EarlyFraudWarning, |
| 9 |
) |
| 10 |
from stripe.radar._early_fraud_warning_service import ( |
| 11 |
EarlyFraudWarningService as EarlyFraudWarningService, |
| 12 |
) |
| 13 |
from stripe.radar._payment_evaluation import ( |
| 14 |
PaymentEvaluation as PaymentEvaluation, |
| 15 |
) |
| 16 |
from stripe.radar._payment_evaluation_service import ( |
| 17 |
PaymentEvaluationService as PaymentEvaluationService, |
| 18 |
) |
| 19 |
from stripe.radar._value_list import ValueList as ValueList |
| 20 |
from stripe.radar._value_list_item import ValueListItem as ValueListItem |
| 21 |
from stripe.radar._value_list_item_service import ( |
| 22 |
ValueListItemService as ValueListItemService, |
| 23 |
) |
| 24 |
from stripe.radar._value_list_service import ( |
| 25 |
ValueListService as ValueListService, |
| 26 |
) |
| 27 |
|
| 28 |
# name -> (import_target, is_submodule) |
| 29 |
_import_map = { |
| 30 |
"EarlyFraudWarning": ("stripe.radar._early_fraud_warning", False), |
| 31 |
"EarlyFraudWarningService": ( |
| 32 |
"stripe.radar._early_fraud_warning_service", |
| 33 |
False, |
| 34 |
), |
| 35 |
"PaymentEvaluation": ("stripe.radar._payment_evaluation", False), |
| 36 |
"PaymentEvaluationService": ( |
| 37 |
"stripe.radar._payment_evaluation_service", |
| 38 |
False, |
| 39 |
), |
| 40 |
"ValueList": ("stripe.radar._value_list", False), |
| 41 |
"ValueListItem": ("stripe.radar._value_list_item", False), |
| 42 |
"ValueListItemService": ("stripe.radar._value_list_item_service", False), |
| 43 |
"ValueListService": ("stripe.radar._value_list_service", False), |
| 44 |
} |
| 45 |
if not TYPE_CHECKING: |
| 46 |
|
| 47 |
def __getattr__(name): |
| 48 |
try: |
| 49 |
target, is_submodule = _import_map[name] |
| 50 |
module = import_module(target) |
| 51 |
if is_submodule: |
| 52 |
return module |
| 53 |
|
| 54 |
return getattr( |
| 55 |
module, |
| 56 |
name, |
| 57 |
) |
| 58 |
except KeyError: |
| 59 |
raise AttributeError() |