From e849644757c17d20593049ee1bb550998b98d343 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:13:03 +0000 Subject: [PATCH] Update generated code for v1380 --- OPENAPI_VERSION | 2 +- stripe/billing/_credit_balance_summary.py | 6 +-- .../_credit_balance_summary_service.py | 6 +-- stripe/billing/_credit_balance_transaction.py | 8 +-- .../_credit_balance_transaction_service.py | 8 +-- stripe/billing/_credit_grant.py | 26 +++++----- stripe/billing/_credit_grant_service.py | 22 ++++---- stripe/billing/_meter.py | 52 +++++++++---------- stripe/billing/_meter_event.py | 9 ++-- stripe/billing/_meter_event_adjustment.py | 4 +- .../_meter_event_adjustment_service.py | 4 +- stripe/billing/_meter_event_service.py | 6 +-- stripe/billing/_meter_service.py | 26 +++++----- 13 files changed, 89 insertions(+), 90 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1cf360ac3..8486b1411 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1378 \ No newline at end of file +v1380 \ No newline at end of file diff --git a/stripe/billing/_credit_balance_summary.py b/stripe/billing/_credit_balance_summary.py index ade19dcef..fe701a30b 100644 --- a/stripe/billing/_credit_balance_summary.py +++ b/stripe/billing/_credit_balance_summary.py @@ -109,7 +109,7 @@ class RetrieveParamsFilter(TypedDict): class RetrieveParamsFilterApplicabilityScope(TypedDict): price_type: Literal["metered"] """ - The price type for which credit grants can apply. We currently only support the `metered` price type. + The price type that credit grants can apply to. We currently only support the `metered` price type. """ balances: List[Balance] @@ -134,7 +134,7 @@ def retrieve( cls, **params: Unpack["CreditBalanceSummary.RetrieveParams"] ) -> "CreditBalanceSummary": """ - Retrieves the credit balance summary for a customer + Retrieves the credit balance summary for a customer. """ instance = cls(None, **params) instance.refresh() @@ -145,7 +145,7 @@ async def retrieve_async( cls, **params: Unpack["CreditBalanceSummary.RetrieveParams"] ) -> "CreditBalanceSummary": """ - Retrieves the credit balance summary for a customer + Retrieves the credit balance summary for a customer. """ instance = cls(None, **params) await instance.refresh_async() diff --git a/stripe/billing/_credit_balance_summary_service.py b/stripe/billing/_credit_balance_summary_service.py index b31f13e46..68d6a09b5 100644 --- a/stripe/billing/_credit_balance_summary_service.py +++ b/stripe/billing/_credit_balance_summary_service.py @@ -41,7 +41,7 @@ class RetrieveParamsFilter(TypedDict): class RetrieveParamsFilterApplicabilityScope(TypedDict): price_type: Literal["metered"] """ - The price type for which credit grants can apply. We currently only support the `metered` price type. + The price type that credit grants can apply to. We currently only support the `metered` price type. """ def retrieve( @@ -50,7 +50,7 @@ def retrieve( options: RequestOptions = {}, ) -> CreditBalanceSummary: """ - Retrieves the credit balance summary for a customer + Retrieves the credit balance summary for a customer. """ return cast( CreditBalanceSummary, @@ -69,7 +69,7 @@ async def retrieve_async( options: RequestOptions = {}, ) -> CreditBalanceSummary: """ - Retrieves the credit balance summary for a customer + Retrieves the credit balance summary for a customer. """ return cast( CreditBalanceSummary, diff --git a/stripe/billing/_credit_balance_transaction.py b/stripe/billing/_credit_balance_transaction.py index 712bd7f14..da0f11e3b 100644 --- a/stripe/billing/_credit_balance_transaction.py +++ b/stripe/billing/_credit_balance_transaction.py @@ -178,7 +178,7 @@ def list( cls, **params: Unpack["CreditBalanceTransaction.ListParams"] ) -> ListObject["CreditBalanceTransaction"]: """ - Retrieve a list of credit balance transactions + Retrieve a list of credit balance transactions. """ result = cls._static_request( "get", @@ -198,7 +198,7 @@ async def list_async( cls, **params: Unpack["CreditBalanceTransaction.ListParams"] ) -> ListObject["CreditBalanceTransaction"]: """ - Retrieve a list of credit balance transactions + Retrieve a list of credit balance transactions. """ result = await cls._static_request_async( "get", @@ -220,7 +220,7 @@ def retrieve( **params: Unpack["CreditBalanceTransaction.RetrieveParams"], ) -> "CreditBalanceTransaction": """ - Retrieves a credit balance transaction + Retrieves a credit balance transaction. """ instance = cls(id, **params) instance.refresh() @@ -233,7 +233,7 @@ async def retrieve_async( **params: Unpack["CreditBalanceTransaction.RetrieveParams"], ) -> "CreditBalanceTransaction": """ - Retrieves a credit balance transaction + Retrieves a credit balance transaction. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/billing/_credit_balance_transaction_service.py b/stripe/billing/_credit_balance_transaction_service.py index 102258473..4aa061ffb 100644 --- a/stripe/billing/_credit_balance_transaction_service.py +++ b/stripe/billing/_credit_balance_transaction_service.py @@ -48,7 +48,7 @@ def list( options: RequestOptions = {}, ) -> ListObject[CreditBalanceTransaction]: """ - Retrieve a list of credit balance transactions + Retrieve a list of credit balance transactions. """ return cast( ListObject[CreditBalanceTransaction], @@ -67,7 +67,7 @@ async def list_async( options: RequestOptions = {}, ) -> ListObject[CreditBalanceTransaction]: """ - Retrieve a list of credit balance transactions + Retrieve a list of credit balance transactions. """ return cast( ListObject[CreditBalanceTransaction], @@ -87,7 +87,7 @@ def retrieve( options: RequestOptions = {}, ) -> CreditBalanceTransaction: """ - Retrieves a credit balance transaction + Retrieves a credit balance transaction. """ return cast( CreditBalanceTransaction, @@ -109,7 +109,7 @@ async def retrieve_async( options: RequestOptions = {}, ) -> CreditBalanceTransaction: """ - Retrieves a credit balance transaction + Retrieves a credit balance transaction. """ return cast( CreditBalanceTransaction, diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index 090a172f4..577982f79 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -62,7 +62,7 @@ class ApplicabilityConfig(StripeObject): class Scope(StripeObject): price_type: Literal["metered"] """ - The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. + The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. """ scope: Scope @@ -87,7 +87,7 @@ class CreateParams(RequestOptions): """ effective_at: NotRequired[int] """ - The time when the billing credits become effective—when they're eligible for use. Defaults to the current timestamp if not specified. + 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]] """ @@ -95,11 +95,11 @@ class CreateParams(RequestOptions): """ expires_at: NotRequired[int] """ - The time when the billing credits will expire. If not specified, the billing credits don't expire. + 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. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. + 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] """ @@ -135,7 +135,7 @@ class CreateParamsApplicabilityConfig(TypedDict): class CreateParamsApplicabilityConfigScope(TypedDict): price_type: Literal["metered"] """ - The price type for which credit grants can apply. We currently only support the `metered` price type. + The price type that credit grants can apply to. We currently only support the `metered` price type. """ class ExpireParams(RequestOptions): @@ -177,7 +177,7 @@ class ModifyParams(RequestOptions): """ metadata: NotRequired[Dict[str, str]] """ - Set of key-value pairs you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. + 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. """ class RetrieveParams(RequestOptions): @@ -208,7 +208,7 @@ class VoidGrantParams(RequestOptions): """ effective_at: Optional[int] """ - The time when the billing credits become effective—when they're eligible for use. + The time when the billing credits become effective-when they're eligible for use. """ expires_at: Optional[int] """ @@ -252,7 +252,7 @@ def create( cls, **params: Unpack["CreditGrant.CreateParams"] ) -> "CreditGrant": """ - Creates a credit grant + Creates a credit grant. """ return cast( "CreditGrant", @@ -268,7 +268,7 @@ async def create_async( cls, **params: Unpack["CreditGrant.CreateParams"] ) -> "CreditGrant": """ - Creates a credit grant + Creates a credit grant. """ return cast( "CreditGrant", @@ -434,7 +434,7 @@ def modify( cls, id: str, **params: Unpack["CreditGrant.ModifyParams"] ) -> "CreditGrant": """ - Updates a credit grant + Updates a credit grant. """ url = "%s/%s" % (cls.class_url(), sanitize_id(id)) return cast( @@ -451,7 +451,7 @@ async def modify_async( cls, id: str, **params: Unpack["CreditGrant.ModifyParams"] ) -> "CreditGrant": """ - Updates a credit grant + Updates a credit grant. """ url = "%s/%s" % (cls.class_url(), sanitize_id(id)) return cast( @@ -468,7 +468,7 @@ def retrieve( cls, id: str, **params: Unpack["CreditGrant.RetrieveParams"] ) -> "CreditGrant": """ - Retrieves a credit grant + Retrieves a credit grant. """ instance = cls(id, **params) instance.refresh() @@ -479,7 +479,7 @@ async def retrieve_async( cls, id: str, **params: Unpack["CreditGrant.RetrieveParams"] ) -> "CreditGrant": """ - Retrieves a credit grant + Retrieves a credit grant. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/billing/_credit_grant_service.py b/stripe/billing/_credit_grant_service.py index 54e6f8f3f..f1a1ced5a 100644 --- a/stripe/billing/_credit_grant_service.py +++ b/stripe/billing/_credit_grant_service.py @@ -31,7 +31,7 @@ class CreateParams(TypedDict): """ effective_at: NotRequired[int] """ - The time when the billing credits become effective—when they're eligible for use. Defaults to the current timestamp if not specified. + 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]] """ @@ -39,11 +39,11 @@ class CreateParams(TypedDict): """ expires_at: NotRequired[int] """ - The time when the billing credits will expire. If not specified, the billing credits don't expire. + 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. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. + 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] """ @@ -79,7 +79,7 @@ class CreateParamsApplicabilityConfig(TypedDict): class CreateParamsApplicabilityConfigScope(TypedDict): price_type: Literal["metered"] """ - The price type for which credit grants can apply. We currently only support the `metered` price type. + The price type that credit grants can apply to. We currently only support the `metered` price type. """ class ExpireParams(TypedDict): @@ -127,7 +127,7 @@ class UpdateParams(TypedDict): """ metadata: NotRequired[Dict[str, str]] """ - Set of key-value pairs you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. + 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. """ class VoidGrantParams(TypedDict): @@ -180,7 +180,7 @@ def create( options: RequestOptions = {}, ) -> CreditGrant: """ - Creates a credit grant + Creates a credit grant. """ return cast( CreditGrant, @@ -199,7 +199,7 @@ async def create_async( options: RequestOptions = {}, ) -> CreditGrant: """ - Creates a credit grant + Creates a credit grant. """ return cast( CreditGrant, @@ -219,7 +219,7 @@ def retrieve( options: RequestOptions = {}, ) -> CreditGrant: """ - Retrieves a credit grant + Retrieves a credit grant. """ return cast( CreditGrant, @@ -239,7 +239,7 @@ async def retrieve_async( options: RequestOptions = {}, ) -> CreditGrant: """ - Retrieves a credit grant + Retrieves a credit grant. """ return cast( CreditGrant, @@ -259,7 +259,7 @@ def update( options: RequestOptions = {}, ) -> CreditGrant: """ - Updates a credit grant + Updates a credit grant. """ return cast( CreditGrant, @@ -279,7 +279,7 @@ async def update_async( options: RequestOptions = {}, ) -> CreditGrant: """ - Updates a credit grant + Updates a credit grant. """ return cast( CreditGrant, diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index bf7e3ec16..813325857 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -28,7 +28,7 @@ class Meter( UpdateableAPIResource["Meter"], ): """ - A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. + Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill. Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) """ @@ -74,7 +74,7 @@ class CreateParams(RequestOptions): """ display_name: str """ - The meter's name. + The meter's name. Not visible to the customer. """ event_name: str """ @@ -96,7 +96,7 @@ class CreateParams(RequestOptions): class CreateParamsCustomerMapping(TypedDict): event_payload_key: str """ - The key in the usage event payload to use for mapping the event to a customer. + The key in the meter event payload to use for mapping the event to a customer. """ type: Literal["by_id"] """ @@ -180,7 +180,7 @@ class ListParams(RequestOptions): class ModifyParams(RequestOptions): display_name: NotRequired[str] """ - The meter's name. + The meter's name. Not visible to the customer. """ expand: NotRequired[List[str]] """ @@ -243,7 +243,7 @@ class RetrieveParams(RequestOptions): @classmethod def create(cls, **params: Unpack["Meter.CreateParams"]) -> "Meter": """ - Creates a billing meter + Creates a billing meter. """ return cast( "Meter", @@ -259,7 +259,7 @@ async def create_async( cls, **params: Unpack["Meter.CreateParams"] ) -> "Meter": """ - Creates a billing meter + Creates a billing meter. """ return cast( "Meter", @@ -275,7 +275,7 @@ def _cls_deactivate( cls, id: str, **params: Unpack["Meter.DeactivateParams"] ) -> "Meter": """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ return cast( "Meter", @@ -294,7 +294,7 @@ def deactivate( id: str, **params: Unpack["Meter.DeactivateParams"] ) -> "Meter": """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ ... @@ -303,7 +303,7 @@ def deactivate( self, **params: Unpack["Meter.DeactivateParams"] ) -> "Meter": """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ ... @@ -312,7 +312,7 @@ def deactivate( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Meter.DeactivateParams"] ) -> "Meter": """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ return cast( "Meter", @@ -330,7 +330,7 @@ async def _cls_deactivate_async( cls, id: str, **params: Unpack["Meter.DeactivateParams"] ) -> "Meter": """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ return cast( "Meter", @@ -349,7 +349,7 @@ async def deactivate_async( id: str, **params: Unpack["Meter.DeactivateParams"] ) -> "Meter": """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ ... @@ -358,7 +358,7 @@ async def deactivate_async( self, **params: Unpack["Meter.DeactivateParams"] ) -> "Meter": """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ ... @@ -367,7 +367,7 @@ async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Meter.DeactivateParams"] ) -> "Meter": """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ return cast( "Meter", @@ -423,7 +423,7 @@ def modify( cls, id: str, **params: Unpack["Meter.ModifyParams"] ) -> "Meter": """ - Updates a billing meter + Updates a billing meter. """ url = "%s/%s" % (cls.class_url(), sanitize_id(id)) return cast( @@ -440,7 +440,7 @@ async def modify_async( cls, id: str, **params: Unpack["Meter.ModifyParams"] ) -> "Meter": """ - Updates a billing meter + Updates a billing meter. """ url = "%s/%s" % (cls.class_url(), sanitize_id(id)) return cast( @@ -457,7 +457,7 @@ def _cls_reactivate( cls, id: str, **params: Unpack["Meter.ReactivateParams"] ) -> "Meter": """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ return cast( "Meter", @@ -476,7 +476,7 @@ def reactivate( id: str, **params: Unpack["Meter.ReactivateParams"] ) -> "Meter": """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ ... @@ -485,7 +485,7 @@ def reactivate( self, **params: Unpack["Meter.ReactivateParams"] ) -> "Meter": """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ ... @@ -494,7 +494,7 @@ def reactivate( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Meter.ReactivateParams"] ) -> "Meter": """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ return cast( "Meter", @@ -512,7 +512,7 @@ async def _cls_reactivate_async( cls, id: str, **params: Unpack["Meter.ReactivateParams"] ) -> "Meter": """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ return cast( "Meter", @@ -531,7 +531,7 @@ async def reactivate_async( id: str, **params: Unpack["Meter.ReactivateParams"] ) -> "Meter": """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ ... @@ -540,7 +540,7 @@ async def reactivate_async( self, **params: Unpack["Meter.ReactivateParams"] ) -> "Meter": """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ ... @@ -549,7 +549,7 @@ async def reactivate_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Meter.ReactivateParams"] ) -> "Meter": """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ return cast( "Meter", @@ -567,7 +567,7 @@ def retrieve( cls, id: str, **params: Unpack["Meter.RetrieveParams"] ) -> "Meter": """ - Retrieves a billing meter given an ID + Retrieves a billing meter given an ID. """ instance = cls(id, **params) instance.refresh() @@ -578,7 +578,7 @@ async def retrieve_async( cls, id: str, **params: Unpack["Meter.RetrieveParams"] ) -> "Meter": """ - Retrieves a billing meter given an ID + Retrieves a billing meter given an ID. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/billing/_meter_event.py b/stripe/billing/_meter_event.py index 88731e50e..428d66604 100644 --- a/stripe/billing/_meter_event.py +++ b/stripe/billing/_meter_event.py @@ -8,8 +8,7 @@ class MeterEvent(CreateableAPIResource["MeterEvent"]): """ - A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. - Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing. + Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events. """ OBJECT_NAME: ClassVar[Literal["billing.meter_event"]] = ( @@ -27,7 +26,7 @@ class CreateParams(RequestOptions): """ identifier: NotRequired[str] """ - A unique identifier for the event. If not provided, one will be generated. We strongly advise 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. + 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] """ @@ -72,7 +71,7 @@ def create( cls, **params: Unpack["MeterEvent.CreateParams"] ) -> "MeterEvent": """ - Creates a billing meter event + Creates a billing meter event. """ return cast( "MeterEvent", @@ -88,7 +87,7 @@ async def create_async( cls, **params: Unpack["MeterEvent.CreateParams"] ) -> "MeterEvent": """ - Creates a billing meter event + Creates a billing meter event. """ return cast( "MeterEvent", diff --git a/stripe/billing/_meter_event_adjustment.py b/stripe/billing/_meter_event_adjustment.py index 23f7ab0ac..0304e7c7f 100644 --- a/stripe/billing/_meter_event_adjustment.py +++ b/stripe/billing/_meter_event_adjustment.py @@ -76,7 +76,7 @@ def create( cls, **params: Unpack["MeterEventAdjustment.CreateParams"] ) -> "MeterEventAdjustment": """ - Creates a billing meter event adjustment + Creates a billing meter event adjustment. """ return cast( "MeterEventAdjustment", @@ -92,7 +92,7 @@ async def create_async( cls, **params: Unpack["MeterEventAdjustment.CreateParams"] ) -> "MeterEventAdjustment": """ - Creates a billing meter event adjustment + Creates a billing meter event adjustment. """ return cast( "MeterEventAdjustment", diff --git a/stripe/billing/_meter_event_adjustment_service.py b/stripe/billing/_meter_event_adjustment_service.py index 383b4a764..ea84b93f4 100644 --- a/stripe/billing/_meter_event_adjustment_service.py +++ b/stripe/billing/_meter_event_adjustment_service.py @@ -38,7 +38,7 @@ def create( options: RequestOptions = {}, ) -> MeterEventAdjustment: """ - Creates a billing meter event adjustment + Creates a billing meter event adjustment. """ return cast( MeterEventAdjustment, @@ -57,7 +57,7 @@ async def create_async( options: RequestOptions = {}, ) -> MeterEventAdjustment: """ - Creates a billing meter event adjustment + Creates a billing meter event adjustment. """ return cast( MeterEventAdjustment, diff --git a/stripe/billing/_meter_event_service.py b/stripe/billing/_meter_event_service.py index ce29abd3b..7970e0190 100644 --- a/stripe/billing/_meter_event_service.py +++ b/stripe/billing/_meter_event_service.py @@ -19,7 +19,7 @@ class CreateParams(TypedDict): """ identifier: NotRequired[str] """ - A unique identifier for the event. If not provided, one will be generated. We strongly advise 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. + 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] """ @@ -36,7 +36,7 @@ def create( options: RequestOptions = {}, ) -> MeterEvent: """ - Creates a billing meter event + Creates a billing meter event. """ return cast( MeterEvent, @@ -55,7 +55,7 @@ async def create_async( options: RequestOptions = {}, ) -> MeterEvent: """ - Creates a billing meter event + Creates a billing meter event. """ return cast( MeterEvent, diff --git a/stripe/billing/_meter_service.py b/stripe/billing/_meter_service.py index aed7176e0..da236bebe 100644 --- a/stripe/billing/_meter_service.py +++ b/stripe/billing/_meter_service.py @@ -30,7 +30,7 @@ class CreateParams(TypedDict): """ display_name: str """ - The meter's name. + The meter's name. Not visible to the customer. """ event_name: str """ @@ -52,7 +52,7 @@ class CreateParams(TypedDict): class CreateParamsCustomerMapping(TypedDict): event_payload_key: str """ - The key in the usage event payload to use for mapping the event to a customer. + The key in the meter event payload to use for mapping the event to a customer. """ type: Literal["by_id"] """ @@ -114,7 +114,7 @@ class RetrieveParams(TypedDict): class UpdateParams(TypedDict): display_name: NotRequired[str] """ - The meter's name. + The meter's name. Not visible to the customer. """ expand: NotRequired[List[str]] """ @@ -163,7 +163,7 @@ def create( self, params: "MeterService.CreateParams", options: RequestOptions = {} ) -> Meter: """ - Creates a billing meter + Creates a billing meter. """ return cast( Meter, @@ -180,7 +180,7 @@ async def create_async( self, params: "MeterService.CreateParams", options: RequestOptions = {} ) -> Meter: """ - Creates a billing meter + Creates a billing meter. """ return cast( Meter, @@ -200,7 +200,7 @@ def retrieve( options: RequestOptions = {}, ) -> Meter: """ - Retrieves a billing meter given an ID + Retrieves a billing meter given an ID. """ return cast( Meter, @@ -220,7 +220,7 @@ async def retrieve_async( options: RequestOptions = {}, ) -> Meter: """ - Retrieves a billing meter given an ID + Retrieves a billing meter given an ID. """ return cast( Meter, @@ -240,7 +240,7 @@ def update( options: RequestOptions = {}, ) -> Meter: """ - Updates a billing meter + Updates a billing meter. """ return cast( Meter, @@ -260,7 +260,7 @@ async def update_async( options: RequestOptions = {}, ) -> Meter: """ - Updates a billing meter + Updates a billing meter. """ return cast( Meter, @@ -280,7 +280,7 @@ def deactivate( options: RequestOptions = {}, ) -> Meter: """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ return cast( Meter, @@ -302,7 +302,7 @@ async def deactivate_async( options: RequestOptions = {}, ) -> Meter: """ - Deactivates a billing meter + When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ return cast( Meter, @@ -324,7 +324,7 @@ def reactivate( options: RequestOptions = {}, ) -> Meter: """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ return cast( Meter, @@ -346,7 +346,7 @@ async def reactivate_async( options: RequestOptions = {}, ) -> Meter: """ - Reactivates a billing meter + When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ return cast( Meter,