Debian Codegraph @

stripe/reserve/_release.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from stripe._expandable_field import ExpandableField
4 from stripe._stripe_object import StripeObject
5 from typing import ClassVar, Dict, Optional
6 from typing_extensions import Literal, TYPE_CHECKING
7
8 if TYPE_CHECKING:
9 from stripe._dispute import Dispute
10 from stripe._refund import Refund
11 from stripe.reserve._hold import Hold
12 from stripe.reserve._plan import Plan
13
14
15 class Release(StripeObject):
16 """
17 ReserveReleases represent the release of funds from a ReserveHold.
18 """
19
20 OBJECT_NAME: ClassVar[Literal["reserve.release"]] = "reserve.release"
21
22 class SourceTransaction(StripeObject):
23 dispute: Optional[ExpandableField["Dispute"]]
24 """
25 The ID of the dispute.
26 """
27 refund: Optional[ExpandableField["Refund"]]
28 """
29 The ID of the refund.
30 """
31 type: Literal["dispute", "refund"]
32 """
33 The type of source transaction.
34 """
35
36 amount: int
37 """
38 Amount released. A positive integer representing how much is released in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
39 """
40 created: int
41 """
42 Time at which the object was created. Measured in seconds since the Unix epoch.
43 """
44 created_by: Literal["application", "stripe"]
45 """
46 Indicates which party created this ReserveRelease.
47 """
48 currency: str
49 """
50 Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
51 """
52 id: str
53 """
54 Unique identifier for the object.
55 """
56 livemode: bool
57 """
58 Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
59 """
60 metadata: Optional[Dict[str, str]]
61 """
62 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.
63 """
64 object: Literal["reserve.release"]
65 """
66 String representing the object's type. Objects of the same type share the same value.
67 """
68 reason: Literal[
69 "bulk_hold_expiry",
70 "hold_released_early",
71 "hold_reversed",
72 "plan_disabled",
73 ]
74 """
75 The reason for the ReserveRelease, indicating why the funds were released.
76 """
77 released_at: int
78 """
79 The release timestamp of the funds.
80 """
81 reserve_hold: Optional[ExpandableField["Hold"]]
82 """
83 The ReserveHold this ReserveRelease is associated with.
84 """
85 reserve_plan: Optional[ExpandableField["Plan"]]
86 """
87 The ReservePlan ID this ReserveRelease is associated with. This field is only populated if a ReserveRelease is created by a ReservePlan disable operation, or from a scheduled ReservedHold expiry.
88 """
89 source_transaction: Optional[SourceTransaction]
90 _inner_class_types = {"source_transaction": SourceTransaction}