Skip to content

Commit

Permalink
Merge pull request #1370 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 Aug 1, 2024
2 parents 9642179 + 7b70f16 commit 56b6f13
Show file tree
Hide file tree
Showing 30 changed files with 1,746 additions and 314 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 10.6.0 - 2024-08-01
* [#1369](https://github.com/stripe/stripe-python/pull/1369) Update generated code
* Add support for resource `stripe.billing.Alert`
* ⚠️ Remove support for `authorization_code` on resource class `stripe.Charge.PaymentMethodDetails.Card`. This was accidentally released last week.
* Add support for `billing.alert.triggered` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events`
* Add support for `charge_exceeds_transaction_limit` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code`

## 10.6.0b1 - 2024-07-25
* [#1361](https://github.com/stripe/stripe-python/pull/1361) Update generated code for beta
* Add support for `capital` on parameter class `stripe.Account.CreateParamsSettings` and resource class `stripe.Account.Settings`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1157
v1169
48 changes: 48 additions & 0 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the account onboarding embedded component.
"""
app_install: NotRequired[
"AccountSession.CreateParamsComponentsAppInstall"
]
"""
Configuration for the app install component.
"""
app_viewport: NotRequired[
"AccountSession.CreateParamsComponentsAppViewport"
]
"""
Configuration for the app viewport component.
"""
balances: NotRequired["AccountSession.CreateParamsComponentsBalances"]
"""
Configuration for the balances embedded component.
Expand Down Expand Up @@ -400,6 +412,42 @@ class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

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

class CreateParamsComponentsAppInstallFeatures(TypedDict):
allowed_apps: NotRequired["Literal['']|List[str]"]
"""
List of apps allowed to be enabled for this account session.
"""

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

class CreateParamsComponentsAppViewportFeatures(TypedDict):
allowed_apps: NotRequired["Literal['']|List[str]"]
"""
List of apps allowed to be enabled for this account session.
"""

class CreateParamsComponentsBalances(TypedDict):
enabled: bool
"""
Expand Down
50 changes: 49 additions & 1 deletion stripe/_account_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from stripe._request_options import RequestOptions
from stripe._stripe_service import StripeService
from typing import List, cast
from typing_extensions import NotRequired, TypedDict
from typing_extensions import Literal, NotRequired, TypedDict


class AccountSessionService(StripeService):
Expand Down Expand Up @@ -35,6 +35,18 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the account onboarding embedded component.
"""
app_install: NotRequired[
"AccountSessionService.CreateParamsComponentsAppInstall"
]
"""
Configuration for the app install component.
"""
app_viewport: NotRequired[
"AccountSessionService.CreateParamsComponentsAppViewport"
]
"""
Configuration for the app viewport component.
"""
balances: NotRequired[
"AccountSessionService.CreateParamsComponentsBalances"
]
Expand Down Expand Up @@ -165,6 +177,42 @@ class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

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

class CreateParamsComponentsAppInstallFeatures(TypedDict):
allowed_apps: NotRequired["Literal['']|List[str]"]
"""
List of apps allowed to be enabled for this account session.
"""

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

class CreateParamsComponentsAppViewportFeatures(TypedDict):
allowed_apps: NotRequired["Literal['']|List[str]"]
"""
List of apps allowed to be enabled for this account session.
"""

class CreateParamsComponentsBalances(TypedDict):
enabled: bool
"""
Expand Down
4 changes: 0 additions & 4 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,6 @@ class ShippingAddress(StripeObject):
"""
The authorized amount.
"""
authorization_code: Optional[str]
"""
Authorization code on the charge.
"""
brand: Optional[str]
"""
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Expand Down
10 changes: 0 additions & 10 deletions stripe/_dispute.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,6 @@ class ShippingAddress(StripeObject):
class EvidenceDetails(StripeObject):
class EnhancedEligibility(StripeObject):
class VisaCompellingEvidence3(StripeObject):
partner_rejected_details: Optional[
Literal[
"fraudulent_prior_transaction",
"other",
"visa_internal_error",
]
]
"""
Rejection reason for evidence submitted as Visa Compelling Evidence 3.0 to Visa and rejected by Visa.
"""
required_actions: List[
Literal[
"missing_customer_identifiers",
Expand Down
2 changes: 2 additions & 0 deletions stripe/_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ class RetrieveParams(RequestOptions):
"customer.subscription.paused",
"customer.subscription.pending_update_applied",
"customer.subscription.pending_update_expired",
"customer.subscription.price_migration_failed",
"customer.subscription.resumed",
"customer.subscription.trial_will_end",
"customer.subscription.updated",
Expand Down Expand Up @@ -415,6 +416,7 @@ class RetrieveParams(RequestOptions):
"subscription_schedule.completed",
"subscription_schedule.created",
"subscription_schedule.expiring",
"subscription_schedule.price_migration_failed",
"subscription_schedule.released",
"subscription_schedule.updated",
"tax.form.updated",
Expand Down
Loading

0 comments on commit 56b6f13

Please sign in to comment.