Debian Codegraph @

stripe/params/_price_update_params.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from typing import Dict, List, Union
4 from typing_extensions import Literal, NotRequired, TypedDict
5
6
7 class PriceUpdateParams(TypedDict):
8 active: NotRequired[bool]
9 """
10 Whether the price can be used for new purchases. Defaults to `true`.
11 """
12 currency_options: NotRequired[
13 "Literal['']|Dict[str, PriceUpdateParamsCurrencyOptions]"
14 ]
15 """
16 Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
17 """
18 expand: NotRequired[List[str]]
19 """
20 Specifies which fields in the response should be expanded.
21 """
22 lookup_key: NotRequired[str]
23 """
24 A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
25 """
26 metadata: NotRequired["Literal['']|Dict[str, str]"]
27 """
28 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`.
29 """
30 nickname: NotRequired[str]
31 """
32 A brief description of the price, hidden from customers.
33 """
34 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
35 """
36 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.
37 """
38 transfer_lookup_key: NotRequired[bool]
39 """
40 If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
41 """
42
43
44 class PriceUpdateParamsCurrencyOptions(TypedDict):
45 custom_unit_amount: NotRequired[
46 "PriceUpdateParamsCurrencyOptionsCustomUnitAmount"
47 ]
48 """
49 When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
50 """
51 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
52 """
53 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.
54 """
55 tiers: NotRequired[List["PriceUpdateParamsCurrencyOptionsTier"]]
56 """
57 Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
58 """
59 unit_amount: NotRequired[int]
60 """
61 A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
62 """
63 unit_amount_decimal: NotRequired[str]
64 """
65 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.
66 """
67
68
69 class PriceUpdateParamsCurrencyOptionsCustomUnitAmount(TypedDict):
70 enabled: bool
71 """
72 Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
73 """
74 maximum: NotRequired[int]
75 """
76 The maximum unit amount the customer can specify for this item.
77 """
78 minimum: NotRequired[int]
79 """
80 The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
81 """
82 preset: NotRequired[int]
83 """
84 The starting unit amount which can be updated by the customer.
85 """
86
87
88 class PriceUpdateParamsCurrencyOptionsTier(TypedDict):
89 flat_amount: NotRequired[int]
90 """
91 The flat billing amount for an entire tier, regardless of the number of units in the tier.
92 """
93 flat_amount_decimal: NotRequired[str]
94 """
95 Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
96 """
97 unit_amount: NotRequired[int]
98 """
99 The per unit billing amount for each individual unit for which this tier applies.
100 """
101 unit_amount_decimal: NotRequired[str]
102 """
103 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.
104 """
105 up_to: Union[Literal["inf"], int]
106 """
107 Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
108 """