Skip to content
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 CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4b8685a69ee5061fca67cc7e3fd69c8e6890b24e
4ec19847e2d6cb16e17bd2ad2aee2bf48d86013c
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2150
v2151
48 changes: 36 additions & 12 deletions stripe/delegated_checkout/_requested_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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"]]
"""
Expand Down Expand Up @@ -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,
}
4 changes: 4 additions & 0 deletions stripe/params/product_catalog/_trial_offer_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
20 changes: 20 additions & 0 deletions stripe/params/radar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
33 changes: 31 additions & 2 deletions stripe/params/radar/_account_evaluation_modify_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,44 @@
# 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):
expand: NotRequired[List[str]]
"""
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.
"""
31 changes: 30 additions & 1 deletion stripe/params/radar/_account_evaluation_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
4 changes: 4 additions & 0 deletions stripe/product_catalog/_trial_offer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
24 changes: 24 additions & 0 deletions stripe/radar/_account_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down