Skip to content

Commit 481c28a

Browse files
Merge pull request #1674 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents d0e35e0 + 8908dd4 commit 481c28a

File tree

105 files changed

+27868
-7690
lines changed

Some content is hidden

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

105 files changed

+27868
-7690
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f7784849b5189b7bdf4d850b41365cec53d174b2
1+
c0dacb8d26f5b7c5d68ef88b3f51d40c1eafeab7

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2120
1+
v2124

stripe/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ def add_beta_version(
223223
from stripe._balance_transaction_service import (
224224
BalanceTransactionService as BalanceTransactionService,
225225
)
226+
from stripe._balance_transfer import BalanceTransfer as BalanceTransfer
227+
from stripe._balance_transfer_service import (
228+
BalanceTransferService as BalanceTransferService,
229+
)
226230
from stripe._bank_account import BankAccount as BankAccount
227231
from stripe._base_address import BaseAddress as BaseAddress
228232
from stripe._billing_portal_service import (
@@ -686,6 +690,8 @@ def add_beta_version(
686690
"stripe._balance_transaction_service",
687691
False,
688692
),
693+
"BalanceTransfer": ("stripe._balance_transfer", False),
694+
"BalanceTransferService": ("stripe._balance_transfer_service", False),
689695
"BankAccount": ("stripe._bank_account", False),
690696
"BaseAddress": ("stripe._base_address", False),
691697
"BillingPortalService": ("stripe._billing_portal_service", False),

stripe/_account.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ class SupportAddress(StripeObject):
183183
"""
184184
Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.
185185
"""
186+
specified_commercial_transactions_act_url: Optional[str]
187+
"""
188+
A link to the business's publicly available terms related to the Specified Commercial Transaction Act. Only used for accounts in Japan.
189+
"""
186190
support_address: Optional[SupportAddress]
187191
"""
188192
A publicly available mailing address for sending support issues to.
@@ -1414,7 +1418,7 @@ class Invoices(StripeObject):
14141418
Literal["always", "never", "offer"]
14151419
]
14161420
"""
1417-
Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
1421+
Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page.
14181422
"""
14191423

14201424
class Payments(StripeObject):
@@ -1487,6 +1491,12 @@ class Schedule(StripeObject):
14871491
"""
14881492
_inner_class_types = {"schedule": Schedule}
14891493

1494+
class PaypayPayments(StripeObject):
1495+
goods_type: Optional[Literal["digital_content", "other"]]
1496+
"""
1497+
Whether your business sells digital content or not.
1498+
"""
1499+
14901500
class SepaDebitPayments(StripeObject):
14911501
creditor_id: Optional[str]
14921502
"""
@@ -1527,6 +1537,7 @@ class TosAcceptance(StripeObject):
15271537
invoices: Optional[Invoices]
15281538
payments: Payments
15291539
payouts: Optional[Payouts]
1540+
paypay_payments: Optional[PaypayPayments]
15301541
sepa_debit_payments: Optional[SepaDebitPayments]
15311542
tax_forms: Optional[TaxForms]
15321543
treasury: Optional[Treasury]
@@ -1541,6 +1552,7 @@ class TosAcceptance(StripeObject):
15411552
"invoices": Invoices,
15421553
"payments": Payments,
15431554
"payouts": Payouts,
1555+
"paypay_payments": PaypayPayments,
15441556
"sepa_debit_payments": SepaDebitPayments,
15451557
"tax_forms": TaxForms,
15461558
"treasury": Treasury,

stripe/_api_requestor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def _args_for_request_with_retries(
634634
**params,
635635
}
636636

637-
encoded_params = urlencode(list(_api_encode(params or {}, api_mode)))
637+
encoded_params = urlencode(list(_api_encode(params or {})))
638638

639639
# Don't use strict form encoding by changing the square bracket control
640640
# characters back to their literals. This is fine by the server, and

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 = "2025-10-29.preview"
4+
CURRENT = "2025-11-17.preview"

stripe/_balance_transfer.py

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# -*- coding: utf-8 -*-
2+
# File generated from our OpenAPI spec
3+
from stripe._createable_api_resource import CreateableAPIResource
4+
from stripe._expandable_field import ExpandableField
5+
from stripe._stripe_object import StripeObject
6+
from typing import ClassVar, Dict, Optional, cast
7+
from typing_extensions import Literal, Unpack, TYPE_CHECKING
8+
9+
if TYPE_CHECKING:
10+
from stripe._balance_transaction import BalanceTransaction
11+
from stripe.params._balance_transfer_create_params import (
12+
BalanceTransferCreateParams,
13+
)
14+
15+
16+
class BalanceTransfer(CreateableAPIResource["BalanceTransfer"]):
17+
"""
18+
Balance transfers represent funds moving between balance types on your Stripe account.
19+
They currently support moving funds between your Stripe balance and your [Issuing](https://stripe.com/docs/issuing) balance and between your [Allocated Funds](https://stripe.com/docs/connect/funds-segregation) balance and your Stripe balance.
20+
"""
21+
22+
OBJECT_NAME: ClassVar[Literal["balance_transfer"]] = "balance_transfer"
23+
24+
class DestinationBalance(StripeObject):
25+
class Issuing(StripeObject):
26+
balance_transaction: Optional[
27+
ExpandableField["BalanceTransaction"]
28+
]
29+
"""
30+
Identifier for the balance_transaction that increased the destination balance.
31+
"""
32+
33+
class Payments(StripeObject):
34+
balance_transaction: Optional[
35+
ExpandableField["BalanceTransaction"]
36+
]
37+
"""
38+
Identifier for the balance_transaction that increased the destination balance.
39+
"""
40+
41+
issuing: Optional[Issuing]
42+
payments: Optional[Payments]
43+
type: str
44+
"""
45+
Destination balance type to adjust for the Balance Transfer. One of `payments`, `issuing`, or `allocated_funds`.
46+
"""
47+
_inner_class_types = {"issuing": Issuing, "payments": Payments}
48+
49+
class SourceBalance(StripeObject):
50+
class Issuing(StripeObject):
51+
balance_transaction: Optional[
52+
ExpandableField["BalanceTransaction"]
53+
]
54+
"""
55+
Identifier for the balance_transaction that decreased the source balance.
56+
"""
57+
58+
class Payments(StripeObject):
59+
balance_transaction: ExpandableField["BalanceTransaction"]
60+
"""
61+
Identifier for the balance_transaction that decreased the source balance.
62+
"""
63+
source_type: Optional[str]
64+
"""
65+
The payments balance type that this BalanceTransfer pulled funds from. One of `card`, `fpx`, or `bank_account`.
66+
"""
67+
68+
issuing: Optional[Issuing]
69+
payments: Optional[Payments]
70+
type: str
71+
"""
72+
Source balance type to adjust for the Balance Transfer. One of `payments`, `issuing`, or `allocated_funds`.
73+
"""
74+
_inner_class_types = {"issuing": Issuing, "payments": Payments}
75+
76+
amount: int
77+
"""
78+
A positive integer representing how much was transferred in the smallest currency unit.
79+
"""
80+
created: int
81+
"""
82+
Time at which the object was created. Measured in seconds since the Unix epoch.
83+
"""
84+
currency: str
85+
"""
86+
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).
87+
"""
88+
destination_balance: Optional[DestinationBalance]
89+
"""
90+
The balance that funds were transferred to.
91+
"""
92+
hosted_regulatory_receipt_url: Optional[str]
93+
"""
94+
A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
95+
"""
96+
id: str
97+
"""
98+
Unique identifier for the object.
99+
"""
100+
livemode: bool
101+
"""
102+
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
103+
"""
104+
metadata: Dict[str, str]
105+
"""
106+
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
107+
"""
108+
object: Literal["balance_transfer"]
109+
"""
110+
String representing the object's type. Objects of the same type share the same value.
111+
"""
112+
source_balance: Optional[SourceBalance]
113+
"""
114+
The balance that funds were transferred from. One of `card`, `fpx`, or `bank_account`.
115+
"""
116+
117+
@classmethod
118+
def create(
119+
cls, **params: Unpack["BalanceTransferCreateParams"]
120+
) -> "BalanceTransfer":
121+
"""
122+
Creates a balance transfer. For Issuing use cases, funds will be debited immediately from the source balance and credited to the destination balance immediately (if your account is based in the US) or next-business-day (if your account is based in the EU). For Segregated Separate Charges and Transfers use cases, funds will be debited immediately from the source balance and credited immediately to the destination balance.
123+
"""
124+
return cast(
125+
"BalanceTransfer",
126+
cls._static_request(
127+
"post",
128+
cls.class_url(),
129+
params=params,
130+
),
131+
)
132+
133+
@classmethod
134+
async def create_async(
135+
cls, **params: Unpack["BalanceTransferCreateParams"]
136+
) -> "BalanceTransfer":
137+
"""
138+
Creates a balance transfer. For Issuing use cases, funds will be debited immediately from the source balance and credited to the destination balance immediately (if your account is based in the US) or next-business-day (if your account is based in the EU). For Segregated Separate Charges and Transfers use cases, funds will be debited immediately from the source balance and credited immediately to the destination balance.
139+
"""
140+
return cast(
141+
"BalanceTransfer",
142+
await cls._static_request_async(
143+
"post",
144+
cls.class_url(),
145+
params=params,
146+
),
147+
)
148+
149+
_inner_class_types = {
150+
"destination_balance": DestinationBalance,
151+
"source_balance": SourceBalance,
152+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# -*- coding: utf-8 -*-
2+
# File generated from our OpenAPI spec
3+
from stripe._stripe_service import StripeService
4+
from typing import Optional, cast
5+
from typing_extensions import TYPE_CHECKING
6+
7+
if TYPE_CHECKING:
8+
from stripe._balance_transfer import BalanceTransfer
9+
from stripe._request_options import RequestOptions
10+
from stripe.params._balance_transfer_create_params import (
11+
BalanceTransferCreateParams,
12+
)
13+
14+
15+
class BalanceTransferService(StripeService):
16+
def create(
17+
self,
18+
params: "BalanceTransferCreateParams",
19+
options: Optional["RequestOptions"] = None,
20+
) -> "BalanceTransfer":
21+
"""
22+
Creates a balance transfer. For Issuing use cases, funds will be debited immediately from the source balance and credited to the destination balance immediately (if your account is based in the US) or next-business-day (if your account is based in the EU). For Segregated Separate Charges and Transfers use cases, funds will be debited immediately from the source balance and credited immediately to the destination balance.
23+
"""
24+
return cast(
25+
"BalanceTransfer",
26+
self._request(
27+
"post",
28+
"/v1/balance_transfers",
29+
base_address="api",
30+
params=params,
31+
options=options,
32+
),
33+
)
34+
35+
async def create_async(
36+
self,
37+
params: "BalanceTransferCreateParams",
38+
options: Optional["RequestOptions"] = None,
39+
) -> "BalanceTransfer":
40+
"""
41+
Creates a balance transfer. For Issuing use cases, funds will be debited immediately from the source balance and credited to the destination balance immediately (if your account is based in the US) or next-business-day (if your account is based in the EU). For Segregated Separate Charges and Transfers use cases, funds will be debited immediately from the source balance and credited immediately to the destination balance.
42+
"""
43+
return cast(
44+
"BalanceTransfer",
45+
await self._request_async(
46+
"post",
47+
"/v1/balance_transfers",
48+
base_address="api",
49+
params=params,
50+
options=options,
51+
),
52+
)

stripe/_bank_account.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ class Error(StripeObject):
378378
"""
379379
status: str
380380
"""
381-
For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
381+
For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
382382
383-
For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
383+
For external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
384384
"""
385385

386386
@classmethod

stripe/_charge.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,6 +1282,7 @@ class Ideal(StripeObject):
12821282
"asn_bank",
12831283
"bunq",
12841284
"buut",
1285+
"finom",
12851286
"handelsbanken",
12861287
"ing",
12871288
"knab",
@@ -1298,7 +1299,7 @@ class Ideal(StripeObject):
12981299
]
12991300
]
13001301
"""
1301-
The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
1302+
The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
13021303
"""
13031304
bic: Optional[
13041305
Literal[
@@ -1307,6 +1308,7 @@ class Ideal(StripeObject):
13071308
"BITSNL2A",
13081309
"BUNQNL2A",
13091310
"BUUTNL2A",
1311+
"FNOMNL22",
13101312
"FVLBNL22",
13111313
"HANDNL2A",
13121314
"INGBNL2A",
@@ -1337,6 +1339,10 @@ class Ideal(StripeObject):
13371339
"""
13381340
Last four characters of the IBAN.
13391341
"""
1342+
transaction_id: Optional[str]
1343+
"""
1344+
Unique transaction ID generated by iDEAL.
1345+
"""
13401346
verified_name: Optional[str]
13411347
"""
13421348
Owner's verified full name. Values are verified or provided by iDEAL directly

0 commit comments

Comments
 (0)