Skip to content

Commit

Permalink
Merge pull request #1449 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Feb 7, 2025
2 parents 28e22d6 + 01c9508 commit 3f1f902
Show file tree
Hide file tree
Showing 38 changed files with 312 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
just build
- name: "Upload Artifact"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- uses: extractions/setup-just@v2
- uses: actions/checkout@v3
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

## 11.5.0 - 2025-01-27
* [#1443](https://github.com/stripe/stripe-python/pull/1443) Update generated code
* Add support for `pay_by_bank_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities`
* Add support for `directorship_declaration` on resource class `stripe.Account.Company` and parameter classes `stripe.Account.CreateParamsCompany` and `stripe.Token.CreateParamsAccountCompany`
* Add support for `ownership_exemption_reason` on resource class `stripe.Account.Company` and parameter classes `stripe.Account.CreateParamsCompany` and `stripe.Token.CreateParamsAccountCompany`
* Add support for `proof_of_ultimate_beneficial_ownership` on parameter class `stripe.Account.CreateParamsDocuments`
* Add support for `financial_account` on resource classes `stripe.AccountSession.Components` and `stripe.treasury.OutboundTransfer.DestinationPaymentMethodDetails` and parameter class `stripe.AccountSession.CreateParamsComponents`
* Add support for `issuing_card` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents`
* Add support for `advice_code` on resource classes `stripe.Charge.Outcome`, `stripe.Invoice.LastFinalizationError`, `stripe.PaymentIntent.LastPaymentError`, `stripe.SetupAttempt.SetupError`, and `stripe.SetupIntent.LastSetupError`
* Add support for `country` on resource classes `stripe.Charge.PaymentMethodDetails.Paypal`, `stripe.ConfirmationToken.PaymentMethodPreview.Paypal`, and `stripe.PaymentMethod.Paypal`
* 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`
* Add support for `phone_number_collection` on parameter class `stripe.PaymentLink.ModifyParams`
* Add support for `discounts` on resource `stripe.checkout.Session`
* Add support for `jpy` on parameter classes `stripe.terminal.Configuration.CreateParamsTipping` and `stripe.terminal.Configuration.ModifyParamsTipping` and resource class `stripe.terminal.Configuration.Tipping`
* Add support for `nickname` on parameter classes `stripe.treasury.FinancialAccount.CreateParams` and `stripe.treasury.FinancialAccount.ModifyParams` and resource `stripe.treasury.FinancialAccount`
* Add support for `forwarding_settings` on parameter class `stripe.treasury.FinancialAccount.ModifyParams`
* Add support for `_cls_close` on resource `stripe.treasury.FinancialAccount`
* Add support for `close` on resource `stripe.treasury.FinancialAccount`
* Add support for `is_default` on resource `stripe.treasury.FinancialAccount`
* Add support for `destination_payment_method_data` on parameter class `stripe.treasury.OutboundTransfer.CreateParams`
* Add support for `outbound_transfer` on resource class `stripe.treasury.ReceivedCredit.LinkedFlows.SourceFlowDetails`
* 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`
* 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`
* Add support for `financial_account` on enum `stripe.treasury.OutboundTransfer.DestinationPaymentMethodDetails.type`
* Add support for `outbound_transfer` on enums `stripe.treasury.ReceivedCredit.LinkedFlows.SourceFlowDetails.type` and `stripe.treasury.ReceivedCredit.ListParamsLinkedFlows.source_flow_type`
* Add support for `2025-01-27.acacia` on enum `stripe.WebhookEndpoint.CreateParams.api_version`
* Change type of `pretax_credit_amounts` on `stripe.CreditNote` and `stripe.CreditNoteLineItem` from `Optional[List[PretaxCreditAmount]]` to `List[PretaxCreditAmount]`
* [#1451](https://github.com/stripe/stripe-python/pull/1451) Upgrade to download-artifact@v4
* [#1448](https://github.com/stripe/stripe-python/pull/1448) Updated upload artifact ci action
* [#1446](https://github.com/stripe/stripe-python/pull/1446) add just to publish CI
* [#1444](https://github.com/stripe/stripe-python/pull/1444) Added CONTRIBUTING.md file
* [#1445](https://github.com/stripe/stripe-python/pull/1445) minor justfile fixes & pin CI version
* [#1440](https://github.com/stripe/stripe-python/pull/1440) add justfile, update readme, remove coveralls
* [#1442](https://github.com/stripe/stripe-python/pull/1442) Fix V2 ListObject.data type hint
- Change `stripe.v2.ListObject.data` type hint from `List[StripeObject]` to `List[T]` where T is the specific stripe object contained within the list

## 11.5.0b3 - 2025-01-23
* [#1447](https://github.com/stripe/stripe-python/pull/1447) Update generated code for beta
* 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`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1460
v1472
19 changes: 17 additions & 2 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,21 @@ class Payouts(StripeObject):

charges: Charges
payouts: Payouts
rejected_reason: Optional[
Literal[
"credit",
"fraud",
"fraud_no_intent_to_fulfill",
"fraud_other",
"fraud_payment_method_casher",
"fraud_payment_method_tester",
"other",
"terms_of_service",
]
]
"""
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/)
"""
_inner_class_types = {"charges": Charges, "payouts": Payouts}

class Settings(StripeObject):
Expand Down Expand Up @@ -3548,7 +3563,7 @@ class CreatePersonParams(RequestOptions):
"""
The person's phone number.
"""
political_exposure: NotRequired[str]
political_exposure: NotRequired[Literal["existing", "none"]]
"""
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.
"""
Expand Down Expand Up @@ -4137,7 +4152,7 @@ class ModifyPersonParams(RequestOptions):
"""
The person's phone number.
"""
political_exposure: NotRequired[str]
political_exposure: NotRequired[Literal["existing", "none"]]
"""
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.
"""
Expand Down
4 changes: 2 additions & 2 deletions stripe/_account_person_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class CreateParams(TypedDict):
"""
The person's phone number.
"""
political_exposure: NotRequired[str]
political_exposure: NotRequired[Literal["existing", "none"]]
"""
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.
"""
Expand Down Expand Up @@ -546,7 +546,7 @@ class UpdateParams(TypedDict):
"""
The person's phone number.
"""
political_exposure: NotRequired[str]
political_exposure: NotRequired[Literal["existing", "none"]]
"""
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.
"""
Expand Down
21 changes: 21 additions & 0 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,12 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the payouts list embedded component.
"""
product_tax_code_selector: NotRequired[
"AccountSession.CreateParamsComponentsProductTaxCodeSelector"
]
"""
Configuration for the product tax code selector embedded component.
"""
recipients: NotRequired[
"AccountSession.CreateParamsComponentsRecipients"
]
Expand Down Expand Up @@ -1008,6 +1014,21 @@ class CreateParamsComponentsPayoutsList(TypedDict):
class CreateParamsComponentsPayoutsListFeatures(TypedDict):
pass

class CreateParamsComponentsProductTaxCodeSelector(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsProductTaxCodeSelectorFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsProductTaxCodeSelectorFeatures(TypedDict):
pass

class CreateParamsComponentsRecipients(TypedDict):
enabled: bool
"""
Expand Down
21 changes: 21 additions & 0 deletions stripe/_account_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the payouts list embedded component.
"""
product_tax_code_selector: NotRequired[
"AccountSessionService.CreateParamsComponentsProductTaxCodeSelector"
]
"""
Configuration for the product tax code selector embedded component.
"""
recipients: NotRequired[
"AccountSessionService.CreateParamsComponentsRecipients"
]
Expand Down Expand Up @@ -623,6 +629,21 @@ class CreateParamsComponentsPayoutsList(TypedDict):
class CreateParamsComponentsPayoutsListFeatures(TypedDict):
pass

class CreateParamsComponentsProductTaxCodeSelector(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSessionService.CreateParamsComponentsProductTaxCodeSelectorFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsProductTaxCodeSelectorFeatures(TypedDict):
pass

class CreateParamsComponentsRecipients(TypedDict):
enabled: bool
"""
Expand Down
36 changes: 18 additions & 18 deletions stripe/_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ class Available(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount for bank account.
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
"""
card: Optional[int]
"""
Amount for card.
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
"""
fpx: Optional[int]
"""
Amount for FPX.
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
"""

amount: int
Expand All @@ -54,15 +54,15 @@ class ConnectReserved(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount for bank account.
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
"""
card: Optional[int]
"""
Amount for card.
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
"""
fpx: Optional[int]
"""
Amount for FPX.
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
"""

amount: int
Expand All @@ -81,15 +81,15 @@ class NetAvailable(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount for bank account.
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
"""
card: Optional[int]
"""
Amount for card.
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
"""
fpx: Optional[int]
"""
Amount for FPX.
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
"""

amount: int
Expand All @@ -106,15 +106,15 @@ class SourceTypes(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount for bank account.
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
"""
card: Optional[int]
"""
Amount for card.
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
"""
fpx: Optional[int]
"""
Amount for FPX.
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
"""

amount: int
Expand All @@ -140,15 +140,15 @@ class Available(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount for bank account.
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
"""
card: Optional[int]
"""
Amount for card.
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
"""
fpx: Optional[int]
"""
Amount for FPX.
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
"""

amount: int
Expand All @@ -172,15 +172,15 @@ class Pending(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount for bank account.
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
"""
card: Optional[int]
"""
Amount for card.
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
"""
fpx: Optional[int]
"""
Amount for FPX.
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
"""

amount: int
Expand Down
8 changes: 8 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ class Card(StripeObject):
"""
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
brand_product: Optional[str]
"""
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.)
"""
country: Optional[str]
"""
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.
Expand Down Expand Up @@ -1770,6 +1774,10 @@ class Card(StripeObject):
"""
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
brand_product: Optional[str]
"""
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.)
"""
country: Optional[str]
"""
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.
Expand Down
Loading

0 comments on commit 3f1f902

Please sign in to comment.