Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1356

Merged
merged 9 commits into from
Jul 11, 2024
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
// Formatting
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports": "never"
}
},

// Tests
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
* Add support for resource `stripe.financial_connections.Institution`
* Add support for `balance` on enums `stripe.financial_connections.Account.subscriptions`, `stripe.financial_connections.Account.SubscribeParams.features`, and `stripe.financial_connections.Account.UnsubscribeParams.features`
* Add support for `financial_connections_institution_unavailable` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.QuotePreviewInvoice.LastFinalizationError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code`
* Add support for `payment_intent_fx_quote_invalid` on enum `stripe.QuotePreviewInvoice.LastFinalizationError.code`
* Add support for `payment_intent_fx_quote_invalid` on enum `stripe.QuotePreviewInvoice.LastFinalizationError.code`

## 10.2.0 - 2024-07-05
* [#1354](https://github.com/stripe/stripe-python/pull/1354) Update generated code
* Add support for `_cls_add_lines`, `_cls_remove_lines`, `_cls_update_lines`, `add_lines`, `remove_lines`, `update_lines` on resource `stripe.Invoice`
* Add support for `posted_at` on parameter class `stripe.tax.Transaction.CreateFromCalculationParams` and resource `stripe.tax.Transaction`
* Add support for `payment_intent_fx_quote_invalid` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code`

## 10.2.0b1 - 2024-06-27
* [#1349](https://github.com/stripe/stripe-python/pull/1349) Update generated code for beta
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1116
v1124
2 changes: 1 addition & 1 deletion stripe/_customer_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class PricingTable(StripeObject):
"""
This hash contains whether the buy button is enabled.
"""
payment_element: Optional[PaymentElement]
payment_element: PaymentElement
"""
This hash contains whether the Payment Element is enabled and the features it supports.
"""
Expand Down
1 change: 1 addition & 0 deletions stripe/_dispute.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ class VisaCompellingEvidence3(StripeObject):
"""
status: Literal[
"accepted",
"not_qualified",
"partner_rejected",
"qualified",
"requires_action",
Expand Down
5 changes: 0 additions & 5 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,6 @@ class LastFinalizationError(StripeObject):
"bank_account_unverified",
"bank_account_verification_failed",
"billing_invalid_mandate",
"billing_policy_remote_function_response_invalid",
"billing_policy_remote_function_timeout",
"billing_policy_remote_function_unexpected_status_code",
"billing_policy_remote_function_unreachable",
"bitcoin_upgrade_required",
"capture_charge_authorization_expired",
"capture_unauthorized_payment",
Expand Down Expand Up @@ -459,7 +455,6 @@ class LastFinalizationError(StripeObject):
"parameters_exclusive",
"payment_intent_action_required",
"payment_intent_authentication_failure",
"payment_intent_fx_quote_invalid",
"payment_intent_incompatible_payment_method",
"payment_intent_invalid_parameter",
"payment_intent_konbini_rejected_confirmation_number",
Expand Down
5 changes: 0 additions & 5 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ class LastPaymentError(StripeObject):
"bank_account_unverified",
"bank_account_verification_failed",
"billing_invalid_mandate",
"billing_policy_remote_function_response_invalid",
"billing_policy_remote_function_timeout",
"billing_policy_remote_function_unexpected_status_code",
"billing_policy_remote_function_unreachable",
"bitcoin_upgrade_required",
"capture_charge_authorization_expired",
"capture_unauthorized_payment",
Expand Down Expand Up @@ -199,7 +195,6 @@ class LastPaymentError(StripeObject):
"parameters_exclusive",
"payment_intent_action_required",
"payment_intent_authentication_failure",
"payment_intent_fx_quote_invalid",
"payment_intent_incompatible_payment_method",
"payment_intent_invalid_parameter",
"payment_intent_konbini_rejected_confirmation_number",
Expand Down
5 changes: 0 additions & 5 deletions stripe/_quote_preview_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,6 @@ class LastFinalizationError(StripeObject):
"bank_account_unverified",
"bank_account_verification_failed",
"billing_invalid_mandate",
"billing_policy_remote_function_response_invalid",
"billing_policy_remote_function_timeout",
"billing_policy_remote_function_unexpected_status_code",
"billing_policy_remote_function_unreachable",
"bitcoin_upgrade_required",
"capture_charge_authorization_expired",
"capture_unauthorized_payment",
Expand Down Expand Up @@ -441,7 +437,6 @@ class LastFinalizationError(StripeObject):
"parameters_exclusive",
"payment_intent_action_required",
"payment_intent_authentication_failure",
"payment_intent_fx_quote_invalid",
"payment_intent_incompatible_payment_method",
"payment_intent_invalid_parameter",
"payment_intent_konbini_rejected_confirmation_number",
Expand Down
5 changes: 0 additions & 5 deletions stripe/_setup_attempt.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,6 @@ class SetupError(StripeObject):
"bank_account_unverified",
"bank_account_verification_failed",
"billing_invalid_mandate",
"billing_policy_remote_function_response_invalid",
"billing_policy_remote_function_timeout",
"billing_policy_remote_function_unexpected_status_code",
"billing_policy_remote_function_unreachable",
"bitcoin_upgrade_required",
"capture_charge_authorization_expired",
"capture_unauthorized_payment",
Expand Down Expand Up @@ -536,7 +532,6 @@ class SetupError(StripeObject):
"parameters_exclusive",
"payment_intent_action_required",
"payment_intent_authentication_failure",
"payment_intent_fx_quote_invalid",
"payment_intent_incompatible_payment_method",
"payment_intent_invalid_parameter",
"payment_intent_konbini_rejected_confirmation_number",
Expand Down
5 changes: 0 additions & 5 deletions stripe/_setup_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ class LastSetupError(StripeObject):
"bank_account_unverified",
"bank_account_verification_failed",
"billing_invalid_mandate",
"billing_policy_remote_function_response_invalid",
"billing_policy_remote_function_timeout",
"billing_policy_remote_function_unexpected_status_code",
"billing_policy_remote_function_unreachable",
"bitcoin_upgrade_required",
"capture_charge_authorization_expired",
"capture_unauthorized_payment",
Expand Down Expand Up @@ -184,7 +180,6 @@ class LastSetupError(StripeObject):
"parameters_exclusive",
"payment_intent_action_required",
"payment_intent_authentication_failure",
"payment_intent_fx_quote_invalid",
"payment_intent_incompatible_payment_method",
"payment_intent_invalid_parameter",
"payment_intent_konbini_rejected_confirmation_number",
Expand Down
12 changes: 6 additions & 6 deletions stripe/_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -2909,19 +2909,19 @@ def modify(
"""
Updates an existing subscription to match the specified parameters.
When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
To preview how the proration is calculated, use the [upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) endpoint.
To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
Switching prices does not normally change the billing date or generate an immediate charge unless:
The billing interval is changed (for example, from monthly to yearly).
The subscription moves from free to paid, or paid to free.
The subscription moves from free to paid.
A trial starts or ends.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
Expand All @@ -2946,19 +2946,19 @@ async def modify_async(
"""
Updates an existing subscription to match the specified parameters.
When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
To preview how the proration is calculated, use the [upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) endpoint.
To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
Switching prices does not normally change the billing date or generate an immediate charge unless:
The billing interval is changed (for example, from monthly to yearly).
The subscription moves from free to paid, or paid to free.
The subscription moves from free to paid.
A trial starts or ends.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
Expand Down
12 changes: 6 additions & 6 deletions stripe/_subscription_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2005,19 +2005,19 @@ def update(
"""
Updates an existing subscription to match the specified parameters.
When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
To preview how the proration is calculated, use the [upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) endpoint.
To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
Switching prices does not normally change the billing date or generate an immediate charge unless:
The billing interval is changed (for example, from monthly to yearly).
The subscription moves from free to paid, or paid to free.
The subscription moves from free to paid.
A trial starts or ends.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
Expand Down Expand Up @@ -2050,19 +2050,19 @@ async def update_async(
"""
Updates an existing subscription to match the specified parameters.
When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
To preview how the proration is calculated, use the [upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) endpoint.
To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
Switching prices does not normally change the billing date or generate an immediate charge unless:
The billing interval is changed (for example, from monthly to yearly).
The subscription moves from free to paid, or paid to free.
The subscription moves from free to paid.
A trial starts or ends.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
Expand Down
2 changes: 1 addition & 1 deletion stripe/billing_portal/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Session(CreateableAPIResource["Session"]):
Create sessions on-demand when customers intend to manage their subscriptions
and billing details.
Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).
Related guide: [Customer management](https://stripe.com/customer-management)
"""

OBJECT_NAME: ClassVar[Literal["billing_portal.session"]] = (
Expand Down
2 changes: 1 addition & 1 deletion stripe/capital/_financing_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Details(StripeObject):
class CurrentRepaymentInterval(StripeObject):
due_at: int
"""
The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account will be debited.
The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited.
Given in seconds since unix epoch.
"""
paid_amount: Optional[int]
Expand Down
6 changes: 3 additions & 3 deletions stripe/financial_connections/_institution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class Institution(ListableAPIResource["Institution"]):
"""
An institution represents a banking institution which may be available for an end user to select in the Financial Connections authentication flow.
An institution represents a financial institution to which an end user can connect using the Financial Connections authentication flow.
"""

OBJECT_NAME: ClassVar[Literal["financial_connections.institution"]] = (
Expand Down Expand Up @@ -96,15 +96,15 @@ class RetrieveParams(RequestOptions):
"""
routing_numbers: List[str]
"""
A list of routing numbers which are known to correspond to this institution.
A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions.
"""
status: Literal["active", "degraded", "inactive"]
"""
The status of this institution in the Financial Connections authentication flow.
"""
url: Optional[str]
"""
The URL for this institution's website.
A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution.
"""

@classmethod
Expand Down
Loading