Skip to content

Commit

Permalink
Merge pull request #1296 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Apr 11, 2024
2 parents 89b4c98 + be1c9ce commit 6b7c7b3
Show file tree
Hide file tree
Showing 49 changed files with 1,049 additions and 95 deletions.
104 changes: 96 additions & 8 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v940
v951
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ my_http_client = stripe.HTTPXClient()
# If you want to use httpx to make sync requests, you can disable this
# behavior.
my_http_client = stripe.HTTPXClient(allow_sync_requests=True)
my_http_client = stripe.HTTPXClient(allow_sync_methods=True)
# aiohttp is also available (does not support sync requests)
my_http_client = stripe.AIOHTTPClient()
Expand Down
4 changes: 2 additions & 2 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ class Error(StripeObject):
"""
pending_verification: Optional[List[str]]
"""
Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.
Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
"""
_inner_class_types = {"alternatives": Alternative, "errors": Error}

Expand Down Expand Up @@ -930,7 +930,7 @@ class Error(StripeObject):
"""
pending_verification: Optional[List[str]]
"""
Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
"""
_inner_class_types = {"alternatives": Alternative, "errors": Error}

Expand Down
90 changes: 88 additions & 2 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,26 @@ class AccountSession(CreateableAPIResource["AccountSession"]):
OBJECT_NAME: ClassVar[Literal["account_session"]] = "account_session"

class Components(StripeObject):
class AccountManagement(StripeObject):
class Features(StripeObject):
external_account_collection: bool
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

enabled: bool
"""
Whether the embedded component is enabled.
"""
features: Features
_inner_class_types = {"features": Features}

class AccountOnboarding(StripeObject):
class Features(StripeObject):
pass
external_account_collection: bool
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

enabled: bool
"""
Expand Down Expand Up @@ -54,6 +71,20 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

class NotificationBanner(StripeObject):
class Features(StripeObject):
external_account_collection: bool
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

enabled: bool
"""
Whether the embedded component is enabled.
"""
features: Features
_inner_class_types = {"features": Features}

class PaymentDetails(StripeObject):
class Features(StripeObject):
capture_payments: bool
Expand Down Expand Up @@ -128,16 +159,20 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

account_management: AccountManagement
account_onboarding: AccountOnboarding
capital_financing_promotion: Optional[CapitalFinancingPromotion]
documents: Documents
notification_banner: NotificationBanner
payment_details: PaymentDetails
payments: Payments
payouts: Payouts
_inner_class_types = {
"account_management": AccountManagement,
"account_onboarding": AccountOnboarding,
"capital_financing_promotion": CapitalFinancingPromotion,
"documents": Documents,
"notification_banner": NotificationBanner,
"payment_details": PaymentDetails,
"payments": Payments,
"payouts": Payouts,
Expand All @@ -158,6 +193,12 @@ class CreateParams(RequestOptions):
"""

class CreateParamsComponents(TypedDict):
account_management: NotRequired[
"AccountSession.CreateParamsComponentsAccountManagement"
]
"""
Configuration for the account management embedded component.
"""
account_onboarding: NotRequired[
"AccountSession.CreateParamsComponentsAccountOnboarding"
]
Expand Down Expand Up @@ -197,6 +238,12 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the issuing cards list component.
"""
notification_banner: NotRequired[
"AccountSession.CreateParamsComponentsNotificationBanner"
]
"""
Configuration for the notification banner embedded component.
"""
payment_details: NotRequired[
"AccountSession.CreateParamsComponentsPaymentDetails"
]
Expand All @@ -212,6 +259,24 @@ class CreateParamsComponents(TypedDict):
Configuration for the payouts embedded component.
"""

class CreateParamsComponentsAccountManagement(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsAccountManagementFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsAccountManagementFeatures(TypedDict):
external_account_collection: NotRequired[bool]
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

class CreateParamsComponentsAccountOnboarding(TypedDict):
enabled: bool
"""
Expand All @@ -225,7 +290,10 @@ class CreateParamsComponentsAccountOnboarding(TypedDict):
"""

class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
pass
external_account_collection: NotRequired[bool]
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

class CreateParamsComponentsCapitalFinancingPromotion(TypedDict):
enabled: bool
Expand Down Expand Up @@ -326,6 +394,24 @@ class CreateParamsComponentsIssuingCardsListFeatures(TypedDict):
Whether to allow cardholder management features.
"""

class CreateParamsComponentsNotificationBanner(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsNotificationBannerFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsNotificationBannerFeatures(TypedDict):
external_account_collection: NotRequired[bool]
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

class CreateParamsComponentsPaymentDetails(TypedDict):
enabled: bool
"""
Expand Down
53 changes: 52 additions & 1 deletion stripe/_account_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ class CreateParams(TypedDict):
"""

class CreateParamsComponents(TypedDict):
account_management: NotRequired[
"AccountSessionService.CreateParamsComponentsAccountManagement"
]
"""
Configuration for the account management embedded component.
"""
account_onboarding: NotRequired[
"AccountSessionService.CreateParamsComponentsAccountOnboarding"
]
Expand Down Expand Up @@ -62,6 +68,12 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the issuing cards list component.
"""
notification_banner: NotRequired[
"AccountSessionService.CreateParamsComponentsNotificationBanner"
]
"""
Configuration for the notification banner embedded component.
"""
payment_details: NotRequired[
"AccountSessionService.CreateParamsComponentsPaymentDetails"
]
Expand All @@ -81,6 +93,24 @@ class CreateParamsComponents(TypedDict):
Configuration for the payouts embedded component.
"""

class CreateParamsComponentsAccountManagement(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSessionService.CreateParamsComponentsAccountManagementFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsAccountManagementFeatures(TypedDict):
external_account_collection: NotRequired[bool]
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

class CreateParamsComponentsAccountOnboarding(TypedDict):
enabled: bool
"""
Expand All @@ -94,7 +124,10 @@ class CreateParamsComponentsAccountOnboarding(TypedDict):
"""

class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
pass
external_account_collection: NotRequired[bool]
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

class CreateParamsComponentsCapitalFinancingPromotion(TypedDict):
enabled: bool
Expand Down Expand Up @@ -195,6 +228,24 @@ class CreateParamsComponentsIssuingCardsListFeatures(TypedDict):
Whether to allow cardholder management features.
"""

class CreateParamsComponentsNotificationBanner(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSessionService.CreateParamsComponentsNotificationBannerFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsNotificationBannerFeatures(TypedDict):
external_account_collection: NotRequired[bool]
"""
Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
"""

class CreateParamsComponentsPaymentDetails(TypedDict):
enabled: bool
"""
Expand Down
4 changes: 2 additions & 2 deletions stripe/_bank_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class Error(StripeObject):
"""
pending_verification: Optional[List[str]]
"""
Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
"""
_inner_class_types = {"errors": Error}

Expand Down Expand Up @@ -274,7 +274,7 @@ class Error(StripeObject):
"""
pending_verification: Optional[List[str]]
"""
Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
"""
_inner_class_types = {"errors": Error}

Expand Down
4 changes: 2 additions & 2 deletions stripe/_capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Error(StripeObject):
"""
pending_verification: List[str]
"""
Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.
Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
"""
_inner_class_types = {"alternatives": Alternative, "errors": Error}

Expand Down Expand Up @@ -316,7 +316,7 @@ class Error(StripeObject):
"""
pending_verification: List[str]
"""
Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
"""
_inner_class_types = {"alternatives": Alternative, "errors": Error}

Expand Down
13 changes: 9 additions & 4 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ class Alipay(StripeObject):
Transaction ID of this particular Alipay transaction.
"""

class AmazonPay(StripeObject):
pass

class AuBecsDebit(StripeObject):
bsb_number: Optional[str]
"""
Expand Down Expand Up @@ -1682,6 +1685,7 @@ class Zip(StripeObject):
affirm: Optional[Affirm]
afterpay_clearpay: Optional[AfterpayClearpay]
alipay: Optional[Alipay]
amazon_pay: Optional[AmazonPay]
au_becs_debit: Optional[AuBecsDebit]
bacs_debit: Optional[BacsDebit]
bancontact: Optional[Bancontact]
Expand Down Expand Up @@ -1733,6 +1737,7 @@ class Zip(StripeObject):
"affirm": Affirm,
"afterpay_clearpay": AfterpayClearpay,
"alipay": Alipay,
"amazon_pay": AmazonPay,
"au_becs_debit": AuBecsDebit,
"bacs_debit": BacsDebit,
"bancontact": Bancontact,
Expand Down Expand Up @@ -2540,7 +2545,7 @@ class CreateParams(RequestOptions):
application_fee: NotRequired[int]
application_fee_amount: NotRequired[int]
"""
A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees).
A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees).
"""
capture: NotRequired[bool]
"""
Expand Down Expand Up @@ -2569,7 +2574,7 @@ class CreateParams(RequestOptions):
"""
on_behalf_of: NotRequired[str]
"""
The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of).
The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).
"""
radar_options: NotRequired["Charge.CreateParamsRadarOptions"]
"""
Expand Down Expand Up @@ -3535,11 +3540,11 @@ class SearchParams(RequestOptions):
"""
application_fee: Optional[ExpandableField["ApplicationFee"]]
"""
The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.
The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
"""
application_fee_amount: Optional[int]
"""
The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.
The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
"""
authorization_code: Optional[str]
"""
Expand Down
Loading

0 comments on commit 6b7c7b3

Please sign in to comment.