Skip to content

Commit a57df4f

Browse files
Update generated code for v2202 and
1 parent 8ae992d commit a57df4f

44 files changed

Lines changed: 996 additions & 118 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CODEGEN_VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
44f4fb009787de75f25092f4b710660223afa5c2
1+
9e950cbf7b5a814a98f27d1a94b72cd6f1df2078

‎stripe/events/_v2_core_health_fraud_rate_increased_event.py‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from stripe._api_mode import ApiMode
44
from stripe._stripe_object import StripeObject
55
from stripe._stripe_response import StripeResponse
6-
from stripe.v2._amount import Amount
76
from stripe.v2.core._event import Event, EventNotification
87
from typing import Any, Dict, Optional, cast
98
from typing_extensions import Literal, TYPE_CHECKING, override
@@ -37,6 +36,16 @@ class V2CoreHealthFraudRateIncreasedEvent(Event):
3736

3837
class V2CoreHealthFraudRateIncreasedEventData(StripeObject):
3938
class Impact(StripeObject):
39+
class RealizedFraudAmount(StripeObject):
40+
currency: str
41+
"""
42+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
43+
"""
44+
value: int
45+
"""
46+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
47+
"""
48+
4049
attack_type: Literal["spike", "sustained_attack"]
4150
"""
4251
Fraud attack type.
@@ -45,10 +54,11 @@ class Impact(StripeObject):
4554
"""
4655
The number of impacted requests which are detected.
4756
"""
48-
realized_fraud_amount: Amount
57+
realized_fraud_amount: RealizedFraudAmount
4958
"""
5059
Estimated aggregated amount for the impacted requests.
5160
"""
61+
_inner_class_types = {"realized_fraud_amount": RealizedFraudAmount}
5262

5363
alert_id: str
5464
"""

‎stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from stripe._api_mode import ApiMode
44
from stripe._stripe_object import StripeObject
55
from stripe._stripe_response import StripeResponse
6-
from stripe.v2._amount import Amount
76
from stripe.v2.core._event import Event, EventNotification
87
from typing import Any, Dict, Optional, cast
98
from typing_extensions import Literal, TYPE_CHECKING, override
@@ -45,22 +44,46 @@ class V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventData(
4544
StripeObject,
4645
):
4746
class Impact(StripeObject):
48-
approved_amount: Optional[Amount]
47+
class ApprovedAmount(StripeObject):
48+
currency: str
49+
"""
50+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
51+
"""
52+
value: int
53+
"""
54+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
55+
"""
56+
57+
class DeclinedAmount(StripeObject):
58+
currency: str
59+
"""
60+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
61+
"""
62+
value: int
63+
"""
64+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
65+
"""
66+
67+
approved_amount: Optional[ApprovedAmount]
4968
"""
5069
Estimated aggregated amount for the approved requests.
5170
"""
5271
approved_impacted_requests: Optional[int]
5372
"""
5473
The number of approved requests which are impacted.
5574
"""
56-
declined_amount: Optional[Amount]
75+
declined_amount: Optional[DeclinedAmount]
5776
"""
5877
Estimated aggregated amount for the declined requests.
5978
"""
6079
declined_impacted_requests: Optional[int]
6180
"""
6281
The number of declined requests which are impacted.
6382
"""
83+
_inner_class_types = {
84+
"approved_amount": ApprovedAmount,
85+
"declined_amount": DeclinedAmount,
86+
}
6487

6588
grouping_key: str
6689
"""

‎stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from stripe._api_mode import ApiMode
44
from stripe._stripe_object import StripeObject
55
from stripe._stripe_response import StripeResponse
6-
from stripe.v2._amount import Amount
76
from stripe.v2.core._event import Event, EventNotification
87
from typing import Any, Dict, Optional, cast
98
from typing_extensions import Literal, TYPE_CHECKING, override
@@ -53,22 +52,46 @@ class V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventData(
5352
StripeObject,
5453
):
5554
class Impact(StripeObject):
56-
approved_amount: Optional[Amount]
55+
class ApprovedAmount(StripeObject):
56+
currency: str
57+
"""
58+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
59+
"""
60+
value: int
61+
"""
62+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
63+
"""
64+
65+
class DeclinedAmount(StripeObject):
66+
currency: str
67+
"""
68+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
69+
"""
70+
value: int
71+
"""
72+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
73+
"""
74+
75+
approved_amount: Optional[ApprovedAmount]
5776
"""
5877
Estimated aggregated amount for the approved requests.
5978
"""
6079
approved_impacted_requests: Optional[int]
6180
"""
6281
The number of approved requests which are impacted.
6382
"""
64-
declined_amount: Optional[Amount]
83+
declined_amount: Optional[DeclinedAmount]
6584
"""
6685
Estimated aggregated amount for the declined requests.
6786
"""
6887
declined_impacted_requests: Optional[int]
6988
"""
7089
The number of declined requests which are impacted.
7190
"""
91+
_inner_class_types = {
92+
"approved_amount": ApprovedAmount,
93+
"declined_amount": DeclinedAmount,
94+
}
7295

7396
grouping_key: str
7497
"""

‎stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from stripe._api_mode import ApiMode
44
from stripe._stripe_object import StripeObject
55
from stripe._stripe_response import StripeResponse
6-
from stripe.v2._amount import Amount
76
from stripe.v2.core._event import Event, EventNotification
87
from typing import Any, Dict, Optional, cast
98
from typing_extensions import Literal, TYPE_CHECKING, override
@@ -49,22 +48,46 @@ class V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventData(
4948
StripeObject,
5049
):
5150
class Impact(StripeObject):
52-
approved_amount: Optional[Amount]
51+
class ApprovedAmount(StripeObject):
52+
currency: str
53+
"""
54+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
55+
"""
56+
value: int
57+
"""
58+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
59+
"""
60+
61+
class DeclinedAmount(StripeObject):
62+
currency: str
63+
"""
64+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
65+
"""
66+
value: int
67+
"""
68+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
69+
"""
70+
71+
approved_amount: Optional[ApprovedAmount]
5372
"""
5473
Estimated aggregated amount for the approved requests.
5574
"""
5675
approved_impacted_requests: Optional[int]
5776
"""
5877
The number of approved requests which are impacted.
5978
"""
60-
declined_amount: Optional[Amount]
79+
declined_amount: Optional[DeclinedAmount]
6180
"""
6281
Estimated aggregated amount for the declined requests.
6382
"""
6483
declined_impacted_requests: Optional[int]
6584
"""
6685
The number of declined requests which are impacted.
6786
"""
87+
_inner_class_types = {
88+
"approved_amount": ApprovedAmount,
89+
"declined_amount": DeclinedAmount,
90+
}
6891

6992
alert_id: str
7093
"""

‎stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from stripe._api_mode import ApiMode
44
from stripe._stripe_object import StripeObject
55
from stripe._stripe_response import StripeResponse
6-
from stripe.v2._amount import Amount
76
from stripe.v2.core._event import Event, EventNotification
87
from typing import Any, Dict, Optional, cast
98
from typing_extensions import Literal, TYPE_CHECKING, override
@@ -53,22 +52,46 @@ class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventData(
5352
StripeObject,
5453
):
5554
class Impact(StripeObject):
56-
approved_amount: Optional[Amount]
55+
class ApprovedAmount(StripeObject):
56+
currency: str
57+
"""
58+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
59+
"""
60+
value: int
61+
"""
62+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
63+
"""
64+
65+
class DeclinedAmount(StripeObject):
66+
currency: str
67+
"""
68+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
69+
"""
70+
value: int
71+
"""
72+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
73+
"""
74+
75+
approved_amount: Optional[ApprovedAmount]
5776
"""
5877
Estimated aggregated amount for the approved requests.
5978
"""
6079
approved_impacted_requests: Optional[int]
6180
"""
6281
The number of approved requests which are impacted.
6382
"""
64-
declined_amount: Optional[Amount]
83+
declined_amount: Optional[DeclinedAmount]
6584
"""
6685
Estimated aggregated amount for the declined requests.
6786
"""
6887
declined_impacted_requests: Optional[int]
6988
"""
7089
The number of declined requests which are impacted.
7190
"""
91+
_inner_class_types = {
92+
"approved_amount": ApprovedAmount,
93+
"declined_amount": DeclinedAmount,
94+
}
7295

7396
grouping_key: str
7497
"""

‎stripe/params/v2/billing/__init__.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,14 @@
334334
ServiceActionCreateParamsCreditGrant as ServiceActionCreateParamsCreditGrant,
335335
ServiceActionCreateParamsCreditGrantAmount as ServiceActionCreateParamsCreditGrantAmount,
336336
ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit as ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit,
337+
ServiceActionCreateParamsCreditGrantAmountMonetary as ServiceActionCreateParamsCreditGrantAmountMonetary,
337338
ServiceActionCreateParamsCreditGrantApplicabilityConfig as ServiceActionCreateParamsCreditGrantApplicabilityConfig,
338339
ServiceActionCreateParamsCreditGrantApplicabilityConfigScope as ServiceActionCreateParamsCreditGrantApplicabilityConfigScope,
339340
ServiceActionCreateParamsCreditGrantExpiryConfig as ServiceActionCreateParamsCreditGrantExpiryConfig,
340341
ServiceActionCreateParamsCreditGrantPerTenant as ServiceActionCreateParamsCreditGrantPerTenant,
341342
ServiceActionCreateParamsCreditGrantPerTenantAmount as ServiceActionCreateParamsCreditGrantPerTenantAmount,
342343
ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit as ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit,
344+
ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary as ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary,
343345
ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig as ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig,
344346
ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfigScope as ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfigScope,
345347
ServiceActionCreateParamsCreditGrantPerTenantExpiryConfig as ServiceActionCreateParamsCreditGrantPerTenantExpiryConfig,
@@ -1129,6 +1131,10 @@
11291131
"stripe.params.v2.billing._service_action_create_params",
11301132
False,
11311133
),
1134+
"ServiceActionCreateParamsCreditGrantAmountMonetary": (
1135+
"stripe.params.v2.billing._service_action_create_params",
1136+
False,
1137+
),
11321138
"ServiceActionCreateParamsCreditGrantApplicabilityConfig": (
11331139
"stripe.params.v2.billing._service_action_create_params",
11341140
False,
@@ -1153,6 +1159,10 @@
11531159
"stripe.params.v2.billing._service_action_create_params",
11541160
False,
11551161
),
1162+
"ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary": (
1163+
"stripe.params.v2.billing._service_action_create_params",
1164+
False,
1165+
),
11561166
"ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig": (
11571167
"stripe.params.v2.billing._service_action_create_params",
11581168
False,

‎stripe/params/v2/billing/_service_action_create_params.py‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22
# File generated from our OpenAPI spec
3-
from stripe.v2._amount import AmountParam
43
from typing import List
54
from typing_extensions import Literal, NotRequired, TypedDict
65

@@ -74,7 +73,7 @@ class ServiceActionCreateParamsCreditGrantAmount(TypedDict):
7473
"""
7574
The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`.
7675
"""
77-
monetary: NotRequired[AmountParam]
76+
monetary: NotRequired["ServiceActionCreateParamsCreditGrantAmountMonetary"]
7877
"""
7978
The monetary amount of the credit grant. Required if `type` is `monetary`.
8079
"""
@@ -91,6 +90,17 @@ class ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit(TypedDict):
9190
"""
9291

9392

93+
class ServiceActionCreateParamsCreditGrantAmountMonetary(TypedDict):
94+
value: int
95+
"""
96+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
97+
"""
98+
currency: str
99+
"""
100+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
101+
"""
102+
103+
94104
class ServiceActionCreateParamsCreditGrantApplicabilityConfig(TypedDict):
95105
scope: "ServiceActionCreateParamsCreditGrantApplicabilityConfigScope"
96106
"""
@@ -162,7 +172,9 @@ class ServiceActionCreateParamsCreditGrantPerTenantAmount(TypedDict):
162172
"""
163173
The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`.
164174
"""
165-
monetary: NotRequired[AmountParam]
175+
monetary: NotRequired[
176+
"ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary"
177+
]
166178
"""
167179
The monetary amount of the credit grant. Required if `type` is `monetary`.
168180
"""
@@ -181,6 +193,17 @@ class ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit(
181193
"""
182194

183195

196+
class ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary(TypedDict):
197+
value: int
198+
"""
199+
A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
200+
"""
201+
currency: str
202+
"""
203+
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
204+
"""
205+
206+
184207
class ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig(
185208
TypedDict,
186209
):

0 commit comments

Comments
 (0)