Debian Codegraph @

stripe/params/_source_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 SourceModifyParams(RequestOptions):
9 amount: NotRequired[int]
10 """
11 Amount associated with the source.
12 """
13 expand: NotRequired[List[str]]
14 """
15 Specifies which fields in the response should be expanded.
16 """
17 mandate: NotRequired["SourceModifyParamsMandate"]
18 """
19 Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
20 """
21 metadata: NotRequired["Literal['']|Dict[str, str]"]
22 """
23 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`.
24 """
25 owner: NotRequired["SourceModifyParamsOwner"]
26 """
27 Information about the owner of the payment instrument that may be used or required by particular source types.
28 """
29 source_order: NotRequired["SourceModifyParamsSourceOrder"]
30 """
31 Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
32 """
33
34
35 class SourceModifyParamsMandate(TypedDict):
36 acceptance: NotRequired["SourceModifyParamsMandateAcceptance"]
37 """
38 The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
39 """
40 amount: NotRequired["Literal['']|int"]
41 """
42 The amount specified by the mandate. (Leave null for a mandate covering all amounts)
43 """
44 currency: NotRequired[str]
45 """
46 The currency specified by the mandate. (Must match `currency` of the source)
47 """
48 interval: NotRequired[Literal["one_time", "scheduled", "variable"]]
49 """
50 The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
51 """
52 notification_method: NotRequired[
53 Literal["deprecated_none", "email", "manual", "none", "stripe_email"]
54 ]
55 """
56 The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
57 """
58
59
60 class SourceModifyParamsMandateAcceptance(TypedDict):
61 date: NotRequired[int]
62 """
63 The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
64 """
65 ip: NotRequired[str]
66 """
67 The IP address from which the mandate was accepted or refused by the customer.
68 """
69 offline: NotRequired["SourceModifyParamsMandateAcceptanceOffline"]
70 """
71 The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
72 """
73 online: NotRequired["SourceModifyParamsMandateAcceptanceOnline"]
74 """
75 The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
76 """
77 status: Literal["accepted", "pending", "refused", "revoked"]
78 """
79 The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
80 """
81 type: NotRequired[Literal["offline", "online"]]
82 """
83 The type of acceptance information included with the mandate. Either `online` or `offline`
84 """
85 user_agent: NotRequired[str]
86 """
87 The user agent of the browser from which the mandate was accepted or refused by the customer.
88 """
89
90
91 class SourceModifyParamsMandateAcceptanceOffline(TypedDict):
92 contact_email: str
93 """
94 An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
95 """
96
97
98 class SourceModifyParamsMandateAcceptanceOnline(TypedDict):
99 date: NotRequired[int]
100 """
101 The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
102 """
103 ip: NotRequired[str]
104 """
105 The IP address from which the mandate was accepted or refused by the customer.
106 """
107 user_agent: NotRequired[str]
108 """
109 The user agent of the browser from which the mandate was accepted or refused by the customer.
110 """
111
112
113 class SourceModifyParamsOwner(TypedDict):
114 address: NotRequired["SourceModifyParamsOwnerAddress"]
115 """
116 Owner's address.
117 """
118 email: NotRequired[str]
119 """
120 Owner's email address.
121 """
122 name: NotRequired[str]
123 """
124 Owner's full name.
125 """
126 phone: NotRequired[str]
127 """
128 Owner's phone number.
129 """
130
131
132 class SourceModifyParamsOwnerAddress(TypedDict):
133 city: NotRequired[str]
134 """
135 City, district, suburb, town, or village.
136 """
137 country: NotRequired[str]
138 """
139 Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
140 """
141 line1: NotRequired[str]
142 """
143 Address line 1, such as the street, PO Box, or company name.
144 """
145 line2: NotRequired[str]
146 """
147 Address line 2, such as the apartment, suite, unit, or building.
148 """
149 postal_code: NotRequired[str]
150 """
151 ZIP or postal code.
152 """
153 state: NotRequired[str]
154 """
155 State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
156 """
157
158
159 class SourceModifyParamsSourceOrder(TypedDict):
160 items: NotRequired[List["SourceModifyParamsSourceOrderItem"]]
161 """
162 List of items constituting the order.
163 """
164 shipping: NotRequired["SourceModifyParamsSourceOrderShipping"]
165 """
166 Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
167 """
168
169
170 class SourceModifyParamsSourceOrderItem(TypedDict):
171 amount: NotRequired[int]
172 currency: NotRequired[str]
173 description: NotRequired[str]
174 parent: NotRequired[str]
175 """
176 The ID of the SKU being ordered.
177 """
178 quantity: NotRequired[int]
179 """
180 The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
181 """
182 type: NotRequired[Literal["discount", "shipping", "sku", "tax"]]
183
184
185 class SourceModifyParamsSourceOrderShipping(TypedDict):
186 address: "SourceModifyParamsSourceOrderShippingAddress"
187 """
188 Shipping address.
189 """
190 carrier: NotRequired[str]
191 """
192 The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
193 """
194 name: NotRequired[str]
195 """
196 Recipient name.
197 """
198 phone: NotRequired[str]
199 """
200 Recipient phone (including extension).
201 """
202 tracking_number: NotRequired[str]
203 """
204 The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
205 """
206
207
208 class SourceModifyParamsSourceOrderShippingAddress(TypedDict):
209 city: NotRequired[str]
210 """
211 City, district, suburb, town, or village.
212 """
213 country: NotRequired[str]
214 """
215 Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
216 """
217 line1: str
218 """
219 Address line 1, such as the street, PO Box, or company name.
220 """
221 line2: NotRequired[str]
222 """
223 Address line 2, such as the apartment, suite, unit, or building.
224 """
225 postal_code: NotRequired[str]
226 """
227 ZIP or postal code.
228 """
229 state: NotRequired[str]
230 """
231 State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
232 """