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

Merged
merged 17 commits into from
Nov 16, 2023
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 @@
v655
v669
4,498 changes: 2,241 additions & 2,257 deletions stripe/api_resources/account.py

Large diffs are not rendered by default.

53 changes: 26 additions & 27 deletions stripe/api_resources/account_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from stripe.api_resources.abstract import CreateableAPIResource
from stripe.request_options import RequestOptions
from typing import ClassVar, List, Optional, cast
from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING
from typing_extensions import Literal, NotRequired, Unpack


class AccountLink(CreateableAPIResource["AccountLink"]):
Expand All @@ -15,33 +15,32 @@ class AccountLink(CreateableAPIResource["AccountLink"]):
"""

OBJECT_NAME: ClassVar[Literal["account_link"]] = "account_link"
if TYPE_CHECKING:

class CreateParams(RequestOptions):
account: str
"""
The identifier of the account to create an account link for.
"""
collect: NotRequired["Literal['currently_due', 'eventually_due']"]
"""
Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`.
"""
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""
refresh_url: NotRequired["str"]
"""
The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
"""
return_url: NotRequired["str"]
"""
The URL that the user will be redirected to upon leaving or completing the linked flow.
"""
type: Literal["account_onboarding", "account_update"]
"""
The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
"""
class CreateParams(RequestOptions):
account: str
"""
The identifier of the account to create an account link for.
"""
collect: NotRequired["Literal['currently_due', 'eventually_due']"]
"""
Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`.
"""
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""
refresh_url: NotRequired["str"]
"""
The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
"""
return_url: NotRequired["str"]
"""
The URL that the user will be redirected to upon leaving or completing the linked flow.
"""
type: Literal["account_onboarding", "account_update"]
"""
The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
"""

created: int
"""
Expand Down
60 changes: 26 additions & 34 deletions stripe/api_resources/account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
from stripe.request_options import RequestOptions
from stripe.stripe_object import StripeObject
from typing import ClassVar, List, Optional, cast
from typing_extensions import (
Literal,
NotRequired,
TypedDict,
Unpack,
TYPE_CHECKING,
)
from typing_extensions import Literal, NotRequired, TypedDict, Unpack


class AccountSession(CreateableAPIResource["AccountSession"]):
Expand All @@ -36,35 +30,33 @@ class AccountOnboarding(StripeObject):
account_onboarding: AccountOnboarding
_inner_class_types = {"account_onboarding": AccountOnboarding}

if TYPE_CHECKING:

class CreateParams(RequestOptions):
account: str
"""
The identifier of the account to create an Account Session for.
"""
components: "AccountSession.CreateParamsComponents"
"""
Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
"""
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""
class CreateParams(RequestOptions):
account: str
"""
The identifier of the account to create an Account Session for.
"""
components: "AccountSession.CreateParamsComponents"
"""
Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
"""
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""

class CreateParamsComponents(TypedDict):
account_onboarding: NotRequired[
"AccountSession.CreateParamsComponentsAccountOnboarding"
]
"""
Configuration for the account onboarding embedded component.
"""
class CreateParamsComponents(TypedDict):
account_onboarding: NotRequired[
"AccountSession.CreateParamsComponentsAccountOnboarding"
]
"""
Configuration for the account onboarding embedded component.
"""

class CreateParamsComponentsAccountOnboarding(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
class CreateParamsComponentsAccountOnboarding(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""

account: str
"""
Expand Down
73 changes: 36 additions & 37 deletions stripe/api_resources/apple_pay_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from stripe.request_options import RequestOptions
from stripe.util import class_method_variant
from typing import ClassVar, List, Optional, cast, overload
from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING
from typing_extensions import Literal, NotRequired, Unpack
from urllib.parse import quote_plus


Expand All @@ -19,42 +19,41 @@ class ApplePayDomain(
ListableAPIResource["ApplePayDomain"],
):
OBJECT_NAME: ClassVar[Literal["apple_pay_domain"]] = "apple_pay_domain"
if TYPE_CHECKING:

class CreateParams(RequestOptions):
domain_name: str
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""

class DeleteParams(RequestOptions):
pass

class ListParams(RequestOptions):
domain_name: NotRequired["str"]
ending_before: NotRequired["str"]
"""
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
"""
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""
limit: NotRequired["int"]
"""
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
"""
starting_after: NotRequired["str"]
"""
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""

class RetrieveParams(RequestOptions):
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""

class CreateParams(RequestOptions):
domain_name: str
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""

class DeleteParams(RequestOptions):
pass

class ListParams(RequestOptions):
domain_name: NotRequired["str"]
ending_before: NotRequired["str"]
"""
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
"""
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""
limit: NotRequired["int"]
"""
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
"""
starting_after: NotRequired["str"]
"""
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""

class RetrieveParams(RequestOptions):
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""

created: int
"""
Expand Down
Loading