Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "pypy-3.7"
- "pypy-3.8"
- "pypy-3.9"
Expand Down
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3602014a6583f6c0fbfdde3c575839ac7d0b4e9c
0822236fb875490aa7ccc7b66dbb52f8965ee062
84 changes: 63 additions & 21 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2141
v2148
4 changes: 4 additions & 0 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,10 @@ class ScheduleDetails(StripeObject):
"""
The schedule that generated this invoice
"""
subscription: Optional[ExpandableField["Subscription"]]
"""
The subscription associated with this schedule
"""

class SubscriptionDetails(StripeObject):
class PauseCollection(StripeObject):
Expand Down
1 change: 1 addition & 0 deletions stripe/_object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@
"CalculationLineItem",
),
"tax.form": ("stripe.tax._form", "Form"),
"tax.location": ("stripe.tax._location", "Location"),
"tax.registration": ("stripe.tax._registration", "Registration"),
"tax.settings": ("stripe.tax._settings", "Settings"),
"tax.transaction": ("stripe.tax._transaction", "Transaction"),
Expand Down
8 changes: 4 additions & 4 deletions stripe/_quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,10 @@ class Prebilling(StripeObject):
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
"""
phase_effective_at: Optional[
Literal["billing_period_start", "line_start"]
Literal["billing_period_start", "phase_start"]
]
"""
Configures how the quote handles billing for line transitions. Possible values are `line_start` (default) or `billing_period_start`. `line_start` bills based on the current state of the line, ignoring changes scheduled for future lines. `billing_period_start` bills predictively for upcoming line transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
"""
prebilling: Optional[Prebilling]
"""
Expand Down Expand Up @@ -1041,10 +1041,10 @@ class LineEndsAt(StripeObject):
Behavior of the subscription schedule and underlying subscription when it ends.
"""
phase_effective_at: Optional[
Literal["billing_period_start", "line_start"]
Literal["billing_period_start", "phase_start"]
]
"""
Configures how the quote handles billing for line transitions. Possible values are `line_start` (default) or `billing_period_start`. `line_start` bills based on the current state of the line, ignoring changes scheduled for future lines. `billing_period_start` bills predictively for upcoming line transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
"""
proration_behavior: Optional[
Literal["always_invoice", "create_prorations", "none"]
Expand Down
2 changes: 1 addition & 1 deletion stripe/_quote_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ class EndBehavior(StripeObject):
"""
effective_at: Optional[Literal["billing_period_start", "line_start"]]
"""
Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
Configures how the subscription schedule handles billing for phase transitions.
"""
ends_at: Optional[EndsAt]
"""
Expand Down
4 changes: 4 additions & 0 deletions stripe/_quote_preview_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,10 @@ class ScheduleDetails(StripeObject):
"""
The schedule that generated this invoice
"""
subscription: Optional[ExpandableField["Subscription"]]
"""
The subscription associated with this schedule
"""

class SubscriptionDetails(StripeObject):
class PauseCollection(StripeObject):
Expand Down
16 changes: 15 additions & 1 deletion stripe/_tax_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# File generated from our OpenAPI spec
from stripe._list_object import ListObject
from stripe._listable_api_resource import ListableAPIResource
from typing import ClassVar
from stripe._stripe_object import StripeObject
from typing import ClassVar, Optional
from typing_extensions import Literal, Unpack, TYPE_CHECKING

if TYPE_CHECKING:
Expand All @@ -16,6 +17,13 @@ class TaxCode(ListableAPIResource["TaxCode"]):
"""

OBJECT_NAME: ClassVar[Literal["tax_code"]] = "tax_code"

class Requirements(StripeObject):
performance_location: Optional[Literal["optional", "required"]]
"""
Describes whether a performance location is required for a successful tax calculation with a tax code.
"""

description: str
"""
A detailed description of which types of products the tax code represents.
Expand All @@ -32,6 +40,10 @@ class TaxCode(ListableAPIResource["TaxCode"]):
"""
String representing the object's type. Objects of the same type share the same value.
"""
requirements: Optional[Requirements]
"""
An object that describes more information about the tax location required for this tax code. Some [tax codes](https://docs.stripe.com/tax/tax-for-tickets/integration-guide#types-of-products) require a tax location of type `performance` to calculate tax correctly.
"""

@classmethod
def list(
Expand Down Expand Up @@ -94,3 +106,5 @@ async def retrieve_async(
instance = cls(id, **params)
await instance.refresh_async()
return instance

_inner_class_types = {"requirements": Requirements}
3 changes: 3 additions & 0 deletions stripe/_tax_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from stripe.tax._association_service import AssociationService
from stripe.tax._calculation_service import CalculationService
from stripe.tax._form_service import FormService
from stripe.tax._location_service import LocationService
from stripe.tax._registration_service import RegistrationService
from stripe.tax._settings_service import SettingsService
from stripe.tax._transaction_service import TransactionService
Expand All @@ -16,6 +17,7 @@
"associations": ["stripe.tax._association_service", "AssociationService"],
"calculations": ["stripe.tax._calculation_service", "CalculationService"],
"forms": ["stripe.tax._form_service", "FormService"],
"locations": ["stripe.tax._location_service", "LocationService"],
"registrations": [
"stripe.tax._registration_service",
"RegistrationService",
Expand All @@ -29,6 +31,7 @@ class TaxService(StripeService):
associations: "AssociationService"
calculations: "CalculationService"
forms: "FormService"
locations: "LocationService"
registrations: "RegistrationService"
settings: "SettingsService"
transactions: "TransactionService"
Expand Down
42 changes: 21 additions & 21 deletions stripe/events/_event_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
from stripe.events._v2_billing_cadence_created_event import (
V2BillingCadenceCreatedEventNotification,
)
from stripe.events._v2_billing_licensed_item_created_event import (
V2BillingLicensedItemCreatedEventNotification,
)
from stripe.events._v2_billing_licensed_item_updated_event import (
V2BillingLicensedItemUpdatedEventNotification,
)
from stripe.events._v2_billing_license_fee_created_event import (
V2BillingLicenseFeeCreatedEventNotification,
)
Expand All @@ -31,30 +37,21 @@
from stripe.events._v2_billing_license_fee_version_created_event import (
V2BillingLicenseFeeVersionCreatedEventNotification,
)
from stripe.events._v2_billing_licensed_item_created_event import (
V2BillingLicensedItemCreatedEventNotification,
)
from stripe.events._v2_billing_licensed_item_updated_event import (
V2BillingLicensedItemUpdatedEventNotification,
)
from stripe.events._v2_billing_metered_item_created_event import (
V2BillingMeteredItemCreatedEventNotification,
)
from stripe.events._v2_billing_metered_item_updated_event import (
V2BillingMeteredItemUpdatedEventNotification,
)
from stripe.events._v2_billing_pricing_plan_created_event import (
V2BillingPricingPlanCreatedEventNotification,
)
from stripe.events._v2_billing_pricing_plan_updated_event import (
V2BillingPricingPlanUpdatedEventNotification,
)
from stripe.events._v2_billing_pricing_plan_component_created_event import (
V2BillingPricingPlanComponentCreatedEventNotification,
)
from stripe.events._v2_billing_pricing_plan_component_updated_event import (
V2BillingPricingPlanComponentUpdatedEventNotification,
)
from stripe.events._v2_billing_pricing_plan_created_event import (
V2BillingPricingPlanCreatedEventNotification,
)
from stripe.events._v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event import (
V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification,
)
Expand All @@ -79,15 +76,15 @@
from stripe.events._v2_billing_pricing_plan_subscription_servicing_paused_event import (
V2BillingPricingPlanSubscriptionServicingPausedEventNotification,
)
from stripe.events._v2_billing_pricing_plan_updated_event import (
V2BillingPricingPlanUpdatedEventNotification,
)
from stripe.events._v2_billing_pricing_plan_version_created_event import (
V2BillingPricingPlanVersionCreatedEventNotification,
)
from stripe.events._v2_billing_rate_card_created_event import (
V2BillingRateCardCreatedEventNotification,
)
from stripe.events._v2_billing_rate_card_updated_event import (
V2BillingRateCardUpdatedEventNotification,
)
from stripe.events._v2_billing_rate_card_rate_created_event import (
V2BillingRateCardRateCreatedEventNotification,
)
Expand Down Expand Up @@ -121,6 +118,9 @@
from stripe.events._v2_billing_rate_card_subscription_servicing_paused_event import (
V2BillingRateCardSubscriptionServicingPausedEventNotification,
)
from stripe.events._v2_billing_rate_card_updated_event import (
V2BillingRateCardUpdatedEventNotification,
)
from stripe.events._v2_billing_rate_card_version_created_event import (
V2BillingRateCardVersionCreatedEventNotification,
)
Expand All @@ -130,9 +130,6 @@
from stripe.events._v2_core_account_created_event import (
V2CoreAccountCreatedEventNotification,
)
from stripe.events._v2_core_account_updated_event import (
V2CoreAccountUpdatedEventNotification,
)
from stripe.events._v2_core_account_including_configuration_card_creator_capability_status_updated_event import (
V2CoreAccountIncludingConfigurationCardCreatorCapabilityStatusUpdatedEventNotification,
)
Expand Down Expand Up @@ -184,6 +181,9 @@
from stripe.events._v2_core_account_person_updated_event import (
V2CoreAccountPersonUpdatedEventNotification,
)
from stripe.events._v2_core_account_updated_event import (
V2CoreAccountUpdatedEventNotification,
)
from stripe.events._v2_core_claimable_sandbox_claimed_event import (
V2CoreClaimableSandboxClaimedEventNotification,
)
Expand Down Expand Up @@ -442,9 +442,6 @@
from stripe.events._v2_payments_settlement_allocation_intent_settled_event import (
V2PaymentsSettlementAllocationIntentSettledEventNotification,
)
from stripe.events._v2_payments_settlement_allocation_intent_submitted_event import (
V2PaymentsSettlementAllocationIntentSubmittedEventNotification,
)
from stripe.events._v2_payments_settlement_allocation_intent_split_canceled_event import (
V2PaymentsSettlementAllocationIntentSplitCanceledEventNotification,
)
Expand All @@ -454,6 +451,9 @@
from stripe.events._v2_payments_settlement_allocation_intent_split_settled_event import (
V2PaymentsSettlementAllocationIntentSplitSettledEventNotification,
)
from stripe.events._v2_payments_settlement_allocation_intent_submitted_event import (
V2PaymentsSettlementAllocationIntentSubmittedEventNotification,
)
from stripe.events._v2_reporting_report_run_created_event import (
V2ReportingReportRunCreatedEventNotification,
)
Expand Down
10 changes: 10 additions & 0 deletions stripe/params/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4081,6 +4081,7 @@
from stripe.params._plan_create_params import (
PlanCreateParams as PlanCreateParams,
PlanCreateParamsProduct as PlanCreateParamsProduct,
PlanCreateParamsProductTaxDetails as PlanCreateParamsProductTaxDetails,
PlanCreateParamsTier as PlanCreateParamsTier,
PlanCreateParamsTransformUsage as PlanCreateParamsTransformUsage,
)
Expand All @@ -4107,6 +4108,7 @@
PriceCreateParamsCurrencyOptionsTier as PriceCreateParamsCurrencyOptionsTier,
PriceCreateParamsCustomUnitAmount as PriceCreateParamsCustomUnitAmount,
PriceCreateParamsProductData as PriceCreateParamsProductData,
PriceCreateParamsProductDataTaxDetails as PriceCreateParamsProductDataTaxDetails,
PriceCreateParamsRecurring as PriceCreateParamsRecurring,
PriceCreateParamsTier as PriceCreateParamsTier,
PriceCreateParamsTransformQuantity as PriceCreateParamsTransformQuantity,
Expand Down Expand Up @@ -19346,6 +19348,10 @@
"PayoutUpdateParams": ("stripe.params._payout_update_params", False),
"PlanCreateParams": ("stripe.params._plan_create_params", False),
"PlanCreateParamsProduct": ("stripe.params._plan_create_params", False),
"PlanCreateParamsProductTaxDetails": (
"stripe.params._plan_create_params",
False,
),
"PlanCreateParamsTier": ("stripe.params._plan_create_params", False),
"PlanCreateParamsTransformUsage": (
"stripe.params._plan_create_params",
Expand Down Expand Up @@ -19378,6 +19384,10 @@
"stripe.params._price_create_params",
False,
),
"PriceCreateParamsProductDataTaxDetails": (
"stripe.params._price_create_params",
False,
),
"PriceCreateParamsRecurring": (
"stripe.params._price_create_params",
False,
Expand Down
4 changes: 4 additions & 0 deletions stripe/params/_invoice_add_lines_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ class InvoiceAddLinesParamsLinePriceDataProductData(TypedDict):


class InvoiceAddLinesParamsLinePriceDataProductDataTaxDetails(TypedDict):
performance_location: NotRequired[str]
"""
A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
"""
tax_code: str
"""
A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
Expand Down
4 changes: 2 additions & 2 deletions stripe/params/_invoice_create_preview_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendment(TypedDict):
Literal["amendment_start", "billing_period_start"]
]
"""
Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
Configures how the subscription schedule handles billing for phase transitions.
"""
item_actions: NotRequired[
List["InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemAction"]
Expand Down Expand Up @@ -1357,7 +1357,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhase(TypedDict):
"""
effective_at: NotRequired[Literal["billing_period_start", "phase_start"]]
"""
Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
Configures how the subscription schedule handles billing for phase transitions.
"""
end_date: NotRequired["int|Literal['now']"]
"""
Expand Down
4 changes: 4 additions & 0 deletions stripe/params/_invoice_line_item_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ class InvoiceLineItemUpdateParamsPriceDataProductData(TypedDict):


class InvoiceLineItemUpdateParamsPriceDataProductDataTaxDetails(TypedDict):
performance_location: NotRequired[str]
"""
A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
"""
tax_code: str
"""
A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
Expand Down
4 changes: 4 additions & 0 deletions stripe/params/_invoice_update_lines_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ class InvoiceUpdateLinesParamsLinePriceDataProductData(TypedDict):


class InvoiceUpdateLinesParamsLinePriceDataProductDataTaxDetails(TypedDict):
performance_location: NotRequired[str]
"""
A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
"""
tax_code: str
"""
A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
Expand Down
2 changes: 1 addition & 1 deletion stripe/params/_payment_intent_confirm_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ class PaymentIntentConfirmParamsPaymentDetails(TypedDict):

class PaymentIntentConfirmParamsPaymentDetailsBenefit(TypedDict):
fr_meal_voucher: NotRequired[
"PaymentIntentConfirmParamsPaymentDetailsBenefitFrMealVoucher"
"Literal['']|PaymentIntentConfirmParamsPaymentDetailsBenefitFrMealVoucher"
]
"""
French meal voucher benefit details for this PaymentIntent.
Expand Down
2 changes: 1 addition & 1 deletion stripe/params/_payment_intent_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ class PaymentIntentCreateParamsPaymentDetails(TypedDict):

class PaymentIntentCreateParamsPaymentDetailsBenefit(TypedDict):
fr_meal_voucher: NotRequired[
"PaymentIntentCreateParamsPaymentDetailsBenefitFrMealVoucher"
"Literal['']|PaymentIntentCreateParamsPaymentDetailsBenefitFrMealVoucher"
]
"""
French meal voucher benefit details for this PaymentIntent.
Expand Down
2 changes: 1 addition & 1 deletion stripe/params/_payment_intent_modify_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ class PaymentIntentModifyParamsPaymentDetails(TypedDict):

class PaymentIntentModifyParamsPaymentDetailsBenefit(TypedDict):
fr_meal_voucher: NotRequired[
"PaymentIntentModifyParamsPaymentDetailsBenefitFrMealVoucher"
"Literal['']|PaymentIntentModifyParamsPaymentDetailsBenefitFrMealVoucher"
]
"""
French meal voucher benefit details for this PaymentIntent.
Expand Down
2 changes: 1 addition & 1 deletion stripe/params/_payment_intent_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ class PaymentIntentUpdateParamsPaymentDetails(TypedDict):

class PaymentIntentUpdateParamsPaymentDetailsBenefit(TypedDict):
fr_meal_voucher: NotRequired[
"PaymentIntentUpdateParamsPaymentDetailsBenefitFrMealVoucher"
"Literal['']|PaymentIntentUpdateParamsPaymentDetailsBenefitFrMealVoucher"
]
"""
French meal voucher benefit details for this PaymentIntent.
Expand Down
4 changes: 4 additions & 0 deletions stripe/params/_payment_link_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@ class PaymentLinkCreateParamsLineItemPriceDataProductData(TypedDict):


class PaymentLinkCreateParamsLineItemPriceDataProductDataTaxDetails(TypedDict):
performance_location: NotRequired[str]
"""
A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
"""
tax_code: str
"""
A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
Expand Down
Loading