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 for beta #1421

Merged
merged 11 commits into from
Nov 7, 2024
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Remove support for `payout_statement_descriptor_profanity` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.QuotePreviewInvoice.LastFinalizationError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code`

## 11.2.0 - 2024-10-29
* [#1411](https://github.com/stripe/stripe-python/pull/1411) Update generated code
* [#1411](https://github.com/stripe/stripe-python/pull/1411) This release changes the pinned API version to `2024-10-28.acacia`.
* Add support for resource `stripe.v2.EventDestinations`
* Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations`
* Add support for `alma_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, `samsung_pay_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1319
v1333
10 changes: 10 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,12 @@ def __getattr__(name):
OrderLineItemService as OrderLineItemService,
)
from stripe._order_service import OrderService as OrderService
from stripe._payment_attempt_record import (
PaymentAttemptRecord as PaymentAttemptRecord,
)
from stripe._payment_attempt_record_service import (
PaymentAttemptRecordService as PaymentAttemptRecordService,
)
from stripe._payment_intent import PaymentIntent as PaymentIntent
from stripe._payment_intent_service import (
PaymentIntentService as PaymentIntentService,
Expand Down Expand Up @@ -502,6 +508,10 @@ def __getattr__(name):
from stripe._payment_method_service import (
PaymentMethodService as PaymentMethodService,
)
from stripe._payment_record import PaymentRecord as PaymentRecord
from stripe._payment_record_service import (
PaymentRecordService as PaymentRecordService,
)
from stripe._payout import Payout as Payout
from stripe._payout_service import PayoutService as PayoutService
from stripe._person import Person as Person
Expand Down
44 changes: 40 additions & 4 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,9 +879,27 @@ class Error(StripeObject):
"""
Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
"""
disabled_reason: Optional[str]
disabled_reason: Optional[
Literal[
"action_required.requested_capabilities",
"listed",
"other",
"platform_paused",
"rejected.fraud",
"rejected.incomplete_verification",
"rejected.listed",
"rejected.other",
"rejected.platform_fraud",
"rejected.platform_other",
"rejected.platform_terms_of_service",
"rejected.terms_of_service",
"requirements.past_due",
"requirements.pending_verification",
"under_review",
]
]
"""
This is typed as a string for consistency with `requirements.disabled_reason`.
This is typed as an enum for consistency with `requirements.disabled_reason`.
"""
errors: Optional[List[Error]]
"""
Expand Down Expand Up @@ -1035,9 +1053,27 @@ class Error(StripeObject):
"""
Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
"""
disabled_reason: Optional[str]
disabled_reason: Optional[
Literal[
"action_required.requested_capabilities",
"listed",
"other",
"platform_paused",
"rejected.fraud",
"rejected.incomplete_verification",
"rejected.listed",
"rejected.other",
"rejected.platform_fraud",
"rejected.platform_other",
"rejected.platform_terms_of_service",
"rejected.terms_of_service",
"requirements.past_due",
"requirements.pending_verification",
"under_review",
]
]
"""
If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`.
If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
"""
errors: Optional[List[Error]]
"""
Expand Down
38 changes: 28 additions & 10 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AccountSession(CreateableAPIResource["AccountSession"]):
class Components(StripeObject):
class AccountManagement(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand All @@ -41,7 +41,7 @@ class Features(StripeObject):

class AccountOnboarding(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand All @@ -59,7 +59,7 @@ class Features(StripeObject):

class Balances(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand Down Expand Up @@ -133,7 +133,7 @@ class Features(StripeObject):

class NotificationBanner(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand Down Expand Up @@ -203,7 +203,7 @@ class Features(StripeObject):

class Payouts(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand Down Expand Up @@ -659,10 +659,6 @@ class CreateParamsComponentsFinancialAccountFeatures(TypedDict):
"""
Whether to allow external accounts to be linked for money transfer.
"""
money_movement: NotRequired[bool]
"""
Whether to allow money movement features.
"""
send_money: NotRequired[bool]
"""
Whether to allow sending money.
Expand All @@ -680,6 +676,9 @@ class CreateParamsComponentsFinancialAccountTransactions(TypedDict):
features: NotRequired[
"AccountSession.CreateParamsComponentsFinancialAccountTransactionsFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsFinancialAccountTransactionsFeatures(
TypedDict
Expand All @@ -702,7 +701,22 @@ class CreateParamsComponentsIssuingCard(TypedDict):
"""

class CreateParamsComponentsIssuingCardFeatures(TypedDict):
pass
card_management: NotRequired[bool]
"""
Whether to allow card management features.
"""
card_spend_dispute_management: NotRequired[bool]
"""
Whether to allow card spend dispute management features.
"""
cardholder_management: NotRequired[bool]
"""
Whether to allow cardholder management features.
"""
spend_control_management: NotRequired[bool]
"""
Whether to allow spend control management features.
"""

class CreateParamsComponentsIssuingCardsList(TypedDict):
enabled: bool
Expand All @@ -729,6 +743,10 @@ class CreateParamsComponentsIssuingCardsListFeatures(TypedDict):
"""
Whether to allow cardholder management features.
"""
disable_stripe_user_authentication: NotRequired[bool]
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts.
"""
spend_control_management: NotRequired[bool]
"""
Whether to allow spend control management features.
Expand Down
28 changes: 23 additions & 5 deletions stripe/_account_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,6 @@ class CreateParamsComponentsFinancialAccountFeatures(TypedDict):
"""
Whether to allow external accounts to be linked for money transfer.
"""
money_movement: NotRequired[bool]
"""
Whether to allow money movement features.
"""
send_money: NotRequired[bool]
"""
Whether to allow sending money.
Expand All @@ -399,6 +395,9 @@ class CreateParamsComponentsFinancialAccountTransactions(TypedDict):
features: NotRequired[
"AccountSessionService.CreateParamsComponentsFinancialAccountTransactionsFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsFinancialAccountTransactionsFeatures(
TypedDict
Expand All @@ -421,7 +420,22 @@ class CreateParamsComponentsIssuingCard(TypedDict):
"""

class CreateParamsComponentsIssuingCardFeatures(TypedDict):
pass
card_management: NotRequired[bool]
"""
Whether to allow card management features.
"""
card_spend_dispute_management: NotRequired[bool]
"""
Whether to allow card spend dispute management features.
"""
cardholder_management: NotRequired[bool]
"""
Whether to allow cardholder management features.
"""
spend_control_management: NotRequired[bool]
"""
Whether to allow spend control management features.
"""

class CreateParamsComponentsIssuingCardsList(TypedDict):
enabled: bool
Expand All @@ -448,6 +462,10 @@ class CreateParamsComponentsIssuingCardsListFeatures(TypedDict):
"""
Whether to allow cardholder management features.
"""
disable_stripe_user_authentication: NotRequired[bool]
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts.
"""
spend_control_management: NotRequired[bool]
"""
Whether to allow spend control management features.
Expand Down
10 changes: 5 additions & 5 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ class ShippingAddress(StripeObject):
"""
brand: Optional[str]
"""
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
capture_before: Optional[int]
"""
Expand Down Expand Up @@ -786,7 +786,7 @@ class ShippingAddress(StripeObject):
multicapture: Optional[Multicapture]
network: Optional[str]
"""
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
network_token: Optional[NetworkToken]
"""
Expand Down Expand Up @@ -879,7 +879,7 @@ class Wallet(StripeObject):
"""
brand: Optional[str]
"""
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
brand_product: Optional[str]
"""
Expand Down Expand Up @@ -945,7 +945,7 @@ class Wallet(StripeObject):
"""
network: Optional[str]
"""
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
network_transaction_id: Optional[str]
"""
Expand Down Expand Up @@ -1293,7 +1293,7 @@ class Receipt(StripeObject):
"""
network: Optional[str]
"""
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
network_transaction_id: Optional[str]
"""
Expand Down
8 changes: 4 additions & 4 deletions stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class Wallet(StripeObject):
"""
brand: Optional[str]
"""
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
brand_product: Optional[str]
"""
Expand Down Expand Up @@ -351,7 +351,7 @@ class Wallet(StripeObject):
"""
network: Optional[str]
"""
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
network_transaction_id: Optional[str]
"""
Expand Down Expand Up @@ -630,7 +630,7 @@ class ShippingAddress(StripeObject):

brand: str
"""
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
checks: Optional[Checks]
"""
Expand Down Expand Up @@ -733,7 +733,7 @@ class Wallet(StripeObject):

brand: Optional[str]
"""
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
"""
brand_product: Optional[str]
"""
Expand Down
Loading
Loading