Debian Codegraph @

stripe/params/v2/billing/_meter_event_stream_create_params.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from typing import Dict, List
4 from typing_extensions import NotRequired, TypedDict
5
6
7 class MeterEventStreamCreateParams(TypedDict):
8 events: List["MeterEventStreamCreateParamsEvent"]
9 """
10 List of meter events to include in the request. Supports up to 100 events per request.
11 """
12
13
14 class MeterEventStreamCreateParamsEvent(TypedDict):
15 event_name: str
16 """
17 The name of the meter event. Corresponds with the `event_name` field on a meter.
18 """
19 identifier: NotRequired[str]
20 """
21 A unique identifier for the event. If not provided, one will be generated.
22 We recommend using a globally unique identifier for this. We'll enforce
23 uniqueness within a rolling 24 hour period.
24 """
25 payload: Dict[str, str]
26 """
27 The payload of the event. This must contain the fields corresponding to a meter's
28 `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and
29 `value_settings.event_payload_key` (default is `value`). Read more about
30 the
31 [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
32 """
33 timestamp: NotRequired[str]
34 """
35 The time of the event. Must be within the past 35 calendar days or up to
36 5 minutes in the future. Defaults to current timestamp if not specified.
37 """