Debian Codegraph @

stripe/params/_quote_update_params.py

raw
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 QuoteUpdateParams(TypedDict):
8 application_fee_amount: NotRequired["Literal['']|int"]
9 """
10 The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
11 """
12 application_fee_percent: NotRequired["Literal['']|float"]
13 """
14 A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
15 """
16 automatic_tax: NotRequired["QuoteUpdateParamsAutomaticTax"]
17 """
18 Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
19 """
20 collection_method: NotRequired[
21 Literal["charge_automatically", "send_invoice"]
22 ]
23 """
24 Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
25 """
26 customer: NotRequired[str]
27 """
28 The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
29 """
30 customer_account: NotRequired[str]
31 """
32 The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
33 """
34 default_tax_rates: NotRequired["Literal['']|List[str]"]
35 """
36 The tax rates that will apply to any line item that does not have `tax_rates` set.
37 """
38 description: NotRequired["Literal['']|str"]
39 """
40 A description that will be displayed on the quote PDF.
41 """
42 discounts: NotRequired["Literal['']|List[QuoteUpdateParamsDiscount]"]
43 """
44 The discounts applied to the quote.
45 """
46 expand: NotRequired[List[str]]
47 """
48 Specifies which fields in the response should be expanded.
49 """
50 expires_at: NotRequired[int]
51 """
52 A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
53 """
54 footer: NotRequired["Literal['']|str"]
55 """
56 A footer that will be displayed on the quote PDF.
57 """
58 header: NotRequired["Literal['']|str"]
59 """
60 A header that will be displayed on the quote PDF.
61 """
62 invoice_settings: NotRequired["QuoteUpdateParamsInvoiceSettings"]
63 """
64 All invoices will be billed using the specified settings.
65 """
66 line_items: NotRequired[List["QuoteUpdateParamsLineItem"]]
67 """
68 A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
69 """
70 metadata: NotRequired[Dict[str, str]]
71 """
72 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`.
73 """
74 on_behalf_of: NotRequired["Literal['']|str"]
75 """
76 The account on behalf of which to charge.
77 """
78 subscription_data: NotRequired["QuoteUpdateParamsSubscriptionData"]
79 """
80 When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
81 """
82 transfer_data: NotRequired["Literal['']|QuoteUpdateParamsTransferData"]
83 """
84 The data with which to automatically create a Transfer for each of the invoices.
85 """
86
87
88 class QuoteUpdateParamsAutomaticTax(TypedDict):
89 enabled: bool
90 """
91 Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
92 """
93 liability: NotRequired["QuoteUpdateParamsAutomaticTaxLiability"]
94 """
95 The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
96 """
97
98
99 class QuoteUpdateParamsAutomaticTaxLiability(TypedDict):
100 account: NotRequired[str]
101 """
102 The connected account being referenced when `type` is `account`.
103 """
104 type: Literal["account", "self"]
105 """
106 Type of the account referenced in the request.
107 """
108
109
110 class QuoteUpdateParamsDiscount(TypedDict):
111 coupon: NotRequired[str]
112 """
113 ID of the coupon to create a new discount for.
114 """
115 discount: NotRequired[str]
116 """
117 ID of an existing discount on the object (or one of its ancestors) to reuse.
118 """
119 promotion_code: NotRequired[str]
120 """
121 ID of the promotion code to create a new discount for.
122 """
123
124
125 class QuoteUpdateParamsInvoiceSettings(TypedDict):
126 days_until_due: NotRequired[int]
127 """
128 Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
129 """
130 issuer: NotRequired["QuoteUpdateParamsInvoiceSettingsIssuer"]
131 """
132 The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
133 """
134
135
136 class QuoteUpdateParamsInvoiceSettingsIssuer(TypedDict):
137 account: NotRequired[str]
138 """
139 The connected account being referenced when `type` is `account`.
140 """
141 type: Literal["account", "self"]
142 """
143 Type of the account referenced in the request.
144 """
145
146
147 class QuoteUpdateParamsLineItem(TypedDict):
148 discounts: NotRequired[
149 "Literal['']|List[QuoteUpdateParamsLineItemDiscount]"
150 ]
151 """
152 The discounts applied to this line item.
153 """
154 id: NotRequired[str]
155 """
156 The ID of an existing line item on the quote.
157 """
158 price: NotRequired[str]
159 """
160 The ID of the price object. One of `price` or `price_data` is required.
161 """
162 price_data: NotRequired["QuoteUpdateParamsLineItemPriceData"]
163 """
164 Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
165 """
166 quantity: NotRequired[int]
167 """
168 The quantity of the line item.
169 """
170 tax_rates: NotRequired["Literal['']|List[str]"]
171 """
172 The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
173 """
174
175
176 class QuoteUpdateParamsLineItemDiscount(TypedDict):
177 coupon: NotRequired[str]
178 """
179 ID of the coupon to create a new discount for.
180 """
181 discount: NotRequired[str]
182 """
183 ID of an existing discount on the object (or one of its ancestors) to reuse.
184 """
185 promotion_code: NotRequired[str]
186 """
187 ID of the promotion code to create a new discount for.
188 """
189
190
191 class QuoteUpdateParamsLineItemPriceData(TypedDict):
192 currency: str
193 """
194 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).
195 """
196 product: str
197 """
198 The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
199 """
200 recurring: NotRequired["QuoteUpdateParamsLineItemPriceDataRecurring"]
201 """
202 The recurring components of a price such as `interval` and `interval_count`.
203 """
204 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
205 """
206 Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
207 """
208 unit_amount: NotRequired[int]
209 """
210 A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
211 """
212 unit_amount_decimal: NotRequired[str]
213 """
214 Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
215 """
216
217
218 class QuoteUpdateParamsLineItemPriceDataRecurring(TypedDict):
219 interval: Literal["day", "month", "week", "year"]
220 """
221 Specifies billing frequency. Either `day`, `week`, `month` or `year`.
222 """
223 interval_count: NotRequired[int]
224 """
225 The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
226 """
227
228
229 class QuoteUpdateParamsSubscriptionData(TypedDict):
230 description: NotRequired["Literal['']|str"]
231 """
232 The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
233 """
234 effective_date: NotRequired[
235 "Literal['']|Literal['current_period_end']|int"
236 ]
237 """
238 When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
239 """
240 metadata: NotRequired[Dict[str, str]]
241 """
242 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
243 """
244 trial_period_days: NotRequired["Literal['']|int"]
245 """
246 Integer representing the number of trial period days before the customer is charged for the first time.
247 """
248
249
250 class QuoteUpdateParamsTransferData(TypedDict):
251 amount: NotRequired[int]
252 """
253 The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
254 """
255 amount_percent: NotRequired[float]
256 """
257 A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
258 """
259 destination: str
260 """
261 ID of an existing, connected Stripe account.
262 """