Debian Codegraph @

stripe/tax/_transaction_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, Optional
5 from typing_extensions import Literal
6
7
8 class TransactionLineItem(StripeObject):
9 OBJECT_NAME: ClassVar[Literal["tax.transaction_line_item"]] = (
10 "tax.transaction_line_item"
11 )
12
13 class Reversal(StripeObject):
14 original_line_item: str
15 """
16 The `id` of the line item to reverse in the original transaction.
17 """
18
19 amount: int
20 """
21 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.
22 """
23 amount_tax: int
24 """
25 The amount of tax calculated for this line item, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
26 """
27 id: str
28 """
29 Unique identifier for the object.
30 """
31 livemode: bool
32 """
33 Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
34 """
35 metadata: Optional[Dict[str, str]]
36 """
37 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.
38 """
39 object: Literal["tax.transaction_line_item"]
40 """
41 String representing the object's type. Objects of the same type share the same value.
42 """
43 product: Optional[str]
44 """
45 The ID of an existing [Product](https://docs.stripe.com/api/products/object).
46 """
47 quantity: int
48 """
49 The number of units of the item being purchased. For reversals, this is the quantity reversed.
50 """
51 reference: str
52 """
53 A custom identifier for this line item in the transaction.
54 """
55 reversal: Optional[Reversal]
56 """
57 If `type=reversal`, contains information about what was reversed.
58 """
59 tax_behavior: Literal["exclusive", "inclusive"]
60 """
61 Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
62 """
63 tax_code: str
64 """
65 The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for this resource.
66 """
67 type: Literal["reversal", "transaction"]
68 """
69 If `reversal`, this line item reverses an earlier transaction.
70 """
71 _inner_class_types = {"reversal": Reversal}