Debian Codegraph @

stripe/params/_invoice_item_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 InvoiceItemModifyParams(RequestOptions):
9 amount: NotRequired[int]
10 """
11 The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
12 """
13 description: NotRequired[str]
14 """
15 An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
16 """
17 discountable: NotRequired[bool]
18 """
19 Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.
20 """
21 discounts: NotRequired["Literal['']|List[InvoiceItemModifyParamsDiscount]"]
22 """
23 The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
24 """
25 expand: NotRequired[List[str]]
26 """
27 Specifies which fields in the response should be expanded.
28 """
29 metadata: NotRequired["Literal['']|Dict[str, str]"]
30 """
31 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`.
32 """
33 period: NotRequired["InvoiceItemModifyParamsPeriod"]
34 """
35 The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://docs.stripe.com/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
36 """
37 price_data: NotRequired["InvoiceItemModifyParamsPriceData"]
38 """
39 Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline.
40 """
41 pricing: NotRequired["InvoiceItemModifyParamsPricing"]
42 """
43 The pricing information for the invoice item.
44 """
45 quantity: NotRequired[int]
46 """
47 Non-negative integer. The quantity of units for the invoice item.
48 """
49 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
50 """
51 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.
52 """
53 tax_code: NotRequired["Literal['']|str"]
54 """
55 A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
56 """
57 tax_rates: NotRequired["Literal['']|List[str]"]
58 """
59 The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
60 """
61 unit_amount_decimal: NotRequired[str]
62 """
63 The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
64 """
65
66
67 class InvoiceItemModifyParamsDiscount(TypedDict):
68 coupon: NotRequired[str]
69 """
70 ID of the coupon to create a new discount for.
71 """
72 discount: NotRequired[str]
73 """
74 ID of an existing discount on the object (or one of its ancestors) to reuse.
75 """
76 promotion_code: NotRequired[str]
77 """
78 ID of the promotion code to create a new discount for.
79 """
80
81
82 class InvoiceItemModifyParamsPeriod(TypedDict):
83 end: int
84 """
85 The end of the period, which must be greater than or equal to the start. This value is inclusive.
86 """
87 start: int
88 """
89 The start of the period. This value is inclusive.
90 """
91
92
93 class InvoiceItemModifyParamsPriceData(TypedDict):
94 currency: str
95 """
96 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).
97 """
98 product: str
99 """
100 The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
101 """
102 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
103 """
104 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.
105 """
106 unit_amount: NotRequired[int]
107 """
108 A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
109 """
110 unit_amount_decimal: NotRequired[str]
111 """
112 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.
113 """
114
115
116 class InvoiceItemModifyParamsPricing(TypedDict):
117 price: NotRequired[str]
118 """
119 The ID of the price object.
120 """