Debian Codegraph @

stripe/tax/_calculation_line_item.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from stripe._stripe_object import StripeObject
4 from typing import ClassVar, Dict, List, Optional
5 from typing_extensions import Literal
6
7
8 class CalculationLineItem(StripeObject):
9 OBJECT_NAME: ClassVar[Literal["tax.calculation_line_item"]] = (
10 "tax.calculation_line_item"
11 )
12
13 class TaxBreakdown(StripeObject):
14 class Jurisdiction(StripeObject):
15 country: str
16 """
17 Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
18 """
19 display_name: str
20 """
21 A human-readable name for the jurisdiction imposing the tax.
22 """
23 level: Literal["city", "country", "county", "district", "state"]
24 """
25 Indicates the level of the jurisdiction imposing the tax.
26 """
27 state: Optional[str]
28 """
29 [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
30 """
31
32 class TaxRateDetails(StripeObject):
33 display_name: str
34 """
35 A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
36 """
37 percentage_decimal: str
38 """
39 The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
40 """
41 tax_type: Literal[
42 "amusement_tax",
43 "communications_tax",
44 "gst",
45 "hst",
46 "igst",
47 "jct",
48 "lease_tax",
49 "pst",
50 "qst",
51 "retail_delivery_fee",
52 "rst",
53 "sales_tax",
54 "service_tax",
55 "vat",
56 ]
57 """
58 The tax type, such as `vat` or `sales_tax`.
59 """
60
61 amount: int
62 """
63 The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
64 """
65 jurisdiction: Jurisdiction
66 sourcing: Literal["destination", "origin"]
67 """
68 Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
69 """
70 tax_rate_details: Optional[TaxRateDetails]
71 """
72 Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
73 """
74 taxability_reason: Literal[
75 "customer_exempt",
76 "not_collecting",
77 "not_subject_to_tax",
78 "not_supported",
79 "portion_product_exempt",
80 "portion_reduced_rated",
81 "portion_standard_rated",
82 "product_exempt",
83 "product_exempt_holiday",
84 "proportionally_rated",
85 "reduced_rated",
86 "reverse_charge",
87 "standard_rated",
88 "taxable_basis_reduced",
89 "zero_rated",
90 ]
91 """
92 The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
93 """
94 taxable_amount: int
95 """
96 The amount on which tax is calculated, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
97 """
98 _inner_class_types = {
99 "jurisdiction": Jurisdiction,
100 "tax_rate_details": TaxRateDetails,
101 }
102
103 amount: int
104 """
105 The line item amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
106 """
107 amount_tax: int
108 """
109 The amount of tax calculated for this line item, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
110 """
111 id: str
112 """
113 Unique identifier for the object.
114 """
115 livemode: bool
116 """
117 Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
118 """
119 metadata: Optional[Dict[str, str]]
120 """
121 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.
122 """
123 object: Literal["tax.calculation_line_item"]
124 """
125 String representing the object's type. Objects of the same type share the same value.
126 """
127 product: Optional[str]
128 """
129 The ID of an existing [Product](https://docs.stripe.com/api/products/object).
130 """
131 quantity: int
132 """
133 The number of units of the item being purchased. For reversals, this is the quantity reversed.
134 """
135 reference: str
136 """
137 A custom identifier for this line item.
138 """
139 tax_behavior: Literal["exclusive", "inclusive"]
140 """
141 Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
142 """
143 tax_breakdown: Optional[List[TaxBreakdown]]
144 """
145 Detailed account of taxes relevant to this line item.
146 """
147 tax_code: str
148 """
149 The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for this resource.
150 """
151 _inner_class_types = {"tax_breakdown": TaxBreakdown}