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

Merged
merged 14 commits into from
Feb 1, 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 @@
v793
v807
46 changes: 43 additions & 3 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ class Capabilities(StripeObject):
"""
The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges.
"""
swish_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the Swish capability of the account, or whether the account can directly process Swish payments.
"""
tax_reporting_us_1099_k: Optional[
Literal["active", "inactive", "pending"]
]
Expand Down Expand Up @@ -1174,9 +1178,7 @@ class CreateParams(RequestOptions):
"""
A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.

Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
"""
individual: NotRequired["Account.CreateParamsIndividual"]
"""
Expand Down Expand Up @@ -1515,6 +1517,12 @@ class CreateParamsCapabilities(TypedDict):
"""
The sofort_payments capability.
"""
swish_payments: NotRequired[
"Account.CreateParamsCapabilitiesSwishPayments"
]
"""
The swish_payments capability.
"""
tax_reporting_us_1099_k: NotRequired[
"Account.CreateParamsCapabilitiesTaxReportingUs1099K"
]
Expand Down Expand Up @@ -1734,6 +1742,12 @@ class CreateParamsCapabilitiesSofortPayments(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesSwishPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesTaxReportingUs1099K(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down Expand Up @@ -2166,6 +2180,10 @@ class CreateParamsIndividual(TypedDict):
"""
The individual's registered address.
"""
relationship: NotRequired["Account.CreateParamsIndividualRelationship"]
"""
Describes the person's relationship to the account.
"""
ssn_last_4: NotRequired["str"]
"""
The last four digits of the individual's Social Security Number (U.S. only).
Expand Down Expand Up @@ -2301,6 +2319,28 @@ class CreateParamsIndividualRegisteredAddress(TypedDict):
State, county, province, or region.
"""

class CreateParamsIndividualRelationship(TypedDict):
director: NotRequired["bool"]
"""
Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
"""
executive: NotRequired["bool"]
"""
Whether the person has significant responsibility to control, manage, or direct the organization.
"""
owner: NotRequired["bool"]
"""
Whether the person is an owner of the account's legal entity.
"""
percent_ownership: NotRequired["Literal['']|float"]
"""
The percent owned by the person of the account's legal entity.
"""
title: NotRequired["str"]
"""
The person's title (e.g., CEO, Support Engineer).
"""

class CreateParamsIndividualVerification(TypedDict):
additional_document: NotRequired[
"Account.CreateParamsIndividualVerificationAdditionalDocument"
Expand Down
88 changes: 82 additions & 6 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ class CreateParams(TypedDict):
"""
A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.

Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
"""
individual: NotRequired["AccountService.CreateParamsIndividual"]
"""
Expand Down Expand Up @@ -415,6 +413,12 @@ class CreateParamsCapabilities(TypedDict):
"""
The sofort_payments capability.
"""
swish_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesSwishPayments"
]
"""
The swish_payments capability.
"""
tax_reporting_us_1099_k: NotRequired[
"AccountService.CreateParamsCapabilitiesTaxReportingUs1099K"
]
Expand Down Expand Up @@ -638,6 +642,12 @@ class CreateParamsCapabilitiesSofortPayments(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesSwishPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesTaxReportingUs1099K(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down Expand Up @@ -1080,6 +1090,12 @@ class CreateParamsIndividual(TypedDict):
"""
The individual's registered address.
"""
relationship: NotRequired[
"AccountService.CreateParamsIndividualRelationship"
]
"""
Describes the person's relationship to the account.
"""
ssn_last_4: NotRequired["str"]
"""
The last four digits of the individual's Social Security Number (U.S. only).
Expand Down Expand Up @@ -1217,6 +1233,28 @@ class CreateParamsIndividualRegisteredAddress(TypedDict):
State, county, province, or region.
"""

class CreateParamsIndividualRelationship(TypedDict):
director: NotRequired["bool"]
"""
Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
"""
executive: NotRequired["bool"]
"""
Whether the person has significant responsibility to control, manage, or direct the organization.
"""
owner: NotRequired["bool"]
"""
Whether the person is an owner of the account's legal entity.
"""
percent_ownership: NotRequired["Literal['']|float"]
"""
The percent owned by the person of the account's legal entity.
"""
title: NotRequired["str"]
"""
The person's title (e.g., CEO, Support Engineer).
"""

class CreateParamsIndividualVerification(TypedDict):
additional_document: NotRequired[
"AccountService.CreateParamsIndividualVerificationAdditionalDocument"
Expand Down Expand Up @@ -1564,9 +1602,7 @@ class UpdateParams(TypedDict):
"""
A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.

Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
"""
individual: NotRequired["AccountService.UpdateParamsIndividual"]
"""
Expand Down Expand Up @@ -1901,6 +1937,12 @@ class UpdateParamsCapabilities(TypedDict):
"""
The sofort_payments capability.
"""
swish_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesSwishPayments"
]
"""
The swish_payments capability.
"""
tax_reporting_us_1099_k: NotRequired[
"AccountService.UpdateParamsCapabilitiesTaxReportingUs1099K"
]
Expand Down Expand Up @@ -2124,6 +2166,12 @@ class UpdateParamsCapabilitiesSofortPayments(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class UpdateParamsCapabilitiesSwishPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class UpdateParamsCapabilitiesTaxReportingUs1099K(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down Expand Up @@ -2566,6 +2614,12 @@ class UpdateParamsIndividual(TypedDict):
"""
The individual's registered address.
"""
relationship: NotRequired[
"AccountService.UpdateParamsIndividualRelationship"
]
"""
Describes the person's relationship to the account.
"""
ssn_last_4: NotRequired["str"]
"""
The last four digits of the individual's Social Security Number (U.S. only).
Expand Down Expand Up @@ -2703,6 +2757,28 @@ class UpdateParamsIndividualRegisteredAddress(TypedDict):
State, county, province, or region.
"""

class UpdateParamsIndividualRelationship(TypedDict):
director: NotRequired["bool"]
"""
Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
"""
executive: NotRequired["bool"]
"""
Whether the person has significant responsibility to control, manage, or direct the organization.
"""
owner: NotRequired["bool"]
"""
Whether the person is an owner of the account's legal entity.
"""
percent_ownership: NotRequired["Literal['']|float"]
"""
The percent owned by the person of the account's legal entity.
"""
title: NotRequired["str"]
"""
The person's title (e.g., CEO, Support Engineer).
"""

class UpdateParamsIndividualVerification(TypedDict):
additional_document: NotRequired[
"AccountService.UpdateParamsIndividualVerificationAdditionalDocument"
Expand Down
16 changes: 16 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,20 @@ class Sofort(StripeObject):
class StripeAccount(StripeObject):
pass

class Swish(StripeObject):
fingerprint: Optional[str]
"""
Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer
"""
payment_reference: Optional[str]
"""
Payer bank reference number for the payment
"""
verified_phone_last4: Optional[str]
"""
The last four digits of the Swish account phone number
"""

class UsBankAccount(StripeObject):
account_holder_type: Optional[Literal["company", "individual"]]
"""
Expand Down Expand Up @@ -1553,6 +1567,7 @@ class Zip(StripeObject):
sepa_debit: Optional[SepaDebit]
sofort: Optional[Sofort]
stripe_account: Optional[StripeAccount]
swish: Optional[Swish]
type: str
"""
The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.
Expand Down Expand Up @@ -1600,6 +1615,7 @@ class Zip(StripeObject):
"sepa_debit": SepaDebit,
"sofort": Sofort,
"stripe_account": StripeAccount,
"swish": Swish,
"us_bank_account": UsBankAccount,
"wechat": Wechat,
"wechat_pay": WechatPay,
Expand Down
2 changes: 1 addition & 1 deletion stripe/_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ class ListPaymentMethodsParams(RequestOptions):
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.
"""
type: NotRequired[
"Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']"
"Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']"
]
"""
An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
Expand Down
2 changes: 1 addition & 1 deletion stripe/_customer_payment_method_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ListParams(TypedDict):
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.
"""
type: NotRequired[
"Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']"
"Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']"
]
"""
An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
Expand Down
Loading
Loading