updates
This commit is contained in:
@@ -0,0 +1,266 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from importlib import import_module
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe.params.billing._alert_activate_params import (
|
||||
AlertActivateParams as AlertActivateParams,
|
||||
)
|
||||
from stripe.params.billing._alert_archive_params import (
|
||||
AlertArchiveParams as AlertArchiveParams,
|
||||
)
|
||||
from stripe.params.billing._alert_create_params import (
|
||||
AlertCreateParams as AlertCreateParams,
|
||||
AlertCreateParamsUsageThreshold as AlertCreateParamsUsageThreshold,
|
||||
AlertCreateParamsUsageThresholdFilter as AlertCreateParamsUsageThresholdFilter,
|
||||
)
|
||||
from stripe.params.billing._alert_deactivate_params import (
|
||||
AlertDeactivateParams as AlertDeactivateParams,
|
||||
)
|
||||
from stripe.params.billing._alert_list_params import (
|
||||
AlertListParams as AlertListParams,
|
||||
)
|
||||
from stripe.params.billing._alert_retrieve_params import (
|
||||
AlertRetrieveParams as AlertRetrieveParams,
|
||||
)
|
||||
from stripe.params.billing._credit_balance_summary_retrieve_params import (
|
||||
CreditBalanceSummaryRetrieveParams as CreditBalanceSummaryRetrieveParams,
|
||||
CreditBalanceSummaryRetrieveParamsFilter as CreditBalanceSummaryRetrieveParamsFilter,
|
||||
CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope as CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope,
|
||||
CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice as CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice,
|
||||
)
|
||||
from stripe.params.billing._credit_balance_transaction_list_params import (
|
||||
CreditBalanceTransactionListParams as CreditBalanceTransactionListParams,
|
||||
)
|
||||
from stripe.params.billing._credit_balance_transaction_retrieve_params import (
|
||||
CreditBalanceTransactionRetrieveParams as CreditBalanceTransactionRetrieveParams,
|
||||
)
|
||||
from stripe.params.billing._credit_grant_create_params import (
|
||||
CreditGrantCreateParams as CreditGrantCreateParams,
|
||||
CreditGrantCreateParamsAmount as CreditGrantCreateParamsAmount,
|
||||
CreditGrantCreateParamsAmountMonetary as CreditGrantCreateParamsAmountMonetary,
|
||||
CreditGrantCreateParamsApplicabilityConfig as CreditGrantCreateParamsApplicabilityConfig,
|
||||
CreditGrantCreateParamsApplicabilityConfigScope as CreditGrantCreateParamsApplicabilityConfigScope,
|
||||
CreditGrantCreateParamsApplicabilityConfigScopePrice as CreditGrantCreateParamsApplicabilityConfigScopePrice,
|
||||
)
|
||||
from stripe.params.billing._credit_grant_expire_params import (
|
||||
CreditGrantExpireParams as CreditGrantExpireParams,
|
||||
)
|
||||
from stripe.params.billing._credit_grant_list_params import (
|
||||
CreditGrantListParams as CreditGrantListParams,
|
||||
)
|
||||
from stripe.params.billing._credit_grant_modify_params import (
|
||||
CreditGrantModifyParams as CreditGrantModifyParams,
|
||||
)
|
||||
from stripe.params.billing._credit_grant_retrieve_params import (
|
||||
CreditGrantRetrieveParams as CreditGrantRetrieveParams,
|
||||
)
|
||||
from stripe.params.billing._credit_grant_update_params import (
|
||||
CreditGrantUpdateParams as CreditGrantUpdateParams,
|
||||
)
|
||||
from stripe.params.billing._credit_grant_void_grant_params import (
|
||||
CreditGrantVoidGrantParams as CreditGrantVoidGrantParams,
|
||||
)
|
||||
from stripe.params.billing._meter_create_params import (
|
||||
MeterCreateParams as MeterCreateParams,
|
||||
MeterCreateParamsCustomerMapping as MeterCreateParamsCustomerMapping,
|
||||
MeterCreateParamsDefaultAggregation as MeterCreateParamsDefaultAggregation,
|
||||
MeterCreateParamsValueSettings as MeterCreateParamsValueSettings,
|
||||
)
|
||||
from stripe.params.billing._meter_deactivate_params import (
|
||||
MeterDeactivateParams as MeterDeactivateParams,
|
||||
)
|
||||
from stripe.params.billing._meter_event_adjustment_create_params import (
|
||||
MeterEventAdjustmentCreateParams as MeterEventAdjustmentCreateParams,
|
||||
MeterEventAdjustmentCreateParamsCancel as MeterEventAdjustmentCreateParamsCancel,
|
||||
)
|
||||
from stripe.params.billing._meter_event_create_params import (
|
||||
MeterEventCreateParams as MeterEventCreateParams,
|
||||
)
|
||||
from stripe.params.billing._meter_event_summary_list_params import (
|
||||
MeterEventSummaryListParams as MeterEventSummaryListParams,
|
||||
)
|
||||
from stripe.params.billing._meter_list_event_summaries_params import (
|
||||
MeterListEventSummariesParams as MeterListEventSummariesParams,
|
||||
)
|
||||
from stripe.params.billing._meter_list_params import (
|
||||
MeterListParams as MeterListParams,
|
||||
)
|
||||
from stripe.params.billing._meter_modify_params import (
|
||||
MeterModifyParams as MeterModifyParams,
|
||||
)
|
||||
from stripe.params.billing._meter_reactivate_params import (
|
||||
MeterReactivateParams as MeterReactivateParams,
|
||||
)
|
||||
from stripe.params.billing._meter_retrieve_params import (
|
||||
MeterRetrieveParams as MeterRetrieveParams,
|
||||
)
|
||||
from stripe.params.billing._meter_update_params import (
|
||||
MeterUpdateParams as MeterUpdateParams,
|
||||
)
|
||||
|
||||
# name -> (import_target, is_submodule)
|
||||
_import_map = {
|
||||
"AlertActivateParams": (
|
||||
"stripe.params.billing._alert_activate_params",
|
||||
False,
|
||||
),
|
||||
"AlertArchiveParams": (
|
||||
"stripe.params.billing._alert_archive_params",
|
||||
False,
|
||||
),
|
||||
"AlertCreateParams": ("stripe.params.billing._alert_create_params", False),
|
||||
"AlertCreateParamsUsageThreshold": (
|
||||
"stripe.params.billing._alert_create_params",
|
||||
False,
|
||||
),
|
||||
"AlertCreateParamsUsageThresholdFilter": (
|
||||
"stripe.params.billing._alert_create_params",
|
||||
False,
|
||||
),
|
||||
"AlertDeactivateParams": (
|
||||
"stripe.params.billing._alert_deactivate_params",
|
||||
False,
|
||||
),
|
||||
"AlertListParams": ("stripe.params.billing._alert_list_params", False),
|
||||
"AlertRetrieveParams": (
|
||||
"stripe.params.billing._alert_retrieve_params",
|
||||
False,
|
||||
),
|
||||
"CreditBalanceSummaryRetrieveParams": (
|
||||
"stripe.params.billing._credit_balance_summary_retrieve_params",
|
||||
False,
|
||||
),
|
||||
"CreditBalanceSummaryRetrieveParamsFilter": (
|
||||
"stripe.params.billing._credit_balance_summary_retrieve_params",
|
||||
False,
|
||||
),
|
||||
"CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope": (
|
||||
"stripe.params.billing._credit_balance_summary_retrieve_params",
|
||||
False,
|
||||
),
|
||||
"CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice": (
|
||||
"stripe.params.billing._credit_balance_summary_retrieve_params",
|
||||
False,
|
||||
),
|
||||
"CreditBalanceTransactionListParams": (
|
||||
"stripe.params.billing._credit_balance_transaction_list_params",
|
||||
False,
|
||||
),
|
||||
"CreditBalanceTransactionRetrieveParams": (
|
||||
"stripe.params.billing._credit_balance_transaction_retrieve_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantCreateParams": (
|
||||
"stripe.params.billing._credit_grant_create_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantCreateParamsAmount": (
|
||||
"stripe.params.billing._credit_grant_create_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantCreateParamsAmountMonetary": (
|
||||
"stripe.params.billing._credit_grant_create_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantCreateParamsApplicabilityConfig": (
|
||||
"stripe.params.billing._credit_grant_create_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantCreateParamsApplicabilityConfigScope": (
|
||||
"stripe.params.billing._credit_grant_create_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantCreateParamsApplicabilityConfigScopePrice": (
|
||||
"stripe.params.billing._credit_grant_create_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantExpireParams": (
|
||||
"stripe.params.billing._credit_grant_expire_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantListParams": (
|
||||
"stripe.params.billing._credit_grant_list_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantModifyParams": (
|
||||
"stripe.params.billing._credit_grant_modify_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantRetrieveParams": (
|
||||
"stripe.params.billing._credit_grant_retrieve_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantUpdateParams": (
|
||||
"stripe.params.billing._credit_grant_update_params",
|
||||
False,
|
||||
),
|
||||
"CreditGrantVoidGrantParams": (
|
||||
"stripe.params.billing._credit_grant_void_grant_params",
|
||||
False,
|
||||
),
|
||||
"MeterCreateParams": ("stripe.params.billing._meter_create_params", False),
|
||||
"MeterCreateParamsCustomerMapping": (
|
||||
"stripe.params.billing._meter_create_params",
|
||||
False,
|
||||
),
|
||||
"MeterCreateParamsDefaultAggregation": (
|
||||
"stripe.params.billing._meter_create_params",
|
||||
False,
|
||||
),
|
||||
"MeterCreateParamsValueSettings": (
|
||||
"stripe.params.billing._meter_create_params",
|
||||
False,
|
||||
),
|
||||
"MeterDeactivateParams": (
|
||||
"stripe.params.billing._meter_deactivate_params",
|
||||
False,
|
||||
),
|
||||
"MeterEventAdjustmentCreateParams": (
|
||||
"stripe.params.billing._meter_event_adjustment_create_params",
|
||||
False,
|
||||
),
|
||||
"MeterEventAdjustmentCreateParamsCancel": (
|
||||
"stripe.params.billing._meter_event_adjustment_create_params",
|
||||
False,
|
||||
),
|
||||
"MeterEventCreateParams": (
|
||||
"stripe.params.billing._meter_event_create_params",
|
||||
False,
|
||||
),
|
||||
"MeterEventSummaryListParams": (
|
||||
"stripe.params.billing._meter_event_summary_list_params",
|
||||
False,
|
||||
),
|
||||
"MeterListEventSummariesParams": (
|
||||
"stripe.params.billing._meter_list_event_summaries_params",
|
||||
False,
|
||||
),
|
||||
"MeterListParams": ("stripe.params.billing._meter_list_params", False),
|
||||
"MeterModifyParams": ("stripe.params.billing._meter_modify_params", False),
|
||||
"MeterReactivateParams": (
|
||||
"stripe.params.billing._meter_reactivate_params",
|
||||
False,
|
||||
),
|
||||
"MeterRetrieveParams": (
|
||||
"stripe.params.billing._meter_retrieve_params",
|
||||
False,
|
||||
),
|
||||
"MeterUpdateParams": ("stripe.params.billing._meter_update_params", False),
|
||||
}
|
||||
if not TYPE_CHECKING:
|
||||
|
||||
def __getattr__(name):
|
||||
try:
|
||||
target, is_submodule = _import_map[name]
|
||||
module = import_module(target)
|
||||
if is_submodule:
|
||||
return module
|
||||
|
||||
return getattr(
|
||||
module,
|
||||
name,
|
||||
)
|
||||
except KeyError:
|
||||
raise AttributeError()
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class AlertActivateParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class AlertArchiveParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,54 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import Literal, NotRequired, TypedDict
|
||||
|
||||
|
||||
class AlertCreateParams(RequestOptions):
|
||||
alert_type: Literal["usage_threshold"]
|
||||
"""
|
||||
The type of alert to create.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
title: str
|
||||
"""
|
||||
The title of the alert.
|
||||
"""
|
||||
usage_threshold: NotRequired["AlertCreateParamsUsageThreshold"]
|
||||
"""
|
||||
The configuration of the usage threshold.
|
||||
"""
|
||||
|
||||
|
||||
class AlertCreateParamsUsageThreshold(TypedDict):
|
||||
filters: NotRequired[List["AlertCreateParamsUsageThresholdFilter"]]
|
||||
"""
|
||||
The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
|
||||
"""
|
||||
gte: int
|
||||
"""
|
||||
Defines at which value the alert will fire.
|
||||
"""
|
||||
meter: str
|
||||
"""
|
||||
The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored.
|
||||
"""
|
||||
recurrence: Literal["one_time"]
|
||||
"""
|
||||
Defines how the alert will behave.
|
||||
"""
|
||||
|
||||
|
||||
class AlertCreateParamsUsageThresholdFilter(TypedDict):
|
||||
customer: NotRequired[str]
|
||||
"""
|
||||
Limit the scope to this usage alert only to this customer.
|
||||
"""
|
||||
type: Literal["customer"]
|
||||
"""
|
||||
What type of filter is being applied to this usage alert.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class AlertDeactivateParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import Literal, NotRequired
|
||||
|
||||
|
||||
class AlertListParams(RequestOptions):
|
||||
alert_type: NotRequired[Literal["usage_threshold"]]
|
||||
"""
|
||||
Filter results to only include this type of alert.
|
||||
"""
|
||||
ending_before: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
limit: NotRequired[int]
|
||||
"""
|
||||
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
"""
|
||||
meter: NotRequired[str]
|
||||
"""
|
||||
Filter results to only include alerts with the given meter.
|
||||
"""
|
||||
starting_after: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class AlertRetrieveParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,59 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import Literal, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreditBalanceSummaryRetrieveParams(RequestOptions):
|
||||
customer: str
|
||||
"""
|
||||
The customer for which to fetch credit balance summary.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
filter: "CreditBalanceSummaryRetrieveParamsFilter"
|
||||
"""
|
||||
The filter criteria for the credit balance summary.
|
||||
"""
|
||||
|
||||
|
||||
class CreditBalanceSummaryRetrieveParamsFilter(TypedDict):
|
||||
applicability_scope: NotRequired[
|
||||
"CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope"
|
||||
]
|
||||
"""
|
||||
The billing credit applicability scope for which to fetch credit balance summary.
|
||||
"""
|
||||
credit_grant: NotRequired[str]
|
||||
"""
|
||||
The credit grant for which to fetch credit balance summary.
|
||||
"""
|
||||
type: Literal["applicability_scope", "credit_grant"]
|
||||
"""
|
||||
Specify the type of this filter.
|
||||
"""
|
||||
|
||||
|
||||
class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope(TypedDict):
|
||||
price_type: NotRequired[Literal["metered"]]
|
||||
"""
|
||||
The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
|
||||
"""
|
||||
prices: NotRequired[
|
||||
List["CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice"]
|
||||
]
|
||||
"""
|
||||
A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
|
||||
"""
|
||||
|
||||
|
||||
class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice(
|
||||
TypedDict,
|
||||
):
|
||||
id: str
|
||||
"""
|
||||
The price ID this credit grant should apply to.
|
||||
"""
|
||||
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class CreditBalanceTransactionListParams(RequestOptions):
|
||||
credit_grant: NotRequired[str]
|
||||
"""
|
||||
The credit grant for which to fetch credit balance transactions.
|
||||
"""
|
||||
customer: str
|
||||
"""
|
||||
The customer for which to fetch credit balance transactions.
|
||||
"""
|
||||
ending_before: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
limit: NotRequired[int]
|
||||
"""
|
||||
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
"""
|
||||
starting_after: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class CreditBalanceTransactionRetrieveParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,97 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import Dict, List
|
||||
from typing_extensions import Literal, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreditGrantCreateParams(RequestOptions):
|
||||
amount: "CreditGrantCreateParamsAmount"
|
||||
"""
|
||||
Amount of this credit grant.
|
||||
"""
|
||||
applicability_config: "CreditGrantCreateParamsApplicabilityConfig"
|
||||
"""
|
||||
Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
|
||||
"""
|
||||
category: NotRequired[Literal["paid", "promotional"]]
|
||||
"""
|
||||
The category of this credit grant. It defaults to `paid` if not specified.
|
||||
"""
|
||||
customer: str
|
||||
"""
|
||||
ID of the customer to receive the billing credits.
|
||||
"""
|
||||
effective_at: NotRequired[int]
|
||||
"""
|
||||
The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
expires_at: NotRequired[int]
|
||||
"""
|
||||
The time when the billing credits expire. If not specified, the billing credits don't expire.
|
||||
"""
|
||||
metadata: NotRequired[Dict[str, str]]
|
||||
"""
|
||||
Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
|
||||
"""
|
||||
name: NotRequired[str]
|
||||
"""
|
||||
A descriptive name shown in the Dashboard.
|
||||
"""
|
||||
priority: NotRequired[int]
|
||||
"""
|
||||
The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
|
||||
"""
|
||||
|
||||
|
||||
class CreditGrantCreateParamsAmount(TypedDict):
|
||||
monetary: NotRequired["CreditGrantCreateParamsAmountMonetary"]
|
||||
"""
|
||||
The monetary amount.
|
||||
"""
|
||||
type: Literal["monetary"]
|
||||
"""
|
||||
The type of this amount. We currently only support `monetary` billing credits.
|
||||
"""
|
||||
|
||||
|
||||
class CreditGrantCreateParamsAmountMonetary(TypedDict):
|
||||
currency: str
|
||||
"""
|
||||
Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
|
||||
"""
|
||||
value: int
|
||||
"""
|
||||
A positive integer representing the amount of the credit grant.
|
||||
"""
|
||||
|
||||
|
||||
class CreditGrantCreateParamsApplicabilityConfig(TypedDict):
|
||||
scope: "CreditGrantCreateParamsApplicabilityConfigScope"
|
||||
"""
|
||||
Specify the scope of this applicability config.
|
||||
"""
|
||||
|
||||
|
||||
class CreditGrantCreateParamsApplicabilityConfigScope(TypedDict):
|
||||
price_type: NotRequired[Literal["metered"]]
|
||||
"""
|
||||
The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
|
||||
"""
|
||||
prices: NotRequired[
|
||||
List["CreditGrantCreateParamsApplicabilityConfigScopePrice"]
|
||||
]
|
||||
"""
|
||||
A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
|
||||
"""
|
||||
|
||||
|
||||
class CreditGrantCreateParamsApplicabilityConfigScopePrice(TypedDict):
|
||||
id: str
|
||||
"""
|
||||
The price ID this credit grant should apply to.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class CreditGrantExpireParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class CreditGrantListParams(RequestOptions):
|
||||
customer: NotRequired[str]
|
||||
"""
|
||||
Only return credit grants for this customer.
|
||||
"""
|
||||
ending_before: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
limit: NotRequired[int]
|
||||
"""
|
||||
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
"""
|
||||
starting_after: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
"""
|
||||
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import Dict, List
|
||||
from typing_extensions import Literal, NotRequired
|
||||
|
||||
|
||||
class CreditGrantModifyParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
expires_at: NotRequired["Literal['']|int"]
|
||||
"""
|
||||
The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
|
||||
"""
|
||||
metadata: NotRequired[Dict[str, str]]
|
||||
"""
|
||||
Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class CreditGrantRetrieveParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from typing import Dict, List
|
||||
from typing_extensions import Literal, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreditGrantUpdateParams(TypedDict):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
expires_at: NotRequired["Literal['']|int"]
|
||||
"""
|
||||
The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
|
||||
"""
|
||||
metadata: NotRequired[Dict[str, str]]
|
||||
"""
|
||||
Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class CreditGrantVoidGrantParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,61 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import Literal, NotRequired, TypedDict
|
||||
|
||||
|
||||
class MeterCreateParams(RequestOptions):
|
||||
customer_mapping: NotRequired["MeterCreateParamsCustomerMapping"]
|
||||
"""
|
||||
Fields that specify how to map a meter event to a customer.
|
||||
"""
|
||||
default_aggregation: "MeterCreateParamsDefaultAggregation"
|
||||
"""
|
||||
The default settings to aggregate a meter's events with.
|
||||
"""
|
||||
display_name: str
|
||||
"""
|
||||
The meter's name. Not visible to the customer.
|
||||
"""
|
||||
event_name: str
|
||||
"""
|
||||
The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
|
||||
"""
|
||||
event_time_window: NotRequired[Literal["day", "hour"]]
|
||||
"""
|
||||
The time window which meter events have been pre-aggregated for, if any.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
value_settings: NotRequired["MeterCreateParamsValueSettings"]
|
||||
"""
|
||||
Fields that specify how to calculate a meter event's value.
|
||||
"""
|
||||
|
||||
|
||||
class MeterCreateParamsCustomerMapping(TypedDict):
|
||||
event_payload_key: str
|
||||
"""
|
||||
The key in the meter event payload to use for mapping the event to a customer.
|
||||
"""
|
||||
type: Literal["by_id"]
|
||||
"""
|
||||
The method for mapping a meter event to a customer. Must be `by_id`.
|
||||
"""
|
||||
|
||||
|
||||
class MeterCreateParamsDefaultAggregation(TypedDict):
|
||||
formula: Literal["count", "last", "sum"]
|
||||
"""
|
||||
Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window.
|
||||
"""
|
||||
|
||||
|
||||
class MeterCreateParamsValueSettings(TypedDict):
|
||||
event_payload_key: str
|
||||
"""
|
||||
The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used".
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class MeterDeactivateParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import Literal, NotRequired, TypedDict
|
||||
|
||||
|
||||
class MeterEventAdjustmentCreateParams(RequestOptions):
|
||||
cancel: NotRequired["MeterEventAdjustmentCreateParamsCancel"]
|
||||
"""
|
||||
Specifies which event to cancel.
|
||||
"""
|
||||
event_name: str
|
||||
"""
|
||||
The name of the meter event. Corresponds with the `event_name` field on a meter.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
type: Literal["cancel"]
|
||||
"""
|
||||
Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
|
||||
"""
|
||||
|
||||
|
||||
class MeterEventAdjustmentCreateParamsCancel(TypedDict):
|
||||
identifier: NotRequired[str]
|
||||
"""
|
||||
Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
|
||||
"""
|
||||
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import Dict, List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class MeterEventCreateParams(RequestOptions):
|
||||
event_name: str
|
||||
"""
|
||||
The name of the meter event. Corresponds with the `event_name` field on a meter.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
identifier: NotRequired[str]
|
||||
"""
|
||||
A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
|
||||
"""
|
||||
payload: Dict[str, str]
|
||||
"""
|
||||
The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
|
||||
"""
|
||||
timestamp: NotRequired[int]
|
||||
"""
|
||||
The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
|
||||
"""
|
||||
@@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from typing import List
|
||||
from typing_extensions import Literal, NotRequired, TypedDict
|
||||
|
||||
|
||||
class MeterEventSummaryListParams(TypedDict):
|
||||
customer: str
|
||||
"""
|
||||
The customer for which to fetch event summaries.
|
||||
"""
|
||||
end_time: int
|
||||
"""
|
||||
The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
|
||||
"""
|
||||
ending_before: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
limit: NotRequired[int]
|
||||
"""
|
||||
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
"""
|
||||
start_time: int
|
||||
"""
|
||||
The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
|
||||
"""
|
||||
starting_after: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
"""
|
||||
value_grouping_window: NotRequired[Literal["day", "hour"]]
|
||||
"""
|
||||
Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).
|
||||
"""
|
||||
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import Literal, NotRequired
|
||||
|
||||
|
||||
class MeterListEventSummariesParams(RequestOptions):
|
||||
customer: str
|
||||
"""
|
||||
The customer for which to fetch event summaries.
|
||||
"""
|
||||
end_time: int
|
||||
"""
|
||||
The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
|
||||
"""
|
||||
ending_before: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
limit: NotRequired[int]
|
||||
"""
|
||||
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
"""
|
||||
start_time: int
|
||||
"""
|
||||
The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
|
||||
"""
|
||||
starting_after: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
"""
|
||||
value_grouping_window: NotRequired[Literal["day", "hour"]]
|
||||
"""
|
||||
Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).
|
||||
"""
|
||||
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import Literal, NotRequired
|
||||
|
||||
|
||||
class MeterListParams(RequestOptions):
|
||||
ending_before: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
limit: NotRequired[int]
|
||||
"""
|
||||
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
"""
|
||||
starting_after: NotRequired[str]
|
||||
"""
|
||||
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
"""
|
||||
status: NotRequired[Literal["active", "inactive"]]
|
||||
"""
|
||||
Filter results to only include meters with the given status.
|
||||
"""
|
||||
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class MeterModifyParams(RequestOptions):
|
||||
display_name: NotRequired[str]
|
||||
"""
|
||||
The meter's name. Not visible to the customer.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class MeterReactivateParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._request_options import RequestOptions
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class MeterRetrieveParams(RequestOptions):
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from typing import List
|
||||
from typing_extensions import NotRequired, TypedDict
|
||||
|
||||
|
||||
class MeterUpdateParams(TypedDict):
|
||||
display_name: NotRequired[str]
|
||||
"""
|
||||
The meter's name. Not visible to the customer.
|
||||
"""
|
||||
expand: NotRequired[List[str]]
|
||||
"""
|
||||
Specifies which fields in the response should be expanded.
|
||||
"""
|
||||
Reference in New Issue
Block a user