Skip to content

Commit cc29620

Browse files
Merge pull request #1827 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents ad41641 + 883e8a4 commit cc29620

76 files changed

Lines changed: 3212 additions & 1463 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.

.github/pull_request_template.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,15 @@ List out the key changes made in this PR, e.g.
99

1010
### See Also
1111
<!-- Include any links or additional information that help explain this change. -->
12+
13+
## Changelog
14+
<!-- Heads up! This section should include entries for any user-facing changes.
15+
Either fill it out or remove it if there are no entries to report.
16+
17+
List changes that affect end users, e.g.
18+
- Fixes crash when calling `foo.bar()` with null argument
19+
- Adds support for new `baz` parameter on `PaymentIntent` creation
20+
21+
List breaking changes first with a ⚠️ prefix, e.g.
22+
- ⚠️ Removes deprecated `legacy_method` function
23+
-->

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
656489921ee220b536bc00fc1c8ee7ed528f24e2
1+
aa10ab9548143dbe396ae1e91e443c64473cbdc2

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2290
1+
v2294

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ stripe.add_beta_version("feature_beta", "v3")
280280

281281
### Private Preview SDKs
282282

283-
Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `aX` suffix like `12.2.0a2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-python?tab=readme-ov-file#public-preview-sdks) above and replacing the suffix `b` with `a` in package versions.
283+
Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `aX` suffix like `12.2.0a2`. You can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-python?tab=readme-ov-file#public-preview-sdks) above and replacing the suffix `b` with `a` in package versions. Note that access to specific private preview API features may require separate approval.
284284

285285
### Custom requests
286286

stripe/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,14 @@ def add_beta_version(
399399
)
400400
from stripe._fx_quote import FxQuote as FxQuote
401401
from stripe._fx_quote_service import FxQuoteService as FxQuoteService
402+
from stripe._gift_card import GiftCard as GiftCard
403+
from stripe._gift_card_operation import (
404+
GiftCardOperation as GiftCardOperation,
405+
)
406+
from stripe._gift_card_operation_service import (
407+
GiftCardOperationService as GiftCardOperationService,
408+
)
409+
from stripe._gift_card_service import GiftCardService as GiftCardService
402410
from stripe._http_client import (
403411
AIOHTTPClient as AIOHTTPClient,
404412
HTTPClient as HTTPClient,
@@ -628,6 +636,8 @@ def add_beta_version(
628636
from stripe._tax_deducted_at_source import (
629637
TaxDeductedAtSource as TaxDeductedAtSource,
630638
)
639+
from stripe._tax_fund import TaxFund as TaxFund
640+
from stripe._tax_fund_service import TaxFundService as TaxFundService
631641
from stripe._tax_id import TaxId as TaxId
632642
from stripe._tax_id_service import TaxIdService as TaxIdService
633643
from stripe._tax_rate import TaxRate as TaxRate
@@ -880,6 +890,10 @@ def add_beta_version(
880890
"FundingInstructions": ("stripe._funding_instructions", False),
881891
"FxQuote": ("stripe._fx_quote", False),
882892
"FxQuoteService": ("stripe._fx_quote_service", False),
893+
"GiftCard": ("stripe._gift_card", False),
894+
"GiftCardOperation": ("stripe._gift_card_operation", False),
895+
"GiftCardOperationService": ("stripe._gift_card_operation_service", False),
896+
"GiftCardService": ("stripe._gift_card_service", False),
883897
"AIOHTTPClient": ("stripe._http_client", False),
884898
"HTTPClient": ("stripe._http_client", False),
885899
"HTTPXClient": ("stripe._http_client", False),
@@ -1056,6 +1070,8 @@ def add_beta_version(
10561070
"TaxCode": ("stripe._tax_code", False),
10571071
"TaxCodeService": ("stripe._tax_code_service", False),
10581072
"TaxDeductedAtSource": ("stripe._tax_deducted_at_source", False),
1073+
"TaxFund": ("stripe._tax_fund", False),
1074+
"TaxFundService": ("stripe._tax_fund_service", False),
10591075
"TaxId": ("stripe._tax_id", False),
10601076
"TaxIdService": ("stripe._tax_id_service", False),
10611077
"TaxRate": ("stripe._tax_rate", False),

stripe/_api_requestor.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from io import BytesIO, IOBase
2+
import functools
3+
import hashlib
24
import json
35
import os
46
import platform
7+
import socket
58
from typing import (
69
Any,
710
AsyncIterable,
@@ -72,6 +75,19 @@
7275
_default_proxy: Optional[str] = None
7376

7477

78+
@functools.lru_cache(maxsize=None)
79+
def _get_uname_hash() -> Optional[str]:
80+
try:
81+
parts: List[str] = list(platform.uname())
82+
try:
83+
parts.append(socket.gethostname())
84+
except Exception:
85+
pass
86+
return hashlib.md5(" ".join(parts).encode()).hexdigest()
87+
except Exception:
88+
return None
89+
90+
7591
def _maybe_emit_stripe_notice(rheaders: Mapping[str, str]) -> None:
7692
notice = rheaders.get("Stripe-Notice")
7793
if notice:
@@ -563,6 +579,9 @@ def request_headers(
563579
"lang": "python",
564580
"httplib": self._get_http_client().name,
565581
}
582+
uname_hash = _get_uname_hash()
583+
if uname_hash is not None:
584+
ua["source"] = uname_hash
566585
attr_funcs: List[Tuple[str, Callable[[], str]]] = [
567586
("lang_version", platform.python_version),
568587
]

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-06-03.preview"
4+
CURRENT = "2026-06-10.preview"

stripe/_charge.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,10 +489,18 @@ class AccountFunding(StripeObject):
489489
"""
490490

491491
class Benefits(StripeObject):
492+
class FrMealVoucher(StripeObject):
493+
siret: str
494+
"""
495+
The 14-digit SIRET of the meal voucher acceptor used for this charge.
496+
"""
497+
498+
fr_meal_voucher: Optional[FrMealVoucher]
492499
issuer: Optional[str]
493500
"""
494501
Issuer of the benefit card utilized on this payment
495502
"""
503+
_inner_class_types = {"fr_meal_voucher": FrMealVoucher}
496504

497505
class Checks(StripeObject):
498506
address_line1_check: Optional[str]
@@ -982,6 +990,12 @@ class ShippingAddress(StripeObject):
982990
}
983991

984992
class CardPresent(StripeObject):
993+
class Multicapture(StripeObject):
994+
status: Literal["available", "unavailable"]
995+
"""
996+
Indicates whether or not multiple captures are supported.
997+
"""
998+
985999
class Offline(StripeObject):
9861000
stored_at: Optional[int]
9871001
"""
@@ -1120,6 +1134,7 @@ class Wallet(StripeObject):
11201134
"""
11211135
ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.
11221136
"""
1137+
multicapture: Optional[Multicapture]
11231138
network: Optional[str]
11241139
"""
11251140
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
@@ -1170,6 +1185,7 @@ class Wallet(StripeObject):
11701185
"""
11711186
wallet: Optional[Wallet]
11721187
_inner_class_types = {
1188+
"multicapture": Multicapture,
11731189
"offline": Offline,
11741190
"reauthorization": Reauthorization,
11751191
"receipt": Receipt,

stripe/_confirmation_token.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ class Checks(StripeObject):
263263
class GeneratedFrom(StripeObject):
264264
class PaymentMethodDetails(StripeObject):
265265
class CardPresent(StripeObject):
266+
class Multicapture(StripeObject):
267+
status: Literal["available", "unavailable"]
268+
"""
269+
Indicates whether or not multiple captures are supported.
270+
"""
271+
266272
class Offline(StripeObject):
267273
stored_at: Optional[int]
268274
"""
@@ -406,6 +412,7 @@ class Wallet(StripeObject):
406412
"""
407413
ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.
408414
"""
415+
multicapture: Optional[Multicapture]
409416
network: Optional[str]
410417
"""
411418
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
@@ -456,6 +463,7 @@ class Wallet(StripeObject):
456463
"""
457464
wallet: Optional[Wallet]
458465
_inner_class_types = {
466+
"multicapture": Multicapture,
459467
"offline": Offline,
460468
"reauthorization": Reauthorization,
461469
"receipt": Receipt,

0 commit comments

Comments
 (0)