Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update generated code #1186

Merged
merged 5 commits into from
Jan 4, 2024
Merged
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
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}