Skip to content

Commit 262721f

Browse files
Merge pull request #1815 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents c46b6fe + 434f564 commit 262721f

160 files changed

Lines changed: 5526 additions & 416 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-
2e266cdaf4a7328b80cf9bc2448dfca91811415c
1+
1af5aa444ea8141a2d2b8d86e76c73f788f65e09

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2274
1+
v2277

stripe/_account.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ class Capabilities(StripeObject):
277277
"""
278278
The status of the Billie capability of the account, or whether the account can directly process Billie payments.
279279
"""
280+
bizum_payments: Optional[Literal["active", "inactive", "pending"]]
281+
"""
282+
The status of the Bizum capability of the account, or whether the account can directly process Bizum payments.
283+
"""
280284
blik_payments: Optional[Literal["active", "inactive", "pending"]]
281285
"""
282286
The status of the blik payments capability of the account, or whether the account can directly process blik charges.
@@ -483,6 +487,10 @@ class Capabilities(StripeObject):
483487
"""
484488
The status of the Satispay capability of the account, or whether the account can directly process Satispay payments.
485489
"""
490+
scalapay_payments: Optional[Literal["active", "inactive", "pending"]]
491+
"""
492+
The status of the Scalapay capability of the account, or whether the account can directly process Scalapay payments.
493+
"""
486494
sepa_bank_transfer_payments: Optional[
487495
Literal["active", "inactive", "pending"]
488496
]

stripe/_account_service.py

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,30 @@ async def reject_async(
402402
),
403403
)
404404

405+
def serialize_batch_delete(
406+
self,
407+
account: str,
408+
params: Optional["AccountDeleteParams"] = None,
409+
options: Optional["RequestOptions"] = None,
410+
) -> str:
411+
"""
412+
Serializes an Account delete request into a batch job JSONL line.
413+
"""
414+
item_id = str(uuid4())
415+
stripe_version = (
416+
options.get("stripe_version") if options else None
417+
) or _ApiVersion.CURRENT
418+
context = options.get("stripe_context") if options else None
419+
batch_request = {
420+
"id": item_id,
421+
"path_params": {"account": account},
422+
"params": params,
423+
"stripe_version": stripe_version,
424+
}
425+
if context is not None:
426+
batch_request["context"] = context
427+
return json.dumps(batch_request)
428+
405429
def serialize_batch_update(
406430
self,
407431
account: str,
@@ -416,12 +440,34 @@ def serialize_batch_update(
416440
options.get("stripe_version") if options else None
417441
) or _ApiVersion.CURRENT
418442
context = options.get("stripe_context") if options else None
419-
item = {
443+
batch_request = {
420444
"id": item_id,
421445
"path_params": {"account": account},
422446
"params": params,
423447
"stripe_version": stripe_version,
424448
}
425449
if context is not None:
426-
item["context"] = context
427-
return json.dumps(item)
450+
batch_request["context"] = context
451+
return json.dumps(batch_request)
452+
453+
def serialize_batch_create(
454+
self,
455+
params: Optional["AccountCreateParams"] = None,
456+
options: Optional["RequestOptions"] = None,
457+
) -> str:
458+
"""
459+
Serializes an Account create request into a batch job JSONL line.
460+
"""
461+
item_id = str(uuid4())
462+
stripe_version = (
463+
options.get("stripe_version") if options else None
464+
) or _ApiVersion.CURRENT
465+
context = options.get("stripe_context") if options else None
466+
batch_request = {
467+
"id": item_id,
468+
"params": params,
469+
"stripe_version": stripe_version,
470+
}
471+
if context is not None:
472+
batch_request["context"] = context
473+
return json.dumps(batch_request)

stripe/_api_requestor.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@
7272
_default_proxy: Optional[str] = None
7373

7474

75+
def _maybe_emit_stripe_notice(rheaders: Mapping[str, str]) -> None:
76+
notice = rheaders.get("Stripe-Notice")
77+
if notice:
78+
import warnings
79+
80+
warnings.warn(notice)
81+
82+
7583
def is_v2_delete_resp(method: str, api_mode: ApiMode) -> bool:
7684
return method == "delete" and api_mode == "V2"
7785

@@ -209,6 +217,7 @@ def request(
209217
options=options,
210218
usage=usage,
211219
)
220+
_maybe_emit_stripe_notice(rheaders)
212221
resp = requestor._interpret_response(rbody, rcode, rheaders, api_mode)
213222

214223
obj = _convert_to_stripe_object(
@@ -243,6 +252,7 @@ async def request_async(
243252
options=options,
244253
usage=usage,
245254
)
255+
_maybe_emit_stripe_notice(rheaders)
246256
resp = requestor._interpret_response(rbody, rcode, rheaders, api_mode)
247257

248258
obj = _convert_to_stripe_object(

stripe/_api_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
22
# File generated from our OpenAPI spec
33
class _ApiVersion:
4-
CURRENT = "2026-04-22.preview"
4+
CURRENT = "2026-05-27.preview"

stripe/_balance_settings.py

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ class BalanceSettings(
2727

2828
class Payments(StripeObject):
2929
class Payouts(StripeObject):
30+
class AutomaticTransferRulesByCurrency(StripeObject):
31+
payout_method: str
32+
"""
33+
The ID of the FinancialAccount that funds will be transferred to during automatic transfers.
34+
"""
35+
transfer_up_to_amount: Optional[int]
36+
"""
37+
The maximum amount in minor units to transfer to the FinancialAccount. Only applicable when `type` is `transfer_up_to_amount`.
38+
"""
39+
type: Literal["transfer_all", "transfer_up_to_amount"]
40+
"""
41+
The type of automatic transfer rule.
42+
"""
43+
3044
class Schedule(StripeObject):
3145
interval: Optional[
3246
Literal["daily", "manual", "monthly", "weekly"]
@@ -53,6 +67,12 @@ class Schedule(StripeObject):
5367
The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly.
5468
"""
5569

70+
automatic_transfer_rules_by_currency: Optional[
71+
UntypedStripeObject[List[AutomaticTransferRulesByCurrency]]
72+
]
73+
"""
74+
Configures per-currency rules for automatically transferring funds from the payments balance to a FinancialAccount.
75+
"""
5676
minimum_balance_by_currency: Optional[UntypedStripeObject[int]]
5777
"""
5878
The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](https://docs.stripe.com/payouts/minimum-balances-for-automatic-payouts).
@@ -69,9 +89,27 @@ class Schedule(StripeObject):
6989
"""
7090
Whether the funds in this account can be paid out.
7191
"""
72-
_inner_class_types = {"schedule": Schedule}
92+
_inner_class_types = {
93+
"automatic_transfer_rules_by_currency": AutomaticTransferRulesByCurrency,
94+
"schedule": Schedule,
95+
}
96+
_inner_class_dicts = ["automatic_transfer_rules_by_currency"]
7397

7498
class SettlementTiming(StripeObject):
99+
class StartOfDay(StripeObject):
100+
hour: int
101+
"""
102+
Hour at which the customized start of day begins according to the given timezone. Must be a [supported customized start of day hour](https://docs.stripe.com/connect/customized-start-of-day#available-timezones-and-cutoffs).
103+
"""
104+
minutes: int
105+
"""
106+
Minutes at which the customized start of day begins according to the given timezone. Must be either 0 or 30.
107+
"""
108+
timezone: str
109+
"""
110+
Timezone for the customized start of day. Must be a [supported customized start of day timezone](https://docs.stripe.com/connect/customized-start-of-day#available-timezones-and-cutoffs).
111+
"""
112+
75113
delay_days: int
76114
"""
77115
The number of days charge funds are held before becoming available.
@@ -80,6 +118,11 @@ class SettlementTiming(StripeObject):
80118
"""
81119
The number of days charge funds are held before becoming available. If present, overrides the default, or minimum available, for the account.
82120
"""
121+
start_of_day: Optional[StartOfDay]
122+
"""
123+
Customized start of day configuration for automatic payouts to group and send payments in local timezones with a customized day starting time. For details, see our [Customized start of day](https://docs.stripe.com/connect/customized-start-of-day) documentation.
124+
"""
125+
_inner_class_types = {"start_of_day": StartOfDay}
83126

84127
debit_negative_balances: Optional[bool]
85128
"""

stripe/_charge.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,12 @@ class Billie(StripeObject):
461461
The Billie transaction ID associated with this payment.
462462
"""
463463

464+
class Bizum(StripeObject):
465+
transaction_id: Optional[str]
466+
"""
467+
The Bizum transaction ID associated with this payment.
468+
"""
469+
464470
class Blik(StripeObject):
465471
buyer_id: Optional[str]
466472
"""
@@ -2091,6 +2097,12 @@ class Satispay(StripeObject):
20912097
The Satispay transaction ID associated with this payment.
20922098
"""
20932099

2100+
class Scalapay(StripeObject):
2101+
transaction_id: Optional[str]
2102+
"""
2103+
The Scalapay transaction ID associated with this payment.
2104+
"""
2105+
20942106
class SepaCreditTransfer(StripeObject):
20952107
bank_name: Optional[str]
20962108
"""
@@ -2210,7 +2222,10 @@ class Swish(StripeObject):
22102222
"""
22112223

22122224
class Twint(StripeObject):
2213-
pass
2225+
mandate: Optional[str]
2226+
"""
2227+
ID of the multi use Mandate generated by the PaymentIntent
2228+
"""
22142229

22152230
class Upi(StripeObject):
22162231
vpa: Optional[str]
@@ -2292,6 +2307,7 @@ class Zip(StripeObject):
22922307
bacs_debit: Optional[BacsDebit]
22932308
bancontact: Optional[Bancontact]
22942309
billie: Optional[Billie]
2310+
bizum: Optional[Bizum]
22952311
blik: Optional[Blik]
22962312
boleto: Optional[Boleto]
22972313
card: Optional[Card]
@@ -2333,6 +2349,7 @@ class Zip(StripeObject):
23332349
revolut_pay: Optional[RevolutPay]
23342350
samsung_pay: Optional[SamsungPay]
23352351
satispay: Optional[Satispay]
2352+
scalapay: Optional[Scalapay]
23362353
sepa_credit_transfer: Optional[SepaCreditTransfer]
23372354
sepa_debit: Optional[SepaDebit]
23382355
shopeepay: Optional[Shopeepay]
@@ -2366,6 +2383,7 @@ class Zip(StripeObject):
23662383
"bacs_debit": BacsDebit,
23672384
"bancontact": Bancontact,
23682385
"billie": Billie,
2386+
"bizum": Bizum,
23692387
"blik": Blik,
23702388
"boleto": Boleto,
23712389
"card": Card,
@@ -2407,6 +2425,7 @@ class Zip(StripeObject):
24072425
"revolut_pay": RevolutPay,
24082426
"samsung_pay": SamsungPay,
24092427
"satispay": Satispay,
2428+
"scalapay": Scalapay,
24102429
"sepa_credit_transfer": SepaCreditTransfer,
24112430
"sepa_debit": SepaDebit,
24122431
"shopeepay": Shopeepay,

stripe/_confirmation_token.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ class Address(StripeObject):
223223
"""
224224
_inner_class_types = {"address": Address}
225225

226+
class Bizum(StripeObject):
227+
pass
228+
226229
class Blik(StripeObject):
227230
pass
228231

@@ -1389,6 +1392,9 @@ class SamsungPay(StripeObject):
13891392
class Satispay(StripeObject):
13901393
pass
13911394

1395+
class Scalapay(StripeObject):
1396+
pass
1397+
13921398
class SepaDebit(StripeObject):
13931399
class GeneratedFrom(StripeObject):
13941400
charge: Optional[ExpandableField["Charge"]]
@@ -1576,6 +1582,7 @@ class Zip(StripeObject):
15761582
bancontact: Optional[Bancontact]
15771583
billie: Optional[Billie]
15781584
billing_details: BillingDetails
1585+
bizum: Optional[Bizum]
15791586
blik: Optional[Blik]
15801587
boleto: Optional[Boleto]
15811588
card: Optional[Card]
@@ -1622,6 +1629,7 @@ class Zip(StripeObject):
16221629
revolut_pay: Optional[RevolutPay]
16231630
samsung_pay: Optional[SamsungPay]
16241631
satispay: Optional[Satispay]
1632+
scalapay: Optional[Scalapay]
16251633
sepa_debit: Optional[SepaDebit]
16261634
shopeepay: Optional[Shopeepay]
16271635
sofort: Optional[Sofort]
@@ -1640,6 +1648,7 @@ class Zip(StripeObject):
16401648
"bacs_debit",
16411649
"bancontact",
16421650
"billie",
1651+
"bizum",
16431652
"blik",
16441653
"boleto",
16451654
"card",
@@ -1682,6 +1691,7 @@ class Zip(StripeObject):
16821691
"revolut_pay",
16831692
"samsung_pay",
16841693
"satispay",
1694+
"scalapay",
16851695
"sepa_debit",
16861696
"shopeepay",
16871697
"sofort",
@@ -1713,6 +1723,7 @@ class Zip(StripeObject):
17131723
"bancontact": Bancontact,
17141724
"billie": Billie,
17151725
"billing_details": BillingDetails,
1726+
"bizum": Bizum,
17161727
"blik": Blik,
17171728
"boleto": Boleto,
17181729
"card": Card,
@@ -1754,6 +1765,7 @@ class Zip(StripeObject):
17541765
"revolut_pay": RevolutPay,
17551766
"samsung_pay": SamsungPay,
17561767
"satispay": Satispay,
1768+
"scalapay": Scalapay,
17571769
"sepa_debit": SepaDebit,
17581770
"shopeepay": Shopeepay,
17591771
"sofort": Sofort,

0 commit comments

Comments
 (0)