| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from stripe._request_options import RequestOptions |
| 4 |
from typing import Dict, List |
| 5 |
from typing_extensions import Literal, NotRequired, TypedDict |
| 6 |
|
| 7 |
|
| 8 |
class PaymentEvaluationCreateParams(RequestOptions): |
| 9 |
client_device_metadata_details: NotRequired[ |
| 10 |
"PaymentEvaluationCreateParamsClientDeviceMetadataDetails" |
| 11 |
] |
| 12 |
""" |
| 13 |
Details about the Client Device Metadata to associate with the payment evaluation. |
| 14 |
""" |
| 15 |
customer_details: "PaymentEvaluationCreateParamsCustomerDetails" |
| 16 |
""" |
| 17 |
Details about the customer associated with the payment evaluation. |
| 18 |
""" |
| 19 |
expand: NotRequired[List[str]] |
| 20 |
""" |
| 21 |
Specifies which fields in the response should be expanded. |
| 22 |
""" |
| 23 |
metadata: NotRequired[Dict[str, str]] |
| 24 |
""" |
| 25 |
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
| 26 |
""" |
| 27 |
payment_details: "PaymentEvaluationCreateParamsPaymentDetails" |
| 28 |
""" |
| 29 |
Details about the payment. |
| 30 |
""" |
| 31 |
|
| 32 |
|
| 33 |
class PaymentEvaluationCreateParamsClientDeviceMetadataDetails(TypedDict): |
| 34 |
radar_session: str |
| 35 |
""" |
| 36 |
ID for the Radar Session to associate with the payment evaluation. A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. |
| 37 |
""" |
| 38 |
|
| 39 |
|
| 40 |
class PaymentEvaluationCreateParamsCustomerDetails(TypedDict): |
| 41 |
customer: NotRequired[str] |
| 42 |
""" |
| 43 |
The ID of the customer associated with the payment evaluation. |
| 44 |
""" |
| 45 |
customer_account: NotRequired[str] |
| 46 |
""" |
| 47 |
The ID of the Account representing the customer associated with the payment evaluation. |
| 48 |
""" |
| 49 |
email: NotRequired[str] |
| 50 |
""" |
| 51 |
The customer's email address. |
| 52 |
""" |
| 53 |
name: NotRequired[str] |
| 54 |
""" |
| 55 |
The customer's full name or business name. |
| 56 |
""" |
| 57 |
phone: NotRequired[str] |
| 58 |
""" |
| 59 |
The customer's phone number. |
| 60 |
""" |
| 61 |
|
| 62 |
|
| 63 |
class PaymentEvaluationCreateParamsPaymentDetails(TypedDict): |
| 64 |
amount: int |
| 65 |
""" |
| 66 |
The intended amount to collect with this payment. A positive integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) (for example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). |
| 67 |
""" |
| 68 |
currency: str |
| 69 |
""" |
| 70 |
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). |
| 71 |
""" |
| 72 |
description: NotRequired[str] |
| 73 |
""" |
| 74 |
An arbitrary string attached to the object. Often useful for displaying to users. |
| 75 |
""" |
| 76 |
money_movement_details: NotRequired[ |
| 77 |
"PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetails" |
| 78 |
] |
| 79 |
""" |
| 80 |
Details about the payment's customer presence and type. |
| 81 |
""" |
| 82 |
payment_method_details: ( |
| 83 |
"PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetails" |
| 84 |
) |
| 85 |
""" |
| 86 |
Details about the payment method to use for the payment. |
| 87 |
""" |
| 88 |
shipping_details: NotRequired[ |
| 89 |
"PaymentEvaluationCreateParamsPaymentDetailsShippingDetails" |
| 90 |
] |
| 91 |
""" |
| 92 |
Shipping details for the payment evaluation. |
| 93 |
""" |
| 94 |
statement_descriptor: NotRequired[str] |
| 95 |
""" |
| 96 |
Payment statement descriptor. |
| 97 |
""" |
| 98 |
|
| 99 |
|
| 100 |
class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetails( |
| 101 |
TypedDict, |
| 102 |
): |
| 103 |
card: NotRequired[ |
| 104 |
"PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard" |
| 105 |
] |
| 106 |
""" |
| 107 |
Describes card money movement details for the payment evaluation. |
| 108 |
""" |
| 109 |
money_movement_type: Literal["card"] |
| 110 |
""" |
| 111 |
Describes the type of money movement. Currently only `card` is supported. |
| 112 |
""" |
| 113 |
|
| 114 |
|
| 115 |
class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard( |
| 116 |
TypedDict, |
| 117 |
): |
| 118 |
customer_presence: NotRequired[Literal["off_session", "on_session"]] |
| 119 |
""" |
| 120 |
Describes the presence of the customer during the payment. |
| 121 |
""" |
| 122 |
payment_type: NotRequired[ |
| 123 |
Literal["one_off", "recurring", "setup_one_off", "setup_recurring"] |
| 124 |
] |
| 125 |
""" |
| 126 |
Describes the type of payment. |
| 127 |
""" |
| 128 |
|
| 129 |
|
| 130 |
class PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetails( |
| 131 |
TypedDict, |
| 132 |
): |
| 133 |
billing_details: NotRequired[ |
| 134 |
"PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails" |
| 135 |
] |
| 136 |
""" |
| 137 |
Billing information associated with the payment evaluation. |
| 138 |
""" |
| 139 |
payment_method: str |
| 140 |
""" |
| 141 |
ID of the payment method used in this payment evaluation. |
| 142 |
""" |
| 143 |
|
| 144 |
|
| 145 |
class PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails( |
| 146 |
TypedDict, |
| 147 |
): |
| 148 |
address: NotRequired[ |
| 149 |
"PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress" |
| 150 |
] |
| 151 |
""" |
| 152 |
Billing address. |
| 153 |
""" |
| 154 |
email: NotRequired[str] |
| 155 |
""" |
| 156 |
Email address. |
| 157 |
""" |
| 158 |
name: NotRequired[str] |
| 159 |
""" |
| 160 |
Full name. |
| 161 |
""" |
| 162 |
phone: NotRequired[str] |
| 163 |
""" |
| 164 |
Billing phone number (including extension). |
| 165 |
""" |
| 166 |
|
| 167 |
|
| 168 |
class PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress( |
| 169 |
TypedDict, |
| 170 |
): |
| 171 |
city: NotRequired[str] |
| 172 |
""" |
| 173 |
City, district, suburb, town, or village. |
| 174 |
""" |
| 175 |
country: NotRequired[str] |
| 176 |
""" |
| 177 |
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
| 178 |
""" |
| 179 |
line1: NotRequired[str] |
| 180 |
""" |
| 181 |
Address line 1, such as the street, PO Box, or company name. |
| 182 |
""" |
| 183 |
line2: NotRequired[str] |
| 184 |
""" |
| 185 |
Address line 2, such as the apartment, suite, unit, or building. |
| 186 |
""" |
| 187 |
postal_code: NotRequired[str] |
| 188 |
""" |
| 189 |
ZIP or postal code. |
| 190 |
""" |
| 191 |
state: NotRequired[str] |
| 192 |
""" |
| 193 |
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). |
| 194 |
""" |
| 195 |
|
| 196 |
|
| 197 |
class PaymentEvaluationCreateParamsPaymentDetailsShippingDetails(TypedDict): |
| 198 |
address: NotRequired[ |
| 199 |
"PaymentEvaluationCreateParamsPaymentDetailsShippingDetailsAddress" |
| 200 |
] |
| 201 |
""" |
| 202 |
Shipping address. |
| 203 |
""" |
| 204 |
name: NotRequired[str] |
| 205 |
""" |
| 206 |
Shipping name. |
| 207 |
""" |
| 208 |
phone: NotRequired[str] |
| 209 |
""" |
| 210 |
Shipping phone number. |
| 211 |
""" |
| 212 |
|
| 213 |
|
| 214 |
class PaymentEvaluationCreateParamsPaymentDetailsShippingDetailsAddress( |
| 215 |
TypedDict, |
| 216 |
): |
| 217 |
city: NotRequired[str] |
| 218 |
""" |
| 219 |
City, district, suburb, town, or village. |
| 220 |
""" |
| 221 |
country: NotRequired[str] |
| 222 |
""" |
| 223 |
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
| 224 |
""" |
| 225 |
line1: NotRequired[str] |
| 226 |
""" |
| 227 |
Address line 1, such as the street, PO Box, or company name. |
| 228 |
""" |
| 229 |
line2: NotRequired[str] |
| 230 |
""" |
| 231 |
Address line 2, such as the apartment, suite, unit, or building. |
| 232 |
""" |
| 233 |
postal_code: NotRequired[str] |
| 234 |
""" |
| 235 |
ZIP or postal code. |
| 236 |
""" |
| 237 |
state: NotRequired[str] |
| 238 |
""" |
| 239 |
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). |
| 240 |
""" |