Skip to content

Commit

Permalink
Update generated code (#1186)
Browse files Browse the repository at this point in the history
* Update generated code for v738

* Update generated code for v739

* Update generated code for v741

* Update generated code for v741

* Update generated code for v742

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Jan 4, 2024
1 parent 05b4893 commit 83139e8
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 19 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v737
v742
12 changes: 6 additions & 6 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions stripe/_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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]
"""
Expand Down
5 changes: 1 addition & 4 deletions stripe/_subscription_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
29 changes: 23 additions & 6 deletions stripe/tax/_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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}

0 comments on commit 83139e8

Please sign in to comment.