Debian Codegraph @

stripe/params/_quote_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 QuoteModifyParams(RequestOptions):
9 application_fee_amount: NotRequired["Literal['']|int"]
10 """
11 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.
12 """
13 application_fee_percent: NotRequired["Literal['']|float"]
14 """
15 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.
16 """
17 automatic_tax: NotRequired["QuoteModifyParamsAutomaticTax"]
18 """
19 Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
20 """
21 collection_method: NotRequired[
22 Literal["charge_automatically", "send_invoice"]
23 ]
24 """
25 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`.
26 """
27 customer: NotRequired[str]
28 """
29 The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
30 """
31 customer_account: NotRequired[str]
32 """
33 The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
34 """
35 default_tax_rates: NotRequired["Literal['']|List[str]"]
36 """
37 The tax rates that will apply to any line item that does not have `tax_rates` set.
38 """
39 description: NotRequired["Literal['']|str"]
40 """
41 A description that will be displayed on the quote PDF.
42 """
43 discounts: NotRequired["Literal['']|List[QuoteModifyParamsDiscount]"]
44 """
45 The discounts applied to the quote.
46 """
47 expand: NotRequired[List[str]]
48 """
49 Specifies which fields in the response should be expanded.
50 """
51 expires_at: NotRequired[int]
52 """
53 A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
54 """
55 footer: NotRequired["Literal['']|str"]
56 """
57 A footer that will be displayed on the quote PDF.
58 """
59 header: NotRequired["Literal['']|str"]
60 """
61 A header that will be displayed on the quote PDF.
62 """
63 invoice_settings: NotRequired["QuoteModifyParamsInvoiceSettings"]
64 """
65 All invoices will be billed using the specified settings.
66 """
67 line_items: NotRequired[List["QuoteModifyParamsLineItem"]]
68 """
69 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.
70 """
71 metadata: NotRequired[Dict[str, str]]
72 """
73 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`.
74 """
75 on_behalf_of: NotRequired["Literal['']|str"]
76 """
77 The account on behalf of which to charge.
78 """
79 subscription_data: NotRequired["QuoteModifyParamsSubscriptionData"]
80 """
81 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.
82 """
83 transfer_data: NotRequired["Literal['']|QuoteModifyParamsTransferData"]
84 """
85 The data with which to automatically create a Transfer for each of the invoices.
86 """
87
88
89 class QuoteModifyParamsAutomaticTax(TypedDict):
90 enabled: bool
91 """
92 Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
93 """
94 liability: NotRequired["QuoteModifyParamsAutomaticTaxLiability"]
95 """
96 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.
97 """
98
99
100 class QuoteModifyParamsAutomaticTaxLiability(TypedDict):
101 account: NotRequired[str]
102 """
103 The connected account being referenced when `type` is `account`.
104 """
105 type: Literal["account", "self"]
106 """
107 Type of the account referenced in the request.
108 """
109
110
111 class QuoteModifyParamsDiscount(TypedDict):
112 coupon: NotRequired[str]
113 """
114 ID of the coupon to create a new discount for.
115 """
116 discount: NotRequired[str]
117 """
118 ID of an existing discount on the object (or one of its ancestors) to reuse.
119 """
120 promotion_code: NotRequired[str]
121 """
122 ID of the promotion code to create a new discount for.
123 """
124
125
126 class QuoteModifyParamsInvoiceSettings(TypedDict):
127 days_until_due: NotRequired[int]
128 """
129 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`.
130 """
131 issuer: NotRequired["QuoteModifyParamsInvoiceSettingsIssuer"]
132 """
133 The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
134 """
135
136
137 class QuoteModifyParamsInvoiceSettingsIssuer(TypedDict):
138 account: NotRequired[str]
139 """
140 The connected account being referenced when `type` is `account`.
141 """
142 type: Literal["account", "self"]
143 """
144 Type of the account referenced in the request.
145 """
146
147
148 class QuoteModifyParamsLineItem(TypedDict):
149 discounts: NotRequired[
150 "Literal['']|List[QuoteModifyParamsLineItemDiscount]"
151 ]
152 """
153 The discounts applied to this line item.
154 """
155 id: NotRequired[str]
156 """
157 The ID of an existing line item on the quote.
158 """
159 price: NotRequired[str]
160 """
161 The ID of the price object. One of `price` or `price_data` is required.
162 """
163 price_data: NotRequired["QuoteModifyParamsLineItemPriceData"]
164 """
165 Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
166 """
167 quantity: NotRequired[int]
168 """
169 The quantity of the line item.
170 """
171 tax_rates: NotRequired["Literal['']|List[str]"]
172 """
173 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.
174 """
175
176
177 class QuoteModifyParamsLineItemDiscount(TypedDict):
178 coupon: NotRequired[str]
179 """
180 ID of the coupon to create a new discount for.
181 """
182 discount: NotRequired[str]
183 """
184 ID of an existing discount on the object (or one of its ancestors) to reuse.
185 """
186 promotion_code: NotRequired[str]
187 """
188 ID of the promotion code to create a new discount for.
189 """
190
191
192 class QuoteModifyParamsLineItemPriceData(TypedDict):
193 currency: str
194 """
195 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).
196 """
197 product: str
198 """
199 The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
200 """
201 recurring: NotRequired["QuoteModifyParamsLineItemPriceDataRecurring"]
202 """
203 The recurring components of a price such as `interval` and `interval_count`.
204 """
205 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
206 """
207 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.
208 """
209 unit_amount: NotRequired[int]
210 """
211 A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
212 """
213 unit_amount_decimal: NotRequired[str]
214 """
215 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.
216 """
217
218
219 class QuoteModifyParamsLineItemPriceDataRecurring(TypedDict):
220 interval: Literal["day", "month", "week", "year"]
221 """
222 Specifies billing frequency. Either `day`, `week`, `month` or `year`.
223 """
224 interval_count: NotRequired[int]
225 """
226 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).
227 """
228
229
230 class QuoteModifyParamsSubscriptionData(TypedDict):
231 description: NotRequired["Literal['']|str"]
232 """
233 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.
234 """
235 effective_date: NotRequired[
236 "Literal['']|Literal['current_period_end']|int"
237 ]
238 """
239 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.
240 """
241 metadata: NotRequired[Dict[str, str]]
242 """
243 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.
244 """
245 trial_period_days: NotRequired["Literal['']|int"]
246 """
247 Integer representing the number of trial period days before the customer is charged for the first time.
248 """
249
250
251 class QuoteModifyParamsTransferData(TypedDict):
252 amount: NotRequired[int]
253 """
254 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.
255 """
256 amount_percent: NotRequired[float]
257 """
258 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.
259 """
260 destination: str
261 """
262 ID of an existing, connected Stripe account.
263 """