Skip to content

Commit

Permalink
Merge pull request #1387 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] committed Sep 5, 2024
2 parents e0938b1 + 937c4b3 commit c2ec10c
Show file tree
Hide file tree
Showing 26 changed files with 317 additions and 17 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1226
v1247
18 changes: 18 additions & 0 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the payouts list embedded component.
"""
recipients: NotRequired[
"AccountSession.CreateParamsComponentsRecipients"
]
tax_registrations: NotRequired[
"AccountSession.CreateParamsComponentsTaxRegistrations"
]
Expand Down Expand Up @@ -805,6 +808,21 @@ class CreateParamsComponentsPayoutsList(TypedDict):
class CreateParamsComponentsPayoutsListFeatures(TypedDict):
pass

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

class CreateParamsComponentsRecipientsFeatures(TypedDict):
pass

class CreateParamsComponentsTaxRegistrations(TypedDict):
enabled: bool
"""
Expand Down
18 changes: 18 additions & 0 deletions stripe/_account_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the payouts list embedded component.
"""
recipients: NotRequired[
"AccountSessionService.CreateParamsComponentsRecipients"
]
tax_registrations: NotRequired[
"AccountSessionService.CreateParamsComponentsTaxRegistrations"
]
Expand Down Expand Up @@ -544,6 +547,21 @@ class CreateParamsComponentsPayoutsList(TypedDict):
class CreateParamsComponentsPayoutsListFeatures(TypedDict):
pass

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

class CreateParamsComponentsRecipientsFeatures(TypedDict):
pass

class CreateParamsComponentsTaxRegistrations(TypedDict):
enabled: bool
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_api_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# File generated from our OpenAPI spec
class _ApiVersion:
CURRENT = "2024-06-20"
PREVIEW = "2024-08-21.preview-v2"
PREVIEW = "2024-09-05.preview-v2"
1 change: 1 addition & 0 deletions stripe/_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class RetrieveParams(RequestOptions):
"application_fee.refunded",
"balance.available",
"billing.alert.triggered",
"billing.meter_error_report.triggered",
"billing_portal.configuration.created",
"billing_portal.configuration.updated",
"billing_portal.session.created",
Expand Down
6 changes: 3 additions & 3 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@ class CreatePreviewParams(RequestOptions):
List["Invoice.CreatePreviewParamsInvoiceItem"]
]
"""
List of invoice items to add or update in the upcoming invoice preview.
List of invoice items to add or update in the upcoming invoice preview (up to 250).
"""
issuer: NotRequired["Invoice.CreatePreviewParamsIssuer"]
"""
Expand Down Expand Up @@ -4865,7 +4865,7 @@ class UpcomingLinesParams(RequestOptions):
List["Invoice.UpcomingLinesParamsInvoiceItem"]
]
"""
List of invoice items to add or update in the upcoming invoice preview.
List of invoice items to add or update in the upcoming invoice preview (up to 250).
"""
issuer: NotRequired["Invoice.UpcomingLinesParamsIssuer"]
"""
Expand Down Expand Up @@ -6939,7 +6939,7 @@ class UpcomingParams(RequestOptions):
"""
invoice_items: NotRequired[List["Invoice.UpcomingParamsInvoiceItem"]]
"""
List of invoice items to add or update in the upcoming invoice preview.
List of invoice items to add or update in the upcoming invoice preview (up to 250).
"""
issuer: NotRequired["Invoice.UpcomingParamsIssuer"]
"""
Expand Down
4 changes: 2 additions & 2 deletions stripe/_invoice_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ class CreatePreviewParams(TypedDict):
List["InvoiceService.CreatePreviewParamsInvoiceItem"]
]
"""
List of invoice items to add or update in the upcoming invoice preview.
List of invoice items to add or update in the upcoming invoice preview (up to 250).
"""
issuer: NotRequired["InvoiceService.CreatePreviewParamsIssuer"]
"""
Expand Down Expand Up @@ -3108,7 +3108,7 @@ class UpcomingParams(TypedDict):
List["InvoiceService.UpcomingParamsInvoiceItem"]
]
"""
List of invoice items to add or update in the upcoming invoice preview.
List of invoice items to add or update in the upcoming invoice preview (up to 250).
"""
issuer: NotRequired["InvoiceService.UpcomingParamsIssuer"]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_invoice_upcoming_lines_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ListParams(TypedDict):
List["InvoiceUpcomingLinesService.ListParamsInvoiceItem"]
]
"""
List of invoice items to add or update in the upcoming invoice preview.
List of invoice items to add or update in the upcoming invoice preview (up to 250).
"""
issuer: NotRequired["InvoiceUpcomingLinesService.ListParamsIssuer"]
"""
Expand Down
1 change: 1 addition & 0 deletions stripe/_object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
stripe.billing.Alert.OBJECT_NAME: stripe.billing.Alert,
stripe.billing.AlertTriggered.OBJECT_NAME: stripe.billing.AlertTriggered,
stripe.billing.Meter.OBJECT_NAME: stripe.billing.Meter,
stripe.billing.MeterErrorReport.OBJECT_NAME: stripe.billing.MeterErrorReport,
stripe.billing.MeterEvent.OBJECT_NAME: stripe.billing.MeterEvent,
stripe.billing.MeterEventAdjustment.OBJECT_NAME: stripe.billing.MeterEventAdjustment,
stripe.billing.MeterEventSummary.OBJECT_NAME: stripe.billing.MeterEventSummary,
Expand Down
24 changes: 24 additions & 0 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -13864,6 +13864,9 @@ def _cls_confirm(
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
return cast(
"PaymentIntent",
Expand Down Expand Up @@ -13904,6 +13907,9 @@ def confirm(
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
...

Expand Down Expand Up @@ -13934,6 +13940,9 @@ def confirm(
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
...

Expand Down Expand Up @@ -13964,6 +13973,9 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues]
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
return cast(
"PaymentIntent",
Expand Down Expand Up @@ -14003,6 +14015,9 @@ async def _cls_confirm_async(
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
return cast(
"PaymentIntent",
Expand Down Expand Up @@ -14043,6 +14058,9 @@ async def confirm_async(
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
...

Expand Down Expand Up @@ -14073,6 +14091,9 @@ async def confirm_async(
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
...

Expand Down Expand Up @@ -14103,6 +14124,9 @@ async def confirm_async( # pyright: ignore[reportGeneralTypeIssues]
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
return cast(
"PaymentIntent",
Expand Down
6 changes: 6 additions & 0 deletions stripe/_payment_intent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -11301,6 +11301,9 @@ def confirm(
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
return cast(
PaymentIntent,
Expand Down Expand Up @@ -11344,6 +11347,9 @@ async def confirm_async(
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.
After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
"""
return cast(
PaymentIntent,
Expand Down
4 changes: 3 additions & 1 deletion stripe/_payment_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ class CreateParams(RequestOptions):
"klarna",
"konbini",
"link",
"mb_way",
"mobilepay",
"multibanco",
"oxxo",
Expand Down Expand Up @@ -1674,7 +1675,7 @@ class ModifyParams(RequestOptions):
If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
"""
payment_method_types: NotRequired[
"Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]"
"Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]"
]
"""
The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
Expand Down Expand Up @@ -2437,6 +2438,7 @@ class RetrieveParams(RequestOptions):
"klarna",
"konbini",
"link",
"mb_way",
"mobilepay",
"multibanco",
"oxxo",
Expand Down
3 changes: 2 additions & 1 deletion stripe/_payment_link_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class CreateParams(TypedDict):
"klarna",
"konbini",
"link",
"mb_way",
"mobilepay",
"multibanco",
"oxxo",
Expand Down Expand Up @@ -1018,7 +1019,7 @@ class UpdateParams(TypedDict):
If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
"""
payment_method_types: NotRequired[
"Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]"
"Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]"
]
"""
The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
Expand Down
2 changes: 1 addition & 1 deletion stripe/_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class RetrieveReversalParams(RequestOptions):
"""
source_transaction: Optional[ExpandableField["Charge"]]
"""
ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.
ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance.
"""
source_type: Optional[str]
"""
Expand Down
2 changes: 2 additions & 0 deletions stripe/_webhook_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ class CreateParams(RequestOptions):
"application_fee.refunded",
"balance.available",
"billing.alert.triggered",
"billing.meter_error_report.triggered",
"billing_portal.configuration.created",
"billing_portal.configuration.updated",
"billing_portal.session.created",
Expand Down Expand Up @@ -479,6 +480,7 @@ class ModifyParams(RequestOptions):
"application_fee.refunded",
"balance.available",
"billing.alert.triggered",
"billing.meter_error_report.triggered",
"billing_portal.configuration.created",
"billing_portal.configuration.updated",
"billing_portal.session.created",
Expand Down
2 changes: 2 additions & 0 deletions stripe/_webhook_endpoint_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class CreateParams(TypedDict):
"application_fee.refunded",
"balance.available",
"billing.alert.triggered",
"billing.meter_error_report.triggered",
"billing_portal.configuration.created",
"billing_portal.configuration.updated",
"billing_portal.session.created",
Expand Down Expand Up @@ -466,6 +467,7 @@ class UpdateParams(TypedDict):
"application_fee.refunded",
"balance.available",
"billing.alert.triggered",
"billing.meter_error_report.triggered",
"billing_portal.configuration.created",
"billing_portal.configuration.updated",
"billing_portal.session.created",
Expand Down
3 changes: 3 additions & 0 deletions stripe/api_resources/billing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
from stripe.api_resources.billing.alert import Alert
from stripe.api_resources.billing.alert_triggered import AlertTriggered
from stripe.api_resources.billing.meter import Meter
from stripe.api_resources.billing.meter_error_report import (
MeterErrorReport,
)
from stripe.api_resources.billing.meter_event import MeterEvent
from stripe.api_resources.billing.meter_event_adjustment import (
MeterEventAdjustment,
Expand Down
21 changes: 21 additions & 0 deletions stripe/api_resources/billing/meter_error_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from typing_extensions import TYPE_CHECKING
from warnings import warn

warn(
"""
The stripe.api_resources.billing.meter_error_report package is deprecated, please change your
imports to import from stripe.billing directly.
From:
from stripe.api_resources.billing.meter_error_report import MeterErrorReport
To:
from stripe.billing import MeterErrorReport
""",
DeprecationWarning,
stacklevel=2,
)
if not TYPE_CHECKING:
from stripe.billing._meter_error_report import ( # noqa
MeterErrorReport,
)
3 changes: 3 additions & 0 deletions stripe/billing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
from stripe.billing._alert_service import AlertService as AlertService
from stripe.billing._alert_triggered import AlertTriggered as AlertTriggered
from stripe.billing._meter import Meter as Meter
from stripe.billing._meter_error_report import (
MeterErrorReport as MeterErrorReport,
)
from stripe.billing._meter_event import MeterEvent as MeterEvent
from stripe.billing._meter_event_adjustment import (
MeterEventAdjustment as MeterEventAdjustment,
Expand Down
8 changes: 8 additions & 0 deletions stripe/billing/_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ class CreateParamsFilter(TypedDict):
"""
Limit the scope to this alert only to this customer.
"""
subscription: NotRequired[str]
"""
Limit the scope of this rated usage alert to this subscription.
"""
subscription_item: NotRequired[str]
"""
Limit the scope of this rated usage alert to this subscription item.
"""

class CreateParamsUsageThresholdConfig(TypedDict):
gte: int
Expand Down
8 changes: 8 additions & 0 deletions stripe/billing/_alert_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ class CreateParamsFilter(TypedDict):
"""
Limit the scope to this alert only to this customer.
"""
subscription: NotRequired[str]
"""
Limit the scope of this rated usage alert to this subscription.
"""
subscription_item: NotRequired[str]
"""
Limit the scope of this rated usage alert to this subscription item.
"""

class CreateParamsUsageThresholdConfig(TypedDict):
gte: int
Expand Down
Loading

0 comments on commit c2ec10c

Please sign in to comment.