diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8f5da3930..da794494d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v737 \ No newline at end of file +v742 \ No newline at end of file diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 898e0dadc..ccac6a89d 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -51,7 +51,7 @@ class Features(StripeObject): """ Whether the embedded component is enabled. """ - features: Optional[Features] + features: Features _inner_class_types = {"features": Features} class Payments(StripeObject): @@ -73,7 +73,7 @@ class Features(StripeObject): """ Whether the embedded component is enabled. """ - features: Optional[Features] + features: Features _inner_class_types = {"features": Features} class Payouts(StripeObject): @@ -95,13 +95,13 @@ class Features(StripeObject): """ Whether the embedded component is enabled. """ - features: Optional[Features] + features: Features _inner_class_types = {"features": Features} account_onboarding: AccountOnboarding - payment_details: Optional[PaymentDetails] - payments: Optional[Payments] - payouts: Optional[Payouts] + payment_details: PaymentDetails + payments: Payments + payouts: Payouts _inner_class_types = { "account_onboarding": AccountOnboarding, "payment_details": PaymentDetails, diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 6b713872d..d6066c9e5 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -425,7 +425,7 @@ class CreateParams(RequestOptions): """ billing_cycle_anchor: NotRequired["int"] """ - A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. """ billing_thresholds: NotRequired[ "Literal['']|Subscription.CreateParamsBillingThresholds" @@ -1633,7 +1633,7 @@ class SearchParams(RequestOptions): automatic_tax: AutomaticTax billing_cycle_anchor: int """ - Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. """ billing_thresholds: Optional[BillingThresholds] """ diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index f66930c70..f90078f33 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -117,10 +117,7 @@ class TransferData(StripeObject): """ Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. """ - invoice_settings: Optional[InvoiceSettings] - """ - The subscription schedule's default invoice settings. - """ + invoice_settings: InvoiceSettings on_behalf_of: Optional[ExpandableField["Account"]] """ The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 57cfd2d95..588199e5f 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -696,12 +696,12 @@ class CreateParams(RequestOptions): If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. """ - class CreateParamsCountryOptions( - TypedDict( - "CreateParamsCountryOptions", - {"is": NotRequired["Registration.CreateParamsCountryOptionsIs"]}, - ), - ): + _CreateParamsCountryOptionsBase = TypedDict( + "CreateParamsCountryOptions", + {"is": NotRequired["Registration.CreateParamsCountryOptionsIs"]}, + ) + + class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): ae: NotRequired["Registration.CreateParamsCountryOptionsAe"] """ Options for the registration in AE. @@ -1594,6 +1594,12 @@ class ModifyParams(RequestOptions): If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + active_from: int """ Time at which the registration becomes active. Measured in seconds since the Unix epoch. @@ -1700,4 +1706,15 @@ def modify( cls._static_request("post", url, params=params), ) + @classmethod + def retrieve( + cls, id: str, **params: Unpack["Registration.RetrieveParams"] + ) -> "Registration": + """ + Returns a Tax Registration object. + """ + instance = cls(id, **params) + instance.refresh() + return instance + _inner_class_types = {"country_options": CountryOptions}