Skip to content

Commit

Permalink
Merge pull request #1395 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 18, 2024
2 parents 869f195 + 9bbe9b8 commit 9b12b6f
Show file tree
Hide file tree
Showing 29 changed files with 187 additions and 498 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 10.12.0 - 2024-09-18
* [#1394](https://github.com/stripe/stripe-python/pull/1394) Update generated code
* Add support for `international_transaction` on enum `stripe.treasury.ReceivedDebit.failure_code`
* [#1393](https://github.com/stripe/stripe-python/pull/1393) Update generated code
* Add support for `payer_details` on resource class `stripe.Charge.PaymentMethodDetails.Klarna`
* Add support for `amazon_pay` on resource class `stripe.Dispute.PaymentMethodDetails`
* Add support for `automatically_finalizes_at` on resource `stripe.Invoice`
* Add support for `state_sales_tax` on resource class `stripe.tax.Registration.CountryOptions.Us` and parameter class `stripe.tax.Registration.CreateParamsCountryOptionsUs`
* Add support for `verification_supportability` on enums `stripe.Account.FutureRequirements.Error.code`, `stripe.Account.Requirements.Error.code`, `stripe.BankAccount.FutureRequirements.Error.code`, `stripe.BankAccount.Requirements.Error.code`, `stripe.Capability.FutureRequirements.Error.code`, `stripe.Capability.Requirements.Error.code`, `stripe.Person.FutureRequirements.Error.code`, and `stripe.Person.Requirements.Error.code`
* Add support for `amazon_pay` on enum `stripe.Dispute.PaymentMethodDetails.type`
* Add support for `terminal_reader_invalid_location_for_activation` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code`

## 10.12.0b1 - 2024-09-13
* [#1389](https://github.com/stripe/stripe-python/pull/1389) Update generated code for beta
* Add support for `template` on resource class `stripe.QuotePreviewInvoice.Rendering`
Expand All @@ -13,6 +25,16 @@
* Add support for `issuing_settlement.created` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events`
* Add support for `issuing_settlement.updated` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events`

## 10.11.0 - 2024-09-12
* [#1391](https://github.com/stripe/stripe-python/pull/1391) Update generated code
* Add support for `template` on parameter classes `stripe.Customer.CreateParamsInvoiceSettingsRenderingOptions`, `stripe.Customer.ModifyParamsInvoiceSettingsRenderingOptions`, `stripe.Invoice.CreateParamsRendering`, and `stripe.Invoice.ModifyParamsRendering` and resource classes `stripe.Customer.InvoiceSettings.RenderingOptions` and `stripe.Invoice.Rendering`
* Add support for resource `stripe.InvoiceRenderingTemplate`
* Add support for `required` on parameter classes `stripe.PaymentLink.CreateParamsTaxIdCollection`, `stripe.PaymentLink.ModifyParamsTaxIdCollection`, and `stripe.checkout.Session.CreateParamsTaxIdCollection` and resource classes `stripe.PaymentLink.TaxIdCollection` and `stripe.checkout.Session.TaxIdCollection`
* Add support for `submitted` on enum `stripe.issuing.Card.Shipping.status`
* Change type of `tax_amounts` on `stripe.InvoiceLineItem` from `Optional[List[TaxAmount]]` to `List[TaxAmount]`
* Change type of `tax_rates` on `stripe.InvoiceLineItem` from `Optional[List[TaxRate]]` to `List[TaxRate]`
* Change type of `status_details` on `stripe.test_helpers.TestClock` from `Optional[StatusDetails]` to `StatusDetails`

## 10.11.0b1 - 2024-09-05
* [#1387](https://github.com/stripe/stripe-python/pull/1387) Update generated code for beta
* Add support for `recipients` on parameter class `stripe.AccountSession.CreateParamsComponents`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1260
v1267
2 changes: 0 additions & 2 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,6 @@ def __getattr__(name):
QuoteLineItemService as QuoteLineItemService,
)
from stripe._quote_line_service import QuoteLineService as QuoteLineService
from stripe._quote_phase import QuotePhase as QuotePhase
from stripe._quote_phase_service import QuotePhaseService as QuotePhaseService
from stripe._quote_preview_invoice import (
QuotePreviewInvoice as QuotePreviewInvoice,
)
Expand Down
2 changes: 2 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down Expand Up @@ -936,6 +937,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down
8 changes: 8 additions & 0 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,14 @@ class CreateParamsComponentsFinancialAccountFeatures(TypedDict):
"""
Whether to allow money movement features.
"""
send_money: NotRequired[bool]
"""
Whether to allow sending money.
"""
transfer_balance: NotRequired[bool]
"""
Whether to allow transferring balance.
"""

class CreateParamsComponentsFinancialAccountTransactions(TypedDict):
enabled: bool
Expand Down
8 changes: 8 additions & 0 deletions stripe/_account_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ class CreateParamsComponentsFinancialAccountFeatures(TypedDict):
"""
Whether to allow money movement features.
"""
send_money: NotRequired[bool]
"""
Whether to allow sending money.
"""
transfer_balance: NotRequired[bool]
"""
Whether to allow transferring balance.
"""

class CreateParamsComponentsFinancialAccountTransactions(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-09-05.preview-v2"
PREVIEW = "cs_ubb_launch"
2 changes: 2 additions & 0 deletions stripe/_bank_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down Expand Up @@ -249,6 +250,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down
2 changes: 2 additions & 0 deletions stripe/_capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down Expand Up @@ -282,6 +283,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down
18 changes: 18 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,23 @@ class Receipt(StripeObject):
_inner_class_types = {"receipt": Receipt}

class Klarna(StripeObject):
class PayerDetails(StripeObject):
class Address(StripeObject):
country: Optional[str]
"""
The payer address country
"""

address: Optional[Address]
"""
The payer's address
"""
_inner_class_types = {"address": Address}

payer_details: Optional[PayerDetails]
"""
The payer details for this transaction.
"""
payment_method_category: Optional[str]
"""
The Klarna payment method used for this transaction.
Expand All @@ -1304,6 +1321,7 @@ class Klarna(StripeObject):
Preferred language of the Klarna authorization page that the customer is redirected to.
Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`
"""
_inner_class_types = {"payer_details": PayerDetails}

class Konbini(StripeObject):
class Store(StripeObject):
Expand Down
16 changes: 14 additions & 2 deletions stripe/_dispute.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ class VisaCompellingEvidence3(StripeObject):
_inner_class_types = {"enhanced_eligibility": EnhancedEligibility}

class PaymentMethodDetails(StripeObject):
class AmazonPay(StripeObject):
dispute_type: Optional[Literal["chargeback", "claim"]]
"""
The AmazonPay dispute type, chargeback or claim
"""

class Card(StripeObject):
brand: str
"""
Expand Down Expand Up @@ -369,14 +375,20 @@ class Paypal(StripeObject):
The reason for the dispute as defined by PayPal
"""

amazon_pay: Optional[AmazonPay]
card: Optional[Card]
klarna: Optional[Klarna]
paypal: Optional[Paypal]
type: Literal["card", "klarna", "paypal"]
type: Literal["amazon_pay", "card", "klarna", "paypal"]
"""
Payment method type.
"""
_inner_class_types = {"card": Card, "klarna": Klarna, "paypal": Paypal}
_inner_class_types = {
"amazon_pay": AmazonPay,
"card": Card,
"klarna": Klarna,
"paypal": Paypal,
}

class CloseParams(RequestOptions):
expand: NotRequired[List[str]]
Expand Down
5 changes: 5 additions & 0 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ class LastFinalizationError(StripeObject):
"terminal_reader_busy",
"terminal_reader_collected_data_invalid",
"terminal_reader_hardware_fault",
"terminal_reader_invalid_location_for_activation",
"terminal_reader_invalid_location_for_payment",
"terminal_reader_offline",
"terminal_reader_timeout",
Expand Down Expand Up @@ -9250,6 +9251,10 @@ class VoidInvoiceParams(RequestOptions):
Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
"""
automatic_tax: AutomaticTax
automatically_finalizes_at: Optional[int]
"""
The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
"""
billing_reason: Optional[
Literal[
"automatic_pending_invoice_item_invoice",
Expand Down
5 changes: 5 additions & 0 deletions stripe/_invoice_rendering_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
class InvoiceRenderingTemplate(
ListableAPIResource["InvoiceRenderingTemplate"]
):
"""
Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates
can be created from within the Dashboard, and they can be used over the API when creating invoices.
"""

OBJECT_NAME: ClassVar[Literal["invoice_rendering_template"]] = (
"invoice_rendering_template"
)
Expand Down
1 change: 0 additions & 1 deletion stripe/_object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
stripe.PromotionCode.OBJECT_NAME: stripe.PromotionCode,
stripe.Quote.OBJECT_NAME: stripe.Quote,
stripe.QuoteLine.OBJECT_NAME: stripe.QuoteLine,
stripe.QuotePhase.OBJECT_NAME: stripe.QuotePhase,
stripe.QuotePreviewInvoice.OBJECT_NAME: stripe.QuotePreviewInvoice,
stripe.QuotePreviewSubscriptionSchedule.OBJECT_NAME: stripe.QuotePreviewSubscriptionSchedule,
stripe.radar.EarlyFraudWarning.OBJECT_NAME: stripe.radar.EarlyFraudWarning,
Expand Down
1 change: 1 addition & 0 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ class LastPaymentError(StripeObject):
"terminal_reader_busy",
"terminal_reader_collected_data_invalid",
"terminal_reader_hardware_fault",
"terminal_reader_invalid_location_for_activation",
"terminal_reader_invalid_location_for_payment",
"terminal_reader_offline",
"terminal_reader_timeout",
Expand Down
4 changes: 3 additions & 1 deletion stripe/_payment_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ class CreateParams(RequestOptions):
"payto",
"pix",
"promptpay",
"rechnung",
"sepa_debit",
"sofort",
"swish",
Expand Down Expand Up @@ -1680,7 +1681,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', 'mb_way', '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', 'rechnung', '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 @@ -2457,6 +2458,7 @@ class RetrieveParams(RequestOptions):
"payto",
"pix",
"promptpay",
"rechnung",
"sepa_debit",
"sofort",
"swish",
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 @@ -141,6 +141,7 @@ class CreateParams(TypedDict):
"payto",
"pix",
"promptpay",
"rechnung",
"sepa_debit",
"sofort",
"swish",
Expand Down Expand Up @@ -1023,7 +1024,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', 'mb_way', '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', 'rechnung', '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: 2 additions & 0 deletions stripe/_person.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down Expand Up @@ -443,6 +444,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down
Loading

0 comments on commit 9b12b6f

Please sign in to comment.