| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from typing import Dict, List |
| 4 |
from typing_extensions import Literal, NotRequired, TypedDict |
| 5 |
|
| 6 |
|
| 7 |
class CustomerUpdateParams(TypedDict): |
| 8 |
address: NotRequired["Literal['']|CustomerUpdateParamsAddress"] |
| 9 |
""" |
| 10 |
The customer's address. Learn about [country-specific requirements for calculating tax](https://docs.stripe.com/invoicing/taxes?dashboard-or-api=dashboard#set-up-customer). |
| 11 |
""" |
| 12 |
balance: NotRequired[int] |
| 13 |
""" |
| 14 |
An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. |
| 15 |
""" |
| 16 |
business_name: NotRequired["Literal['']|str"] |
| 17 |
""" |
| 18 |
The customer's business name. This may be up to *150 characters*. |
| 19 |
""" |
| 20 |
cash_balance: NotRequired["CustomerUpdateParamsCashBalance"] |
| 21 |
""" |
| 22 |
Balance information and default balance settings for this customer. |
| 23 |
""" |
| 24 |
default_source: NotRequired[str] |
| 25 |
""" |
| 26 |
If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. |
| 27 |
|
| 28 |
Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. |
| 29 |
|
| 30 |
If you want to add a new payment source and make it the default, see the [source](https://docs.stripe.com/api/customers/update#update_customer-source) property. |
| 31 |
""" |
| 32 |
description: NotRequired[str] |
| 33 |
""" |
| 34 |
An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. |
| 35 |
""" |
| 36 |
email: NotRequired[str] |
| 37 |
""" |
| 38 |
Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. |
| 39 |
""" |
| 40 |
expand: NotRequired[List[str]] |
| 41 |
""" |
| 42 |
Specifies which fields in the response should be expanded. |
| 43 |
""" |
| 44 |
individual_name: NotRequired["Literal['']|str"] |
| 45 |
""" |
| 46 |
The customer's full name. This may be up to *150 characters*. |
| 47 |
""" |
| 48 |
invoice_prefix: NotRequired[str] |
| 49 |
""" |
| 50 |
The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. |
| 51 |
""" |
| 52 |
invoice_settings: NotRequired["CustomerUpdateParamsInvoiceSettings"] |
| 53 |
""" |
| 54 |
Default invoice settings for this customer. |
| 55 |
""" |
| 56 |
metadata: NotRequired["Literal['']|Dict[str, str]"] |
| 57 |
""" |
| 58 |
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`. |
| 59 |
""" |
| 60 |
name: NotRequired[str] |
| 61 |
""" |
| 62 |
The customer's full name or business name. |
| 63 |
""" |
| 64 |
next_invoice_sequence: NotRequired[int] |
| 65 |
""" |
| 66 |
The sequence to be used on the customer's next invoice. Defaults to 1. |
| 67 |
""" |
| 68 |
phone: NotRequired[str] |
| 69 |
""" |
| 70 |
The customer's phone number. |
| 71 |
""" |
| 72 |
preferred_locales: NotRequired[List[str]] |
| 73 |
""" |
| 74 |
Customer's preferred languages, ordered by preference. |
| 75 |
""" |
| 76 |
shipping: NotRequired["Literal['']|CustomerUpdateParamsShipping"] |
| 77 |
""" |
| 78 |
The customer's shipping information. Appears on invoices emailed to this customer. |
| 79 |
""" |
| 80 |
source: NotRequired[str] |
| 81 |
tax: NotRequired["CustomerUpdateParamsTax"] |
| 82 |
""" |
| 83 |
Tax details about the customer. |
| 84 |
""" |
| 85 |
tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"] |
| 86 |
""" |
| 87 |
The customer's tax exemption. One of `none`, `exempt`, or `reverse`. |
| 88 |
""" |
| 89 |
validate: NotRequired[bool] |
| 90 |
|
| 91 |
|
| 92 |
class CustomerUpdateParamsAddress(TypedDict): |
| 93 |
city: NotRequired[str] |
| 94 |
""" |
| 95 |
City, district, suburb, town, or village. |
| 96 |
""" |
| 97 |
country: NotRequired[str] |
| 98 |
""" |
| 99 |
A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
| 100 |
""" |
| 101 |
line1: NotRequired[str] |
| 102 |
""" |
| 103 |
Address line 1, such as the street, PO Box, or company name. |
| 104 |
""" |
| 105 |
line2: NotRequired[str] |
| 106 |
""" |
| 107 |
Address line 2, such as the apartment, suite, unit, or building. |
| 108 |
""" |
| 109 |
postal_code: NotRequired[str] |
| 110 |
""" |
| 111 |
ZIP or postal code. |
| 112 |
""" |
| 113 |
state: NotRequired[str] |
| 114 |
""" |
| 115 |
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). |
| 116 |
""" |
| 117 |
|
| 118 |
|
| 119 |
class CustomerUpdateParamsCashBalance(TypedDict): |
| 120 |
settings: NotRequired["CustomerUpdateParamsCashBalanceSettings"] |
| 121 |
""" |
| 122 |
Settings controlling the behavior of the customer's cash balance, |
| 123 |
such as reconciliation of funds received. |
| 124 |
""" |
| 125 |
|
| 126 |
|
| 127 |
class CustomerUpdateParamsCashBalanceSettings(TypedDict): |
| 128 |
reconciliation_mode: NotRequired[ |
| 129 |
Literal["automatic", "manual", "merchant_default"] |
| 130 |
] |
| 131 |
""" |
| 132 |
Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://docs.stripe.com/payments/customer-balance/reconciliation). |
| 133 |
""" |
| 134 |
|
| 135 |
|
| 136 |
class CustomerUpdateParamsInvoiceSettings(TypedDict): |
| 137 |
custom_fields: NotRequired[ |
| 138 |
"Literal['']|List[CustomerUpdateParamsInvoiceSettingsCustomField]" |
| 139 |
] |
| 140 |
""" |
| 141 |
The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. |
| 142 |
""" |
| 143 |
default_payment_method: NotRequired[str] |
| 144 |
""" |
| 145 |
ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. |
| 146 |
""" |
| 147 |
footer: NotRequired[str] |
| 148 |
""" |
| 149 |
Default footer to be displayed on invoices for this customer. |
| 150 |
""" |
| 151 |
rendering_options: NotRequired[ |
| 152 |
"Literal['']|CustomerUpdateParamsInvoiceSettingsRenderingOptions" |
| 153 |
] |
| 154 |
""" |
| 155 |
Default options for invoice PDF rendering for this customer. |
| 156 |
""" |
| 157 |
|
| 158 |
|
| 159 |
class CustomerUpdateParamsInvoiceSettingsCustomField(TypedDict): |
| 160 |
name: str |
| 161 |
""" |
| 162 |
The name of the custom field. This may be up to 40 characters. |
| 163 |
""" |
| 164 |
value: str |
| 165 |
""" |
| 166 |
The value of the custom field. This may be up to 140 characters. |
| 167 |
""" |
| 168 |
|
| 169 |
|
| 170 |
class CustomerUpdateParamsInvoiceSettingsRenderingOptions(TypedDict): |
| 171 |
amount_tax_display: NotRequired[ |
| 172 |
"Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" |
| 173 |
] |
| 174 |
""" |
| 175 |
How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. |
| 176 |
""" |
| 177 |
template: NotRequired[str] |
| 178 |
""" |
| 179 |
ID of the invoice rendering template to use for future invoices. |
| 180 |
""" |
| 181 |
|
| 182 |
|
| 183 |
class CustomerUpdateParamsShipping(TypedDict): |
| 184 |
address: "CustomerUpdateParamsShippingAddress" |
| 185 |
""" |
| 186 |
Customer shipping address. |
| 187 |
""" |
| 188 |
name: str |
| 189 |
""" |
| 190 |
Customer name. |
| 191 |
""" |
| 192 |
phone: NotRequired[str] |
| 193 |
""" |
| 194 |
Customer phone (including extension). |
| 195 |
""" |
| 196 |
|
| 197 |
|
| 198 |
class CustomerUpdateParamsShippingAddress(TypedDict): |
| 199 |
city: NotRequired[str] |
| 200 |
""" |
| 201 |
City, district, suburb, town, or village. |
| 202 |
""" |
| 203 |
country: NotRequired[str] |
| 204 |
""" |
| 205 |
A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
| 206 |
""" |
| 207 |
line1: NotRequired[str] |
| 208 |
""" |
| 209 |
Address line 1, such as the street, PO Box, or company name. |
| 210 |
""" |
| 211 |
line2: NotRequired[str] |
| 212 |
""" |
| 213 |
Address line 2, such as the apartment, suite, unit, or building. |
| 214 |
""" |
| 215 |
postal_code: NotRequired[str] |
| 216 |
""" |
| 217 |
ZIP or postal code. |
| 218 |
""" |
| 219 |
state: NotRequired[str] |
| 220 |
""" |
| 221 |
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). |
| 222 |
""" |
| 223 |
|
| 224 |
|
| 225 |
class CustomerUpdateParamsTax(TypedDict): |
| 226 |
ip_address: NotRequired["Literal['']|str"] |
| 227 |
""" |
| 228 |
A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. |
| 229 |
""" |
| 230 |
validate_location: NotRequired[Literal["auto", "deferred", "immediately"]] |
| 231 |
""" |
| 232 |
A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. |
| 233 |
""" |