Skip to content

Commit 3f1f902

Browse files
Merge pull request #1449 from stripe/latest-codegen-beta
Update generated code for beta
2 parents 28e22d6 + 01c9508 commit 3f1f902

38 files changed

+312
-83
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
just build
6363
6464
- name: "Upload Artifact"
65-
uses: actions/upload-artifact@v3
65+
uses: actions/upload-artifact@v4
6666
with:
6767
name: dist
6868
path: dist/
@@ -112,7 +112,7 @@ jobs:
112112
- uses: extractions/setup-just@v2
113113
- uses: actions/checkout@v3
114114
- name: Download all workflow run artifacts
115-
uses: actions/download-artifact@v3
115+
uses: actions/download-artifact@v4
116116
with:
117117
name: dist
118118
path: dist

CHANGELOG.md

+36
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Changelog
22

3+
## 11.5.0 - 2025-01-27
4+
* [#1443](https://github.com/stripe/stripe-python/pull/1443) Update generated code
5+
* Add support for `pay_by_bank_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities`
6+
* Add support for `directorship_declaration` on resource class `stripe.Account.Company` and parameter classes `stripe.Account.CreateParamsCompany` and `stripe.Token.CreateParamsAccountCompany`
7+
* Add support for `ownership_exemption_reason` on resource class `stripe.Account.Company` and parameter classes `stripe.Account.CreateParamsCompany` and `stripe.Token.CreateParamsAccountCompany`
8+
* Add support for `proof_of_ultimate_beneficial_ownership` on parameter class `stripe.Account.CreateParamsDocuments`
9+
* Add support for `financial_account` on resource classes `stripe.AccountSession.Components` and `stripe.treasury.OutboundTransfer.DestinationPaymentMethodDetails` and parameter class `stripe.AccountSession.CreateParamsComponents`
10+
* Add support for `issuing_card` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents`
11+
* Add support for `advice_code` on resource classes `stripe.Charge.Outcome`, `stripe.Invoice.LastFinalizationError`, `stripe.PaymentIntent.LastPaymentError`, `stripe.SetupAttempt.SetupError`, and `stripe.SetupIntent.LastSetupError`
12+
* Add support for `country` on resource classes `stripe.Charge.PaymentMethodDetails.Paypal`, `stripe.ConfirmationToken.PaymentMethodPreview.Paypal`, and `stripe.PaymentMethod.Paypal`
13+
* Add support for `pay_by_bank` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, and `stripe.PaymentIntent.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethod.ModifyParams`, `stripe.PaymentMethodConfiguration.CreateParams`, `stripe.PaymentMethodConfiguration.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resources `stripe.PaymentMethod` and `stripe.PaymentMethodConfiguration`
14+
* Add support for `phone_number_collection` on parameter class `stripe.PaymentLink.ModifyParams`
15+
* Add support for `discounts` on resource `stripe.checkout.Session`
16+
* Add support for `jpy` on parameter classes `stripe.terminal.Configuration.CreateParamsTipping` and `stripe.terminal.Configuration.ModifyParamsTipping` and resource class `stripe.terminal.Configuration.Tipping`
17+
* Add support for `nickname` on parameter classes `stripe.treasury.FinancialAccount.CreateParams` and `stripe.treasury.FinancialAccount.ModifyParams` and resource `stripe.treasury.FinancialAccount`
18+
* Add support for `forwarding_settings` on parameter class `stripe.treasury.FinancialAccount.ModifyParams`
19+
* Add support for `_cls_close` on resource `stripe.treasury.FinancialAccount`
20+
* Add support for `close` on resource `stripe.treasury.FinancialAccount`
21+
* Add support for `is_default` on resource `stripe.treasury.FinancialAccount`
22+
* Add support for `destination_payment_method_data` on parameter class `stripe.treasury.OutboundTransfer.CreateParams`
23+
* Add support for `outbound_transfer` on resource class `stripe.treasury.ReceivedCredit.LinkedFlows.SourceFlowDetails`
24+
* Add support for `SD` on enums `stripe.checkout.Session.ShippingAddressCollection.allowed_countries`, `stripe.checkout.Session.CreateParamsShippingAddressCollection.allowed_countries`, `stripe.PaymentLink.ShippingAddressCollection.allowed_countries`, `stripe.PaymentLink.CreateParamsShippingAddressCollection.allowed_countries`, and `stripe.PaymentLink.ModifyParamsShippingAddressCollection.allowed_countries`
25+
* Add support for `pay_by_bank` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, `stripe.PaymentLink.ModifyParams.payment_method_types`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type`
26+
* Add support for `financial_account` on enum `stripe.treasury.OutboundTransfer.DestinationPaymentMethodDetails.type`
27+
* Add support for `outbound_transfer` on enums `stripe.treasury.ReceivedCredit.LinkedFlows.SourceFlowDetails.type` and `stripe.treasury.ReceivedCredit.ListParamsLinkedFlows.source_flow_type`
28+
* Add support for `2025-01-27.acacia` on enum `stripe.WebhookEndpoint.CreateParams.api_version`
29+
* Change type of `pretax_credit_amounts` on `stripe.CreditNote` and `stripe.CreditNoteLineItem` from `Optional[List[PretaxCreditAmount]]` to `List[PretaxCreditAmount]`
30+
* [#1451](https://github.com/stripe/stripe-python/pull/1451) Upgrade to download-artifact@v4
31+
* [#1448](https://github.com/stripe/stripe-python/pull/1448) Updated upload artifact ci action
32+
* [#1446](https://github.com/stripe/stripe-python/pull/1446) add just to publish CI
33+
* [#1444](https://github.com/stripe/stripe-python/pull/1444) Added CONTRIBUTING.md file
34+
* [#1445](https://github.com/stripe/stripe-python/pull/1445) minor justfile fixes & pin CI version
35+
* [#1440](https://github.com/stripe/stripe-python/pull/1440) add justfile, update readme, remove coveralls
36+
* [#1442](https://github.com/stripe/stripe-python/pull/1442) Fix V2 ListObject.data type hint
37+
- Change `stripe.v2.ListObject.data` type hint from `List[StripeObject]` to `List[T]` where T is the specific stripe object contained within the list
38+
339
## 11.5.0b3 - 2025-01-23
440
* [#1447](https://github.com/stripe/stripe-python/pull/1447) Update generated code for beta
541
* Remove support for `stripe_account` on resource classes `stripe.terminal.Reader.Action.CollectPaymentMethod`, `stripe.terminal.Reader.Action.ConfirmPaymentIntent`, `stripe.terminal.Reader.Action.ProcessPaymentIntent`, and `stripe.terminal.Reader.Action.RefundPayment`

OPENAPI_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1460
1+
v1472

stripe/_account.py

+17-2
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,21 @@ class Payouts(StripeObject):
11451145

11461146
charges: Charges
11471147
payouts: Payouts
1148+
rejected_reason: Optional[
1149+
Literal[
1150+
"credit",
1151+
"fraud",
1152+
"fraud_no_intent_to_fulfill",
1153+
"fraud_other",
1154+
"fraud_payment_method_casher",
1155+
"fraud_payment_method_tester",
1156+
"other",
1157+
"terms_of_service",
1158+
]
1159+
]
1160+
"""
1161+
Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/)
1162+
"""
11481163
_inner_class_types = {"charges": Charges, "payouts": Payouts}
11491164

11501165
class Settings(StripeObject):
@@ -3548,7 +3563,7 @@ class CreatePersonParams(RequestOptions):
35483563
"""
35493564
The person's phone number.
35503565
"""
3551-
political_exposure: NotRequired[str]
3566+
political_exposure: NotRequired[Literal["existing", "none"]]
35523567
"""
35533568
Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
35543569
"""
@@ -4137,7 +4152,7 @@ class ModifyPersonParams(RequestOptions):
41374152
"""
41384153
The person's phone number.
41394154
"""
4140-
political_exposure: NotRequired[str]
4155+
political_exposure: NotRequired[Literal["existing", "none"]]
41414156
"""
41424157
Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
41434158
"""

stripe/_account_person_service.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class CreateParams(TypedDict):
109109
"""
110110
The person's phone number.
111111
"""
112-
political_exposure: NotRequired[str]
112+
political_exposure: NotRequired[Literal["existing", "none"]]
113113
"""
114114
Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
115115
"""
@@ -546,7 +546,7 @@ class UpdateParams(TypedDict):
546546
"""
547547
The person's phone number.
548548
"""
549-
political_exposure: NotRequired[str]
549+
political_exposure: NotRequired[Literal["existing", "none"]]
550550
"""
551551
Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
552552
"""

stripe/_account_session.py

+21
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,12 @@ class CreateParamsComponents(TypedDict):
528528
"""
529529
Configuration for the payouts list embedded component.
530530
"""
531+
product_tax_code_selector: NotRequired[
532+
"AccountSession.CreateParamsComponentsProductTaxCodeSelector"
533+
]
534+
"""
535+
Configuration for the product tax code selector embedded component.
536+
"""
531537
recipients: NotRequired[
532538
"AccountSession.CreateParamsComponentsRecipients"
533539
]
@@ -1008,6 +1014,21 @@ class CreateParamsComponentsPayoutsList(TypedDict):
10081014
class CreateParamsComponentsPayoutsListFeatures(TypedDict):
10091015
pass
10101016

1017+
class CreateParamsComponentsProductTaxCodeSelector(TypedDict):
1018+
enabled: bool
1019+
"""
1020+
Whether the embedded component is enabled.
1021+
"""
1022+
features: NotRequired[
1023+
"AccountSession.CreateParamsComponentsProductTaxCodeSelectorFeatures"
1024+
]
1025+
"""
1026+
The list of features enabled in the embedded component.
1027+
"""
1028+
1029+
class CreateParamsComponentsProductTaxCodeSelectorFeatures(TypedDict):
1030+
pass
1031+
10111032
class CreateParamsComponentsRecipients(TypedDict):
10121033
enabled: bool
10131034
"""

stripe/_account_session_service.py

+21
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ class CreateParamsComponents(TypedDict):
143143
"""
144144
Configuration for the payouts list embedded component.
145145
"""
146+
product_tax_code_selector: NotRequired[
147+
"AccountSessionService.CreateParamsComponentsProductTaxCodeSelector"
148+
]
149+
"""
150+
Configuration for the product tax code selector embedded component.
151+
"""
146152
recipients: NotRequired[
147153
"AccountSessionService.CreateParamsComponentsRecipients"
148154
]
@@ -623,6 +629,21 @@ class CreateParamsComponentsPayoutsList(TypedDict):
623629
class CreateParamsComponentsPayoutsListFeatures(TypedDict):
624630
pass
625631

632+
class CreateParamsComponentsProductTaxCodeSelector(TypedDict):
633+
enabled: bool
634+
"""
635+
Whether the embedded component is enabled.
636+
"""
637+
features: NotRequired[
638+
"AccountSessionService.CreateParamsComponentsProductTaxCodeSelectorFeatures"
639+
]
640+
"""
641+
The list of features enabled in the embedded component.
642+
"""
643+
644+
class CreateParamsComponentsProductTaxCodeSelectorFeatures(TypedDict):
645+
pass
646+
626647
class CreateParamsComponentsRecipients(TypedDict):
627648
enabled: bool
628649
"""

stripe/_balance.py

+18-18
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class Available(StripeObject):
2828
class SourceTypes(StripeObject):
2929
bank_account: Optional[int]
3030
"""
31-
Amount for bank account.
31+
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
3232
"""
3333
card: Optional[int]
3434
"""
35-
Amount for card.
35+
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
3636
"""
3737
fpx: Optional[int]
3838
"""
39-
Amount for FPX.
39+
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
4040
"""
4141

4242
amount: int
@@ -54,15 +54,15 @@ class ConnectReserved(StripeObject):
5454
class SourceTypes(StripeObject):
5555
bank_account: Optional[int]
5656
"""
57-
Amount for bank account.
57+
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
5858
"""
5959
card: Optional[int]
6060
"""
61-
Amount for card.
61+
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
6262
"""
6363
fpx: Optional[int]
6464
"""
65-
Amount for FPX.
65+
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
6666
"""
6767

6868
amount: int
@@ -81,15 +81,15 @@ class NetAvailable(StripeObject):
8181
class SourceTypes(StripeObject):
8282
bank_account: Optional[int]
8383
"""
84-
Amount for bank account.
84+
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
8585
"""
8686
card: Optional[int]
8787
"""
88-
Amount for card.
88+
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
8989
"""
9090
fpx: Optional[int]
9191
"""
92-
Amount for FPX.
92+
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
9393
"""
9494

9595
amount: int
@@ -106,15 +106,15 @@ class SourceTypes(StripeObject):
106106
class SourceTypes(StripeObject):
107107
bank_account: Optional[int]
108108
"""
109-
Amount for bank account.
109+
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
110110
"""
111111
card: Optional[int]
112112
"""
113-
Amount for card.
113+
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
114114
"""
115115
fpx: Optional[int]
116116
"""
117-
Amount for FPX.
117+
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
118118
"""
119119

120120
amount: int
@@ -140,15 +140,15 @@ class Available(StripeObject):
140140
class SourceTypes(StripeObject):
141141
bank_account: Optional[int]
142142
"""
143-
Amount for bank account.
143+
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
144144
"""
145145
card: Optional[int]
146146
"""
147-
Amount for card.
147+
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
148148
"""
149149
fpx: Optional[int]
150150
"""
151-
Amount for FPX.
151+
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
152152
"""
153153

154154
amount: int
@@ -172,15 +172,15 @@ class Pending(StripeObject):
172172
class SourceTypes(StripeObject):
173173
bank_account: Optional[int]
174174
"""
175-
Amount for bank account.
175+
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
176176
"""
177177
card: Optional[int]
178178
"""
179-
Amount for card.
179+
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
180180
"""
181181
fpx: Optional[int]
182182
"""
183-
Amount for FPX.
183+
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
184184
"""
185185

186186
amount: int

stripe/_charge.py

+8
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ class Card(StripeObject):
306306
"""
307307
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
308308
"""
309+
brand_product: Optional[str]
310+
"""
311+
The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
312+
"""
309313
country: Optional[str]
310314
"""
311315
Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
@@ -1770,6 +1774,10 @@ class Card(StripeObject):
17701774
"""
17711775
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
17721776
"""
1777+
brand_product: Optional[str]
1778+
"""
1779+
The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
1780+
"""
17731781
country: Optional[str]
17741782
"""
17751783
Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.

0 commit comments

Comments
 (0)