Class: Stripe::Reserve::Hold
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Reserve::Hold
- Extended by:
- APIOperations::List
- Defined in:
- lib/stripe/resources/reserve/hold.rb
Overview
ReserveHolds are used to place a temporary ReserveHold on a merchant’s funds.
Defined Under Namespace
Classes: ReleaseSchedule
Constant Summary collapse
- OBJECT_NAME =
"reserve.hold"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Amount reserved.
-
#amount_releasable ⇒ Object
readonly
Amount in cents that can be released from this ReserveHold.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#created_by ⇒ Object
readonly
Indicates which party created this ReserveHold.
-
#currency ⇒ Object
readonly
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#is_releasable ⇒ Object
readonly
Whether there are any funds available to release on this ReserveHold.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is ‘true`.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#reason ⇒ Object
readonly
The reason for the ReserveHold.
-
#release_schedule ⇒ Object
readonly
Attribute for field release_schedule.
-
#reserve_plan ⇒ Object
readonly
The ReservePlan which produced this ReserveHold (i.e., resplan_123).
-
#source_charge ⇒ Object
readonly
The Charge which funded this ReserveHold (e.g., ch_123).
-
#source_type ⇒ Object
readonly
Which source balance type this ReserveHold reserves funds from.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of ReserveHolds previously created.
- .object_name ⇒ Object
Methods included from APIOperations::List
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#amount ⇒ Object (readonly)
Amount reserved. A positive integer representing how much is reserved in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal).
30 31 32 |
# File 'lib/stripe/resources/reserve/hold.rb', line 30 def amount @amount end |
#amount_releasable ⇒ Object (readonly)
Amount in cents that can be released from this ReserveHold
32 33 34 |
# File 'lib/stripe/resources/reserve/hold.rb', line 32 def amount_releasable @amount_releasable end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
34 35 36 |
# File 'lib/stripe/resources/reserve/hold.rb', line 34 def created @created end |
#created_by ⇒ Object (readonly)
Indicates which party created this ReserveHold.
36 37 38 |
# File 'lib/stripe/resources/reserve/hold.rb', line 36 def created_by @created_by end |
#currency ⇒ Object (readonly)
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
38 39 40 |
# File 'lib/stripe/resources/reserve/hold.rb', line 38 def currency @currency end |
#id ⇒ Object (readonly)
Unique identifier for the object.
40 41 42 |
# File 'lib/stripe/resources/reserve/hold.rb', line 40 def id @id end |
#is_releasable ⇒ Object (readonly)
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.
42 43 44 |
# File 'lib/stripe/resources/reserve/hold.rb', line 42 def is_releasable @is_releasable end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.
44 45 46 |
# File 'lib/stripe/resources/reserve/hold.rb', line 44 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](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.
46 47 48 |
# File 'lib/stripe/resources/reserve/hold.rb', line 46 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
48 49 50 |
# File 'lib/stripe/resources/reserve/hold.rb', line 48 def object @object end |
#reason ⇒ Object (readonly)
The reason for the ReserveHold.
50 51 52 |
# File 'lib/stripe/resources/reserve/hold.rb', line 50 def reason @reason end |
#release_schedule ⇒ Object (readonly)
Attribute for field release_schedule
52 53 54 |
# File 'lib/stripe/resources/reserve/hold.rb', line 52 def release_schedule @release_schedule end |
#reserve_plan ⇒ Object (readonly)
The ReservePlan which produced this ReserveHold (i.e., resplan_123)
54 55 56 |
# File 'lib/stripe/resources/reserve/hold.rb', line 54 def reserve_plan @reserve_plan end |
#source_charge ⇒ Object (readonly)
The Charge which funded this ReserveHold (e.g., ch_123)
56 57 58 |
# File 'lib/stripe/resources/reserve/hold.rb', line 56 def source_charge @source_charge end |
#source_type ⇒ Object (readonly)
Which source balance type this ReserveHold reserves funds from. One of ‘bank_account`, `card`, or `fpx`.
58 59 60 |
# File 'lib/stripe/resources/reserve/hold.rb', line 58 def source_type @source_type end |
Class Method Details
.field_remappings ⇒ Object
69 70 71 |
# File 'lib/stripe/resources/reserve/hold.rb', line 69 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
65 66 67 |
# File 'lib/stripe/resources/reserve/hold.rb', line 65 def self.inner_class_types @inner_class_types = { release_schedule: ReleaseSchedule } end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
61 62 63 |
# File 'lib/stripe/resources/reserve/hold.rb', line 61 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/reserve/holds", params: params, opts: opts) end |
.object_name ⇒ Object
11 12 13 |
# File 'lib/stripe/resources/reserve/hold.rb', line 11 def self.object_name "reserve.hold" end |