diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index c7a4fc4f7..f95a55981 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -4b8685a69ee5061fca67cc7e3fd69c8e6890b24e \ No newline at end of file +4ec19847e2d6cb16e17bd2ad2aee2bf48d86013c \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1bfc0268b..5e8e56a7f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2150 \ No newline at end of file +v2151 \ No newline at end of file diff --git a/stripe/delegated_checkout/_requested_session.py b/stripe/delegated_checkout/_requested_session.py index 63ab1d0c7..b4d25dbc1 100644 --- a/stripe/delegated_checkout/_requested_session.py +++ b/stripe/delegated_checkout/_requested_session.py @@ -214,22 +214,10 @@ class Disclosure(StripeObject): """ The total before any discounts or taxes are applied. """ - description: Optional[str] - """ - The description of the line item. - """ - images: Optional[List[str]] - """ - The images of the line item. - """ key: str """ The key of the line item. """ - name: str - """ - The name of the line item. - """ product_details: Optional[ProductDetails] quantity: int """ @@ -329,6 +317,37 @@ class Card(StripeObject): """ _inner_class_types = {"billing_details": BillingDetails, "card": Card} + class RiskDetails(StripeObject): + class ClientDeviceMetadataDetails(StripeObject): + radar_session: Optional[str] + """ + The radar session for the client device. + """ + referrer: Optional[str] + """ + The referrer of the client device. + """ + remote_ip: Optional[str] + """ + The remote IP address of the client device. + """ + time_on_page_ms: Optional[int] + """ + The time spent on the page by the client device. + """ + user_agent: Optional[str] + """ + The user agent of the client device. + """ + + client_device_metadata_details: Optional[ClientDeviceMetadataDetails] + """ + The risk metadata for the client device. + """ + _inner_class_types = { + "client_device_metadata_details": ClientDeviceMetadataDetails, + } + class SellerDetails(StripeObject): pass @@ -429,6 +448,10 @@ class ApplicableFee(StripeObject): """ The preview of the payment method to be created when the requested session is confirmed. """ + risk_details: Optional[RiskDetails] + """ + The risk details of the requested session. + """ seller_details: SellerDetails setup_future_usage: Optional[Literal["on_session"]] """ @@ -777,6 +800,7 @@ async def retrieve_async( "line_item_details": LineItemDetail, "order_details": OrderDetails, "payment_method_preview": PaymentMethodPreview, + "risk_details": RiskDetails, "seller_details": SellerDetails, "total_details": TotalDetails, } diff --git a/stripe/params/product_catalog/_trial_offer_create_params.py b/stripe/params/product_catalog/_trial_offer_create_params.py index 9c21d70f1..81e1e492c 100644 --- a/stripe/params/product_catalog/_trial_offer_create_params.py +++ b/stripe/params/product_catalog/_trial_offer_create_params.py @@ -22,6 +22,10 @@ class TrialOfferCreateParams(RequestOptions): """ Price configuration during the trial period (amount, billing scheme, etc). """ + name: NotRequired[str] + """ + A brief, user-friendly name for the trial offer-for identification purposes. + """ class TrialOfferCreateParamsDuration(TypedDict): diff --git a/stripe/params/radar/__init__.py b/stripe/params/radar/__init__.py index 4066820d3..7a1a7923a 100644 --- a/stripe/params/radar/__init__.py +++ b/stripe/params/radar/__init__.py @@ -14,12 +14,16 @@ ) from stripe.params.radar._account_evaluation_modify_params import ( AccountEvaluationModifyParams as AccountEvaluationModifyParams, + AccountEvaluationModifyParamsLoginFailed as AccountEvaluationModifyParamsLoginFailed, + AccountEvaluationModifyParamsRegistrationFailed as AccountEvaluationModifyParamsRegistrationFailed, ) from stripe.params.radar._account_evaluation_retrieve_params import ( AccountEvaluationRetrieveParams as AccountEvaluationRetrieveParams, ) from stripe.params.radar._account_evaluation_update_params import ( AccountEvaluationUpdateParams as AccountEvaluationUpdateParams, + AccountEvaluationUpdateParamsLoginFailed as AccountEvaluationUpdateParamsLoginFailed, + AccountEvaluationUpdateParamsRegistrationFailed as AccountEvaluationUpdateParamsRegistrationFailed, ) from stripe.params.radar._early_fraud_warning_list_params import ( EarlyFraudWarningListParams as EarlyFraudWarningListParams, @@ -91,6 +95,14 @@ "stripe.params.radar._account_evaluation_modify_params", False, ), + "AccountEvaluationModifyParamsLoginFailed": ( + "stripe.params.radar._account_evaluation_modify_params", + False, + ), + "AccountEvaluationModifyParamsRegistrationFailed": ( + "stripe.params.radar._account_evaluation_modify_params", + False, + ), "AccountEvaluationRetrieveParams": ( "stripe.params.radar._account_evaluation_retrieve_params", False, @@ -99,6 +111,14 @@ "stripe.params.radar._account_evaluation_update_params", False, ), + "AccountEvaluationUpdateParamsLoginFailed": ( + "stripe.params.radar._account_evaluation_update_params", + False, + ), + "AccountEvaluationUpdateParamsRegistrationFailed": ( + "stripe.params.radar._account_evaluation_update_params", + False, + ), "EarlyFraudWarningListParams": ( "stripe.params.radar._early_fraud_warning_list_params", False, diff --git a/stripe/params/radar/_account_evaluation_modify_params.py b/stripe/params/radar/_account_evaluation_modify_params.py index ef24cadcb..eb9b5dd6d 100644 --- a/stripe/params/radar/_account_evaluation_modify_params.py +++ b/stripe/params/radar/_account_evaluation_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from typing import List -from typing_extensions import Literal, NotRequired +from typing_extensions import Literal, NotRequired, TypedDict class AccountEvaluationModifyParams(RequestOptions): @@ -10,7 +10,36 @@ class AccountEvaluationModifyParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - type: Literal["registration_succeeded"] + type: Literal[ + "login_failed", + "login_succeeded", + "registration_failed", + "registration_succeeded", + ] """ The type of event to report. """ + login_failed: NotRequired["AccountEvaluationModifyParamsLoginFailed"] + """ + Event payload for login_failed. + """ + registration_failed: NotRequired[ + "AccountEvaluationModifyParamsRegistrationFailed" + ] + """ + Event payload for registration_failed. + """ + + +class AccountEvaluationModifyParamsLoginFailed(TypedDict): + reason: Literal["other", "suspected_account_sharing"] + """ + The reason why this login failed. + """ + + +class AccountEvaluationModifyParamsRegistrationFailed(TypedDict): + reason: Literal["other", "suspected_multi_accounting"] + """ + The reason why this registration failed. + """ diff --git a/stripe/params/radar/_account_evaluation_update_params.py b/stripe/params/radar/_account_evaluation_update_params.py index 5d9729f7f..c4d8a77ae 100644 --- a/stripe/params/radar/_account_evaluation_update_params.py +++ b/stripe/params/radar/_account_evaluation_update_params.py @@ -9,7 +9,36 @@ class AccountEvaluationUpdateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - type: Literal["registration_succeeded"] + type: Literal[ + "login_failed", + "login_succeeded", + "registration_failed", + "registration_succeeded", + ] """ The type of event to report. """ + login_failed: NotRequired["AccountEvaluationUpdateParamsLoginFailed"] + """ + Event payload for login_failed. + """ + registration_failed: NotRequired[ + "AccountEvaluationUpdateParamsRegistrationFailed" + ] + """ + Event payload for registration_failed. + """ + + +class AccountEvaluationUpdateParamsLoginFailed(TypedDict): + reason: Literal["other", "suspected_account_sharing"] + """ + The reason why this login failed. + """ + + +class AccountEvaluationUpdateParamsRegistrationFailed(TypedDict): + reason: Literal["other", "suspected_multi_accounting"] + """ + The reason why this registration failed. + """ diff --git a/stripe/product_catalog/_trial_offer.py b/stripe/product_catalog/_trial_offer.py index 55e5ae66f..3562b5e49 100644 --- a/stripe/product_catalog/_trial_offer.py +++ b/stripe/product_catalog/_trial_offer.py @@ -61,6 +61,10 @@ class Transition(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ + name: Optional[str] + """ + A brief, user-friendly name for the trial offer-for identification purposes. + """ object: Literal["product_catalog.trial_offer"] """ String representing the object's type. Objects of the same type share the same value. diff --git a/stripe/radar/_account_evaluation.py b/stripe/radar/_account_evaluation.py index 16d5ae258..ffea61f00 100644 --- a/stripe/radar/_account_evaluation.py +++ b/stripe/radar/_account_evaluation.py @@ -32,14 +32,38 @@ class AccountEvaluation( ) class Event(StripeObject): + class LoginFailed(StripeObject): + reason: str + """ + The reason why this login failed. + """ + + class RegistrationFailed(StripeObject): + reason: str + """ + The reason why this registration failed. + """ + + login_failed: Optional[LoginFailed] + """ + Data about a failed login event. + """ occurred_at: int """ Time at which the event occurred. Measured in seconds since the Unix epoch. """ + registration_failed: Optional[RegistrationFailed] + """ + Data about a failed registration event. + """ type: str """ The type of event that occurred. """ + _inner_class_types = { + "login_failed": LoginFailed, + "registration_failed": RegistrationFailed, + } class Signals(StripeObject): class AccountSharing(StripeObject):