Debian Codegraph @

stripe/params/tax/_transaction_create_reversal_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 TransactionCreateReversalParams(RequestOptions):
9 expand: NotRequired[List[str]]
10 """
11 Specifies which fields in the response should be expanded.
12 """
13 flat_amount: NotRequired[int]
14 """
15 A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes.
16 """
17 line_items: NotRequired[List["TransactionCreateReversalParamsLineItem"]]
18 """
19 The line item amounts to reverse.
20 """
21 metadata: NotRequired[Dict[str, str]]
22 """
23 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`.
24 """
25 mode: Literal["full", "partial"]
26 """
27 If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.
28 """
29 original_transaction: str
30 """
31 The ID of the Transaction to partially or fully reverse.
32 """
33 reference: str
34 """
35 A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://docs.stripe.com/tax/reports).
36 """
37 shipping_cost: NotRequired["TransactionCreateReversalParamsShippingCost"]
38 """
39 The shipping cost to reverse.
40 """
41
42
43 class TransactionCreateReversalParamsLineItem(TypedDict):
44 amount: int
45 """
46 The amount to reverse, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) in negative.
47 """
48 amount_tax: int
49 """
50 The amount of tax to reverse, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) in negative.
51 """
52 metadata: NotRequired[Dict[str, str]]
53 """
54 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.
55 """
56 original_line_item: str
57 """
58 The `id` of the line item to reverse in the original transaction.
59 """
60 quantity: NotRequired[int]
61 """
62 The quantity reversed. Appears in [tax exports](https://docs.stripe.com/tax/reports), but does not affect the amount of tax reversed.
63 """
64 reference: str
65 """
66 A custom identifier for this line item in the reversal transaction, such as 'L1-refund'.
67 """
68
69
70 class TransactionCreateReversalParamsShippingCost(TypedDict):
71 amount: int
72 """
73 The amount to reverse, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) in negative.
74 """
75 amount_tax: int
76 """
77 The amount of tax to reverse, in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) in negative.
78 """