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 #1389

Merged
merged 13 commits into from
Sep 13, 2024
Merged
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
* Add support for `mb_way` on enum `stripe.checkout.Session.CreateParams.payment_method_types`
* Add support for `terminal_reader_collected_data_invalid` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.QuotePreviewInvoice.LastFinalizationError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code`

## 10.10.0 - 2024-09-05
* [#1376](https://github.com/stripe/stripe-python/pull/1376) Update generated code
* Add support for `subscription` on parameter class `stripe.billing.Alert.CreateParamsFilter`
* Change type of `customer_consent_collected` on `stripe.terminal.Reader.ProcessSetupIntentParams` from `bool` to `NotRequired[bool]`

## 10.9.0 - 2024-08-29
* [#1385](https://github.com/stripe/stripe-python/pull/1385) Generate SDK for OpenAPI spec version 1230
* Add support for `status_details` on resource `stripe.test_helpers.TestClock`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1247
v1260
9 changes: 6 additions & 3 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@ def __getattr__(name):
from stripe._invoice_payment_service import (
InvoicePaymentService as InvoicePaymentService,
)
from stripe._invoice_rendering_template import (
InvoiceRenderingTemplate as InvoiceRenderingTemplate,
)
from stripe._invoice_rendering_template_service import (
InvoiceRenderingTemplateService as InvoiceRenderingTemplateService,
)
from stripe._invoice_service import InvoiceService as InvoiceService
from stripe._invoice_upcoming_lines_service import (
InvoiceUpcomingLinesService as InvoiceUpcomingLinesService,
Expand Down Expand Up @@ -482,9 +488,6 @@ def __getattr__(name):
)
from stripe._quote_line_service import QuoteLineService as QuoteLineService
from stripe._quote_phase import QuotePhase as QuotePhase
from stripe._quote_phase_line_item_service import (
QuotePhaseLineItemService as QuotePhaseLineItemService,
)
from stripe._quote_phase_service import QuotePhaseService as QuotePhaseService
from stripe._quote_preview_invoice import (
QuotePreviewInvoice as QuotePreviewInvoice,
Expand Down
12 changes: 12 additions & 0 deletions stripe/_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ class RenderingOptions(StripeObject):
"""
How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
"""
template: Optional[str]
"""
ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice.
"""

custom_fields: Optional[List[CustomField]]
"""
Expand Down Expand Up @@ -452,6 +456,10 @@ class CreateParamsInvoiceSettingsRenderingOptions(TypedDict):
"""
How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
"""
template: NotRequired[str]
"""
ID of the invoice rendering template to use for future invoices.
"""

class CreateParamsShipping(TypedDict):
address: "Customer.CreateParamsShippingAddress"
Expand Down Expand Up @@ -1115,6 +1123,10 @@ class ModifyParamsInvoiceSettingsRenderingOptions(TypedDict):
"""
How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
"""
template: NotRequired[str]
"""
ID of the invoice rendering template to use for future invoices.
"""

class ModifyParamsShipping(TypedDict):
address: "Customer.ModifyParamsShippingAddress"
Expand Down
8 changes: 8 additions & 0 deletions stripe/_customer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ class CreateParamsInvoiceSettingsRenderingOptions(TypedDict):
"""
How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
"""
template: NotRequired[str]
"""
ID of the invoice rendering template to use for future invoices.
"""

class CreateParamsShipping(TypedDict):
address: "CustomerService.CreateParamsShippingAddress"
Expand Down Expand Up @@ -600,6 +604,10 @@ class UpdateParamsInvoiceSettingsRenderingOptions(TypedDict):
"""
How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
"""
template: NotRequired[str]
"""
ID of the invoice rendering template to use for future invoices.
"""

class UpdateParamsShipping(TypedDict):
address: "CustomerService.UpdateParamsShippingAddress"
Expand Down
4 changes: 4 additions & 0 deletions stripe/_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,14 @@ class RetrieveParams(RequestOptions):
"issuing_dispute.funds_rescinded",
"issuing_dispute.submitted",
"issuing_dispute.updated",
"issuing_dispute_settlement_detail.created",
"issuing_dispute_settlement_detail.updated",
"issuing_personalization_design.activated",
"issuing_personalization_design.deactivated",
"issuing_personalization_design.rejected",
"issuing_personalization_design.updated",
"issuing_settlement.created",
"issuing_settlement.updated",
"issuing_token.created",
"issuing_token.updated",
"issuing_transaction.created",
Expand Down
24 changes: 24 additions & 0 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,14 @@ class Pdf(StripeObject):
"""
Invoice pdf rendering options
"""
template: Optional[str]
"""
ID of the rendering template that the invoice is formatted by.
"""
template_version: Optional[int]
"""
Version of the rendering template that the invoice is using.
"""
_inner_class_types = {"pdf": Pdf}

class ShippingCost(StripeObject):
Expand Down Expand Up @@ -1900,6 +1908,14 @@ class CreateParamsRendering(TypedDict):
"""
Invoice pdf rendering options
"""
template: NotRequired[str]
"""
ID of the invoice rendering template to use for this invoice.
"""
template_version: NotRequired["Literal['']|int"]
"""
The specific version of invoice rendering template to use for this invoice.
"""

class CreateParamsRenderingPdf(TypedDict):
page_size: NotRequired[Literal["a4", "auto", "letter"]]
Expand Down Expand Up @@ -4554,6 +4570,14 @@ class ModifyParamsRendering(TypedDict):
"""
Invoice pdf rendering options
"""
template: NotRequired[str]
"""
ID of the invoice rendering template to use for this invoice.
"""
template_version: NotRequired["Literal['']|int"]
"""
The specific version of invoice rendering template to use for this invoice.
"""

class ModifyParamsRenderingPdf(TypedDict):
page_size: NotRequired[Literal["a4", "auto", "letter"]]
Expand Down
4 changes: 2 additions & 2 deletions stripe/_invoice_line_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,11 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict):
"""
The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.
"""
tax_amounts: Optional[List[TaxAmount]]
tax_amounts: List[TaxAmount]
"""
The amount of tax calculated per tax rate for this line item
"""
tax_rates: Optional[List["TaxRate"]]
tax_rates: List["TaxRate"]
"""
The tax rates which apply to the line item.
"""
Expand Down
Loading
Loading