Debian Codegraph @

stripe/reserve/_hold.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._charge import Charge
10 from stripe.reserve._plan import Plan
11
12
13 class Hold(StripeObject):
14 """
15 ReserveHolds are used to place a temporary ReserveHold on a merchant's funds.
16 """
17
18 OBJECT_NAME: ClassVar[Literal["reserve.hold"]] = "reserve.hold"
19
20 class ReleaseSchedule(StripeObject):
21 release_after: Optional[int]
22 """
23 The time after which the ReserveHold is requested to be released.
24 """
25 scheduled_release: Optional[int]
26 """
27 The time at which the ReserveHold is scheduled to be released, automatically set to midnight UTC of the day after `release_after`.
28 """
29
30 amount: int
31 """
32 Amount reserved. A positive integer representing how much is reserved in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
33 """
34 amount_releasable: Optional[int]
35 """
36 Amount in cents that can be released from this ReserveHold
37 """
38 created: int
39 """
40 Time at which the object was created. Measured in seconds since the Unix epoch.
41 """
42 created_by: Literal["application", "stripe"]
43 """
44 Indicates which party created this ReserveHold.
45 """
46 currency: str
47 """
48 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).
49 """
50 id: str
51 """
52 Unique identifier for the object.
53 """
54 is_releasable: Optional[bool]
55 """
56 Whether there are any funds available to release on this ReserveHold. Note that if the ReserveHold is in the process of being released, this could be false, even though the funds haven't been fully released yet.
57 """
58 livemode: bool
59 """
60 Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
61 """
62 metadata: Optional[Dict[str, str]]
63 """
64 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.
65 """
66 object: Literal["reserve.hold"]
67 """
68 String representing the object's type. Objects of the same type share the same value.
69 """
70 reason: Literal["charge", "standalone"]
71 """
72 The reason for the ReserveHold.
73 """
74 release_schedule: ReleaseSchedule
75 reserve_plan: Optional[ExpandableField["Plan"]]
76 """
77 The ReservePlan which produced this ReserveHold (i.e., resplan_123)
78 """
79 source_charge: Optional[ExpandableField["Charge"]]
80 """
81 The Charge which funded this ReserveHold (e.g., ch_123)
82 """
83 source_type: Literal["bank_account", "card", "fpx"]
84 """
85 Which source balance type this ReserveHold reserves funds from. One of `bank_account`, `card`, or `fpx`.
86 """
87 _inner_class_types = {"release_schedule": ReleaseSchedule}