Debian Codegraph @

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