Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6b7b921f3428ff63f4b59c7c972b22790e56cb35
60b37acb4b1f57a9727a389192ff553e45234e63
145 changes: 86 additions & 59 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,15 @@ class SupportAddress(StripeObject):
"""
minority_owned_business_designation: Optional[
List[
Literal[
"lgbtqi_owned_business",
"minority_owned_business",
"none_of_these_apply",
"prefer_not_to_answer",
"women_owned_business",
Union[
Literal[
"lgbtqi_owned_business",
"minority_owned_business",
"none_of_these_apply",
"prefer_not_to_answer",
"women_owned_business",
],
str,
]
]
]
Expand Down Expand Up @@ -852,9 +855,12 @@ class Document(StripeObject):
This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
"""
ownership_exemption_reason: Optional[
Literal[
"qualified_entity_exceeds_ownership_threshold",
"qualifies_as_financial_institution",
Union[
Literal[
"qualified_entity_exceeds_ownership_threshold",
"qualifies_as_financial_institution",
],
str,
]
]
"""
Expand All @@ -871,30 +877,33 @@ class Document(StripeObject):
This hash is used to attest that the representative is authorized to act as the representative of their legal entity.
"""
structure: Optional[
Literal[
"free_zone_establishment",
"free_zone_llc",
"government_instrumentality",
"governmental_unit",
"incorporated_non_profit",
"incorporated_partnership",
"limited_liability_partnership",
"llc",
"multi_member_llc",
"private_company",
"private_corporation",
"private_partnership",
"public_company",
"public_corporation",
"public_partnership",
"registered_charity",
"single_member_llc",
"sole_establishment",
"sole_proprietorship",
"tax_exempt_government_instrumentality",
"unincorporated_association",
"unincorporated_non_profit",
"unincorporated_partnership",
Union[
Literal[
"free_zone_establishment",
"free_zone_llc",
"government_instrumentality",
"governmental_unit",
"incorporated_non_profit",
"incorporated_partnership",
"limited_liability_partnership",
"llc",
"multi_member_llc",
"private_company",
"private_corporation",
"private_partnership",
"public_company",
"public_corporation",
"public_partnership",
"registered_charity",
"single_member_llc",
"sole_establishment",
"sole_proprietorship",
"tax_exempt_government_instrumentality",
"unincorporated_association",
"unincorporated_non_profit",
"unincorporated_partnership",
],
str,
]
]
"""
Expand Down Expand Up @@ -951,25 +960,28 @@ class Dashboard(StripeObject):
"""

class Fees(StripeObject):
payer: Literal[
"account",
"application",
"application_custom",
"application_express",
"application_unified_accounts_beta",
payer: Union[
Literal[
"account",
"application",
"application_custom",
"application_express",
"application_unified_accounts_beta",
],
str,
]
"""
A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
"""

class Losses(StripeObject):
payments: Literal["application", "stripe"]
payments: Union[Literal["application", "stripe"], str]
"""
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"]
type: Union[Literal["express", "full", "none"], str]
"""
A value indicating the Stripe dashboard this account has access to independent of the Connect application.
"""
Expand All @@ -982,7 +994,9 @@ class StripeDashboard(StripeObject):
`true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://docs.stripe.com/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.
"""
losses: Optional[Losses]
requirement_collection: Optional[Literal["application", "stripe"]]
requirement_collection: Optional[
Union[Literal["application", "stripe"], str]
]
"""
A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account.
"""
Expand Down Expand Up @@ -1373,15 +1387,18 @@ class Payouts(StripeObject):
charges: Charges
payouts: Payouts
rejected_reason: Optional[
Literal[
"credit",
"fraud",
"fraud_no_intent_to_fulfill",
"fraud_other",
"fraud_payment_method_casher",
"fraud_payment_method_tester",
"other",
"terms_of_service",
Union[
Literal[
"credit",
"fraud",
"fraud_no_intent_to_fulfill",
"fraud_other",
"fraud_payment_method_casher",
"fraud_payment_method_tester",
"other",
"terms_of_service",
],
str,
]
]
"""
Expand Down Expand Up @@ -1544,12 +1561,15 @@ class Schedule(StripeObject):
"""
weekly_payout_days: Optional[
List[
Literal[
"friday",
"monday",
"thursday",
"tuesday",
"wednesday",
Union[
Literal[
"friday",
"monday",
"thursday",
"tuesday",
"wednesday",
],
str,
]
]
]
Expand Down Expand Up @@ -1713,7 +1733,12 @@ class TosAcceptance(StripeObject):
Business information about the account.
"""
business_type: Optional[
Literal["company", "government_entity", "individual", "non_profit"]
Union[
Literal[
"company", "government_entity", "individual", "non_profit"
],
str,
]
]
"""
The business type.
Expand Down Expand Up @@ -1793,7 +1818,9 @@ class TosAcceptance(StripeObject):
Options for customizing how the account functions within Stripe.
"""
tos_acceptance: Optional[TosAcceptance]
type: Optional[Literal["custom", "express", "none", "standard"]]
type: Optional[
Union[Literal["custom", "express", "none", "standard"], str]
]
"""
The Stripe account type. Can be `standard`, `express`, `custom`, or `none`.
"""
Expand Down
33 changes: 18 additions & 15 deletions stripe/_account_notice.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from stripe._stripe_object import StripeObject, UntypedStripeObject
from stripe._updateable_api_resource import UpdateableAPIResource
from stripe._util import sanitize_id
from typing import ClassVar, Optional, cast
from typing import ClassVar, Optional, Union, cast
from typing_extensions import Literal, Unpack, TYPE_CHECKING

if TYPE_CHECKING:
Expand Down Expand Up @@ -92,20 +92,23 @@ class LinkedObjects(StripeObject):
"""
String representing the object's type. Objects of the same type share the same value.
"""
reason: Literal[
"issuing.account_closed_for_inactivity",
"issuing.account_closed_for_not_providing_business_model_clarification",
"issuing.account_closed_for_not_providing_url_clarification",
"issuing.account_closed_for_not_providing_use_case_clarification",
"issuing.account_closed_for_terms_of_service_violation",
"issuing.application_rejected_for_failure_to_verify",
"issuing.credit_application_rejected",
"issuing.credit_increase_application_rejected",
"issuing.credit_limit_decreased",
"issuing.credit_line_closed",
"issuing.dispute_lost",
"issuing.dispute_submitted",
"issuing.dispute_won",
reason: Union[
Literal[
"issuing.account_closed_for_inactivity",
"issuing.account_closed_for_not_providing_business_model_clarification",
"issuing.account_closed_for_not_providing_url_clarification",
"issuing.account_closed_for_not_providing_use_case_clarification",
"issuing.account_closed_for_terms_of_service_violation",
"issuing.application_rejected_for_failure_to_verify",
"issuing.credit_application_rejected",
"issuing.credit_increase_application_rejected",
"issuing.credit_limit_decreased",
"issuing.credit_line_closed",
"issuing.dispute_lost",
"issuing.dispute_submitted",
"issuing.dispute_won",
],
str,
]
"""
Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://docs.stripe.com/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason.
Expand Down
Loading
Loading