Skip to content

Commit

Permalink
Update generated code for v936
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Apr 8, 2024
1 parent 142b292 commit 72b6032
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v935
v936
79 changes: 78 additions & 1 deletion stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,49 @@ class Document(StripeObject):
}

class Controller(StripeObject):
class Fees(StripeObject):
payer: Literal[
"account",
"application",
"application_custom",
"application_express",
]
"""
A value indicating the responsible payer of a bundle of Stripe fees for #-control eligible products on this account.
"""

class Losses(StripeObject):
payments: Literal["application", "stripe"]
"""
A value indicating who is liable when this account can't pay back negative balances from payments.
"""

class StripeDashboard(StripeObject):
type: Literal["express", "full", "none"]
"""
A value indicating the Stripe dashboard this account has access to independent of the Connect application.
"""

fees: Optional[Fees]
is_controller: Optional[bool]
"""
`true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.
"""
losses: Optional[Losses]
requirement_collection: Optional[Literal["application", "stripe"]]
"""
A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account.
"""
stripe_dashboard: Optional[StripeDashboard]
type: Literal["account", "application"]
"""
The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.
"""
_inner_class_types = {
"fees": Fees,
"losses": Losses,
"stripe_dashboard": StripeDashboard,
}

class FutureRequirements(StripeObject):
class Alternative(StripeObject):
Expand Down Expand Up @@ -1171,6 +1206,10 @@ class CreateParams(RequestOptions):
"""
Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
"""
controller: NotRequired["Account.CreateParamsController"]
"""
A hash of configuration describing the account controller's attributes.
"""
country: NotRequired[str]
"""
The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
Expand Down Expand Up @@ -2052,6 +2091,44 @@ class CreateParamsCompanyVerificationDocument(TypedDict):
The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
"""

class CreateParamsController(TypedDict):
fees: NotRequired["Account.CreateParamsControllerFees"]
"""
A hash of configuration for who pays Stripe fees for product usage on this account.
"""
losses: NotRequired["Account.CreateParamsControllerLosses"]
"""
A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
"""
requirement_collection: NotRequired[Literal["application", "stripe"]]
"""
A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`.
"""
stripe_dashboard: NotRequired[
"Account.CreateParamsControllerStripeDashboard"
]
"""
A hash of configuration for Stripe-hosted dashboards.
"""

class CreateParamsControllerFees(TypedDict):
payer: NotRequired[Literal["account", "application"]]
"""
A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`.
"""

class CreateParamsControllerLosses(TypedDict):
payments: NotRequired[Literal["application", "stripe"]]
"""
A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`.
"""

class CreateParamsControllerStripeDashboard(TypedDict):
type: NotRequired[Literal["express", "full", "none"]]
"""
Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`.
"""

class CreateParamsDocuments(TypedDict):
bank_account_ownership_verification: NotRequired[
"Account.CreateParamsDocumentsBankAccountOwnershipVerification"
Expand Down Expand Up @@ -3710,7 +3787,7 @@ class RetrievePersonParams(RequestOptions):
Options for customizing how the account functions within Stripe.
"""
tos_acceptance: Optional[TosAcceptance]
type: Optional[Literal["custom", "express", "standard"]]
type: Optional[Literal["custom", "express", "none", "standard"]]
"""
The Stripe account type. Can be `standard`, `express`, or `custom`.
"""
Expand Down
42 changes: 42 additions & 0 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class CreateParams(TypedDict):
"""
Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
"""
controller: NotRequired["AccountService.CreateParamsController"]
"""
A hash of configuration describing the account controller's attributes.
"""
country: NotRequired[str]
"""
The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
Expand Down Expand Up @@ -939,6 +943,44 @@ class CreateParamsCompanyVerificationDocument(TypedDict):
The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
"""

class CreateParamsController(TypedDict):
fees: NotRequired["AccountService.CreateParamsControllerFees"]
"""
A hash of configuration for who pays Stripe fees for product usage on this account.
"""
losses: NotRequired["AccountService.CreateParamsControllerLosses"]
"""
A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
"""
requirement_collection: NotRequired[Literal["application", "stripe"]]
"""
A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`.
"""
stripe_dashboard: NotRequired[
"AccountService.CreateParamsControllerStripeDashboard"
]
"""
A hash of configuration for Stripe-hosted dashboards.
"""

class CreateParamsControllerFees(TypedDict):
payer: NotRequired[Literal["account", "application"]]
"""
A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`.
"""

class CreateParamsControllerLosses(TypedDict):
payments: NotRequired[Literal["application", "stripe"]]
"""
A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`.
"""

class CreateParamsControllerStripeDashboard(TypedDict):
type: NotRequired[Literal["express", "full", "none"]]
"""
Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`.
"""

class CreateParamsDocuments(TypedDict):
bank_account_ownership_verification: NotRequired[
"AccountService.CreateParamsDocumentsBankAccountOwnershipVerification"
Expand Down

0 comments on commit 72b6032

Please # to comment.