Debian Codegraph @

stripe/params/_customer_modify_params.py

raw
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 CustomerModifyParams(RequestOptions):
9 address: NotRequired["Literal['']|CustomerModifyParamsAddress"]
10 """
11 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).
12 """
13 balance: NotRequired[int]
14 """
15 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.
16 """
17 business_name: NotRequired["Literal['']|str"]
18 """
19 The customer's business name. This may be up to *150 characters*.
20 """
21 cash_balance: NotRequired["CustomerModifyParamsCashBalance"]
22 """
23 Balance information and default balance settings for this customer.
24 """
25 default_source: NotRequired[str]
26 """
27 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.
28
29 Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
30
31 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.
32 """
33 description: NotRequired[str]
34 """
35 An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
36 """
37 email: NotRequired[str]
38 """
39 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*.
40 """
41 expand: NotRequired[List[str]]
42 """
43 Specifies which fields in the response should be expanded.
44 """
45 individual_name: NotRequired["Literal['']|str"]
46 """
47 The customer's full name. This may be up to *150 characters*.
48 """
49 invoice_prefix: NotRequired[str]
50 """
51 The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
52 """
53 invoice_settings: NotRequired["CustomerModifyParamsInvoiceSettings"]
54 """
55 Default invoice settings for this customer.
56 """
57 metadata: NotRequired["Literal['']|Dict[str, str]"]
58 """
59 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`.
60 """
61 name: NotRequired[str]
62 """
63 The customer's full name or business name.
64 """
65 next_invoice_sequence: NotRequired[int]
66 """
67 The sequence to be used on the customer's next invoice. Defaults to 1.
68 """
69 phone: NotRequired[str]
70 """
71 The customer's phone number.
72 """
73 preferred_locales: NotRequired[List[str]]
74 """
75 Customer's preferred languages, ordered by preference.
76 """
77 shipping: NotRequired["Literal['']|CustomerModifyParamsShipping"]
78 """
79 The customer's shipping information. Appears on invoices emailed to this customer.
80 """
81 source: NotRequired[str]
82 tax: NotRequired["CustomerModifyParamsTax"]
83 """
84 Tax details about the customer.
85 """
86 tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"]
87 """
88 The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
89 """
90 validate: NotRequired[bool]
91
92
93 class CustomerModifyParamsAddress(TypedDict):
94 city: NotRequired[str]
95 """
96 City, district, suburb, town, or village.
97 """
98 country: NotRequired[str]
99 """
100 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)).
101 """
102 line1: NotRequired[str]
103 """
104 Address line 1, such as the street, PO Box, or company name.
105 """
106 line2: NotRequired[str]
107 """
108 Address line 2, such as the apartment, suite, unit, or building.
109 """
110 postal_code: NotRequired[str]
111 """
112 ZIP or postal code.
113 """
114 state: NotRequired[str]
115 """
116 State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
117 """
118
119
120 class CustomerModifyParamsCashBalance(TypedDict):
121 settings: NotRequired["CustomerModifyParamsCashBalanceSettings"]
122 """
123 Settings controlling the behavior of the customer's cash balance,
124 such as reconciliation of funds received.
125 """
126
127
128 class CustomerModifyParamsCashBalanceSettings(TypedDict):
129 reconciliation_mode: NotRequired[
130 Literal["automatic", "manual", "merchant_default"]
131 ]
132 """
133 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).
134 """
135
136
137 class CustomerModifyParamsInvoiceSettings(TypedDict):
138 custom_fields: NotRequired[
139 "Literal['']|List[CustomerModifyParamsInvoiceSettingsCustomField]"
140 ]
141 """
142 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.
143 """
144 default_payment_method: NotRequired[str]
145 """
146 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.
147 """
148 footer: NotRequired[str]
149 """
150 Default footer to be displayed on invoices for this customer.
151 """
152 rendering_options: NotRequired[
153 "Literal['']|CustomerModifyParamsInvoiceSettingsRenderingOptions"
154 ]
155 """
156 Default options for invoice PDF rendering for this customer.
157 """
158
159
160 class CustomerModifyParamsInvoiceSettingsCustomField(TypedDict):
161 name: str
162 """
163 The name of the custom field. This may be up to 40 characters.
164 """
165 value: str
166 """
167 The value of the custom field. This may be up to 140 characters.
168 """
169
170
171 class CustomerModifyParamsInvoiceSettingsRenderingOptions(TypedDict):
172 amount_tax_display: NotRequired[
173 "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']"
174 ]
175 """
176 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.
177 """
178 template: NotRequired[str]
179 """
180 ID of the invoice rendering template to use for future invoices.
181 """
182
183
184 class CustomerModifyParamsShipping(TypedDict):
185 address: "CustomerModifyParamsShippingAddress"
186 """
187 Customer shipping address.
188 """
189 name: str
190 """
191 Customer name.
192 """
193 phone: NotRequired[str]
194 """
195 Customer phone (including extension).
196 """
197
198
199 class CustomerModifyParamsShippingAddress(TypedDict):
200 city: NotRequired[str]
201 """
202 City, district, suburb, town, or village.
203 """
204 country: NotRequired[str]
205 """
206 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)).
207 """
208 line1: NotRequired[str]
209 """
210 Address line 1, such as the street, PO Box, or company name.
211 """
212 line2: NotRequired[str]
213 """
214 Address line 2, such as the apartment, suite, unit, or building.
215 """
216 postal_code: NotRequired[str]
217 """
218 ZIP or postal code.
219 """
220 state: NotRequired[str]
221 """
222 State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
223 """
224
225
226 class CustomerModifyParamsTax(TypedDict):
227 ip_address: NotRequired["Literal['']|str"]
228 """
229 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.
230 """
231 validate_location: NotRequired[Literal["auto", "deferred", "immediately"]]
232 """
233 A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`.
234 """