| 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.billing._alert_activate_params import ( |
| 8 |
AlertActivateParams as AlertActivateParams, |
| 9 |
) |
| 10 |
from stripe.params.billing._alert_archive_params import ( |
| 11 |
AlertArchiveParams as AlertArchiveParams, |
| 12 |
) |
| 13 |
from stripe.params.billing._alert_create_params import ( |
| 14 |
AlertCreateParams as AlertCreateParams, |
| 15 |
AlertCreateParamsUsageThreshold as AlertCreateParamsUsageThreshold, |
| 16 |
AlertCreateParamsUsageThresholdFilter as AlertCreateParamsUsageThresholdFilter, |
| 17 |
) |
| 18 |
from stripe.params.billing._alert_deactivate_params import ( |
| 19 |
AlertDeactivateParams as AlertDeactivateParams, |
| 20 |
) |
| 21 |
from stripe.params.billing._alert_list_params import ( |
| 22 |
AlertListParams as AlertListParams, |
| 23 |
) |
| 24 |
from stripe.params.billing._alert_retrieve_params import ( |
| 25 |
AlertRetrieveParams as AlertRetrieveParams, |
| 26 |
) |
| 27 |
from stripe.params.billing._credit_balance_summary_retrieve_params import ( |
| 28 |
CreditBalanceSummaryRetrieveParams as CreditBalanceSummaryRetrieveParams, |
| 29 |
CreditBalanceSummaryRetrieveParamsFilter as CreditBalanceSummaryRetrieveParamsFilter, |
| 30 |
CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope as CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope, |
| 31 |
CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice as CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice, |
| 32 |
) |
| 33 |
from stripe.params.billing._credit_balance_transaction_list_params import ( |
| 34 |
CreditBalanceTransactionListParams as CreditBalanceTransactionListParams, |
| 35 |
) |
| 36 |
from stripe.params.billing._credit_balance_transaction_retrieve_params import ( |
| 37 |
CreditBalanceTransactionRetrieveParams as CreditBalanceTransactionRetrieveParams, |
| 38 |
) |
| 39 |
from stripe.params.billing._credit_grant_create_params import ( |
| 40 |
CreditGrantCreateParams as CreditGrantCreateParams, |
| 41 |
CreditGrantCreateParamsAmount as CreditGrantCreateParamsAmount, |
| 42 |
CreditGrantCreateParamsAmountMonetary as CreditGrantCreateParamsAmountMonetary, |
| 43 |
CreditGrantCreateParamsApplicabilityConfig as CreditGrantCreateParamsApplicabilityConfig, |
| 44 |
CreditGrantCreateParamsApplicabilityConfigScope as CreditGrantCreateParamsApplicabilityConfigScope, |
| 45 |
CreditGrantCreateParamsApplicabilityConfigScopePrice as CreditGrantCreateParamsApplicabilityConfigScopePrice, |
| 46 |
) |
| 47 |
from stripe.params.billing._credit_grant_expire_params import ( |
| 48 |
CreditGrantExpireParams as CreditGrantExpireParams, |
| 49 |
) |
| 50 |
from stripe.params.billing._credit_grant_list_params import ( |
| 51 |
CreditGrantListParams as CreditGrantListParams, |
| 52 |
) |
| 53 |
from stripe.params.billing._credit_grant_modify_params import ( |
| 54 |
CreditGrantModifyParams as CreditGrantModifyParams, |
| 55 |
) |
| 56 |
from stripe.params.billing._credit_grant_retrieve_params import ( |
| 57 |
CreditGrantRetrieveParams as CreditGrantRetrieveParams, |
| 58 |
) |
| 59 |
from stripe.params.billing._credit_grant_update_params import ( |
| 60 |
CreditGrantUpdateParams as CreditGrantUpdateParams, |
| 61 |
) |
| 62 |
from stripe.params.billing._credit_grant_void_grant_params import ( |
| 63 |
CreditGrantVoidGrantParams as CreditGrantVoidGrantParams, |
| 64 |
) |
| 65 |
from stripe.params.billing._meter_create_params import ( |
| 66 |
MeterCreateParams as MeterCreateParams, |
| 67 |
MeterCreateParamsCustomerMapping as MeterCreateParamsCustomerMapping, |
| 68 |
MeterCreateParamsDefaultAggregation as MeterCreateParamsDefaultAggregation, |
| 69 |
MeterCreateParamsValueSettings as MeterCreateParamsValueSettings, |
| 70 |
) |
| 71 |
from stripe.params.billing._meter_deactivate_params import ( |
| 72 |
MeterDeactivateParams as MeterDeactivateParams, |
| 73 |
) |
| 74 |
from stripe.params.billing._meter_event_adjustment_create_params import ( |
| 75 |
MeterEventAdjustmentCreateParams as MeterEventAdjustmentCreateParams, |
| 76 |
MeterEventAdjustmentCreateParamsCancel as MeterEventAdjustmentCreateParamsCancel, |
| 77 |
) |
| 78 |
from stripe.params.billing._meter_event_create_params import ( |
| 79 |
MeterEventCreateParams as MeterEventCreateParams, |
| 80 |
) |
| 81 |
from stripe.params.billing._meter_event_summary_list_params import ( |
| 82 |
MeterEventSummaryListParams as MeterEventSummaryListParams, |
| 83 |
) |
| 84 |
from stripe.params.billing._meter_list_event_summaries_params import ( |
| 85 |
MeterListEventSummariesParams as MeterListEventSummariesParams, |
| 86 |
) |
| 87 |
from stripe.params.billing._meter_list_params import ( |
| 88 |
MeterListParams as MeterListParams, |
| 89 |
) |
| 90 |
from stripe.params.billing._meter_modify_params import ( |
| 91 |
MeterModifyParams as MeterModifyParams, |
| 92 |
) |
| 93 |
from stripe.params.billing._meter_reactivate_params import ( |
| 94 |
MeterReactivateParams as MeterReactivateParams, |
| 95 |
) |
| 96 |
from stripe.params.billing._meter_retrieve_params import ( |
| 97 |
MeterRetrieveParams as MeterRetrieveParams, |
| 98 |
) |
| 99 |
from stripe.params.billing._meter_update_params import ( |
| 100 |
MeterUpdateParams as MeterUpdateParams, |
| 101 |
) |
| 102 |
|
| 103 |
# name -> (import_target, is_submodule) |
| 104 |
_import_map = { |
| 105 |
"AlertActivateParams": ( |
| 106 |
"stripe.params.billing._alert_activate_params", |
| 107 |
False, |
| 108 |
), |
| 109 |
"AlertArchiveParams": ( |
| 110 |
"stripe.params.billing._alert_archive_params", |
| 111 |
False, |
| 112 |
), |
| 113 |
"AlertCreateParams": ("stripe.params.billing._alert_create_params", False), |
| 114 |
"AlertCreateParamsUsageThreshold": ( |
| 115 |
"stripe.params.billing._alert_create_params", |
| 116 |
False, |
| 117 |
), |
| 118 |
"AlertCreateParamsUsageThresholdFilter": ( |
| 119 |
"stripe.params.billing._alert_create_params", |
| 120 |
False, |
| 121 |
), |
| 122 |
"AlertDeactivateParams": ( |
| 123 |
"stripe.params.billing._alert_deactivate_params", |
| 124 |
False, |
| 125 |
), |
| 126 |
"AlertListParams": ("stripe.params.billing._alert_list_params", False), |
| 127 |
"AlertRetrieveParams": ( |
| 128 |
"stripe.params.billing._alert_retrieve_params", |
| 129 |
False, |
| 130 |
), |
| 131 |
"CreditBalanceSummaryRetrieveParams": ( |
| 132 |
"stripe.params.billing._credit_balance_summary_retrieve_params", |
| 133 |
False, |
| 134 |
), |
| 135 |
"CreditBalanceSummaryRetrieveParamsFilter": ( |
| 136 |
"stripe.params.billing._credit_balance_summary_retrieve_params", |
| 137 |
False, |
| 138 |
), |
| 139 |
"CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope": ( |
| 140 |
"stripe.params.billing._credit_balance_summary_retrieve_params", |
| 141 |
False, |
| 142 |
), |
| 143 |
"CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice": ( |
| 144 |
"stripe.params.billing._credit_balance_summary_retrieve_params", |
| 145 |
False, |
| 146 |
), |
| 147 |
"CreditBalanceTransactionListParams": ( |
| 148 |
"stripe.params.billing._credit_balance_transaction_list_params", |
| 149 |
False, |
| 150 |
), |
| 151 |
"CreditBalanceTransactionRetrieveParams": ( |
| 152 |
"stripe.params.billing._credit_balance_transaction_retrieve_params", |
| 153 |
False, |
| 154 |
), |
| 155 |
"CreditGrantCreateParams": ( |
| 156 |
"stripe.params.billing._credit_grant_create_params", |
| 157 |
False, |
| 158 |
), |
| 159 |
"CreditGrantCreateParamsAmount": ( |
| 160 |
"stripe.params.billing._credit_grant_create_params", |
| 161 |
False, |
| 162 |
), |
| 163 |
"CreditGrantCreateParamsAmountMonetary": ( |
| 164 |
"stripe.params.billing._credit_grant_create_params", |
| 165 |
False, |
| 166 |
), |
| 167 |
"CreditGrantCreateParamsApplicabilityConfig": ( |
| 168 |
"stripe.params.billing._credit_grant_create_params", |
| 169 |
False, |
| 170 |
), |
| 171 |
"CreditGrantCreateParamsApplicabilityConfigScope": ( |
| 172 |
"stripe.params.billing._credit_grant_create_params", |
| 173 |
False, |
| 174 |
), |
| 175 |
"CreditGrantCreateParamsApplicabilityConfigScopePrice": ( |
| 176 |
"stripe.params.billing._credit_grant_create_params", |
| 177 |
False, |
| 178 |
), |
| 179 |
"CreditGrantExpireParams": ( |
| 180 |
"stripe.params.billing._credit_grant_expire_params", |
| 181 |
False, |
| 182 |
), |
| 183 |
"CreditGrantListParams": ( |
| 184 |
"stripe.params.billing._credit_grant_list_params", |
| 185 |
False, |
| 186 |
), |
| 187 |
"CreditGrantModifyParams": ( |
| 188 |
"stripe.params.billing._credit_grant_modify_params", |
| 189 |
False, |
| 190 |
), |
| 191 |
"CreditGrantRetrieveParams": ( |
| 192 |
"stripe.params.billing._credit_grant_retrieve_params", |
| 193 |
False, |
| 194 |
), |
| 195 |
"CreditGrantUpdateParams": ( |
| 196 |
"stripe.params.billing._credit_grant_update_params", |
| 197 |
False, |
| 198 |
), |
| 199 |
"CreditGrantVoidGrantParams": ( |
| 200 |
"stripe.params.billing._credit_grant_void_grant_params", |
| 201 |
False, |
| 202 |
), |
| 203 |
"MeterCreateParams": ("stripe.params.billing._meter_create_params", False), |
| 204 |
"MeterCreateParamsCustomerMapping": ( |
| 205 |
"stripe.params.billing._meter_create_params", |
| 206 |
False, |
| 207 |
), |
| 208 |
"MeterCreateParamsDefaultAggregation": ( |
| 209 |
"stripe.params.billing._meter_create_params", |
| 210 |
False, |
| 211 |
), |
| 212 |
"MeterCreateParamsValueSettings": ( |
| 213 |
"stripe.params.billing._meter_create_params", |
| 214 |
False, |
| 215 |
), |
| 216 |
"MeterDeactivateParams": ( |
| 217 |
"stripe.params.billing._meter_deactivate_params", |
| 218 |
False, |
| 219 |
), |
| 220 |
"MeterEventAdjustmentCreateParams": ( |
| 221 |
"stripe.params.billing._meter_event_adjustment_create_params", |
| 222 |
False, |
| 223 |
), |
| 224 |
"MeterEventAdjustmentCreateParamsCancel": ( |
| 225 |
"stripe.params.billing._meter_event_adjustment_create_params", |
| 226 |
False, |
| 227 |
), |
| 228 |
"MeterEventCreateParams": ( |
| 229 |
"stripe.params.billing._meter_event_create_params", |
| 230 |
False, |
| 231 |
), |
| 232 |
"MeterEventSummaryListParams": ( |
| 233 |
"stripe.params.billing._meter_event_summary_list_params", |
| 234 |
False, |
| 235 |
), |
| 236 |
"MeterListEventSummariesParams": ( |
| 237 |
"stripe.params.billing._meter_list_event_summaries_params", |
| 238 |
False, |
| 239 |
), |
| 240 |
"MeterListParams": ("stripe.params.billing._meter_list_params", False), |
| 241 |
"MeterModifyParams": ("stripe.params.billing._meter_modify_params", False), |
| 242 |
"MeterReactivateParams": ( |
| 243 |
"stripe.params.billing._meter_reactivate_params", |
| 244 |
False, |
| 245 |
), |
| 246 |
"MeterRetrieveParams": ( |
| 247 |
"stripe.params.billing._meter_retrieve_params", |
| 248 |
False, |
| 249 |
), |
| 250 |
"MeterUpdateParams": ("stripe.params.billing._meter_update_params", False), |
| 251 |
} |
| 252 |
if not TYPE_CHECKING: |
| 253 |
|
| 254 |
def __getattr__(name): |
| 255 |
try: |
| 256 |
target, is_submodule = _import_map[name] |
| 257 |
module = import_module(target) |
| 258 |
if is_submodule: |
| 259 |
return module |
| 260 |
|
| 261 |
return getattr( |
| 262 |
module, |
| 263 |
name, |
| 264 |
) |
| 265 |
except KeyError: |
| 266 |
raise AttributeError() |