Class: Stripe::Reserve::Release

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/stripe/resources/reserve/release.rb

Overview

ReserveReleases represent the release of funds from a ReserveHold.

Defined Under Namespace

Classes: SourceTransaction

Constant Summary collapse

OBJECT_NAME =
"reserve.release"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods included from APIOperations::List

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

included

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

#amountObject (readonly)

Amount released. A positive integer representing how much is released in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal).



32
33
34
# File 'lib/stripe/resources/reserve/release.rb', line 32

def amount
  @amount
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



34
35
36
# File 'lib/stripe/resources/reserve/release.rb', line 34

def created
  @created
end

#created_byObject (readonly)

Indicates which party created this ReserveRelease.



36
37
38
# File 'lib/stripe/resources/reserve/release.rb', line 36

def created_by
  @created_by
end

#currencyObject (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/release.rb', line 38

def currency
  @currency
end

#idObject (readonly)

Unique identifier for the object.



40
41
42
# File 'lib/stripe/resources/reserve/release.rb', line 40

def id
  @id
end

#livemodeObject (readonly)

If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.



42
43
44
# File 'lib/stripe/resources/reserve/release.rb', line 42

def livemode
  @livemode
end

#metadataObject (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.



44
45
46
# File 'lib/stripe/resources/reserve/release.rb', line 44

def 
  @metadata
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



46
47
48
# File 'lib/stripe/resources/reserve/release.rb', line 46

def object
  @object
end

#reasonObject (readonly)

The reason for the ReserveRelease, indicating why the funds were released.



48
49
50
# File 'lib/stripe/resources/reserve/release.rb', line 48

def reason
  @reason
end

#released_atObject (readonly)

The release timestamp of the funds.



50
51
52
# File 'lib/stripe/resources/reserve/release.rb', line 50

def released_at
  @released_at
end

#reserve_holdObject (readonly)

The ReserveHold this ReserveRelease is associated with.



52
53
54
# File 'lib/stripe/resources/reserve/release.rb', line 52

def reserve_hold
  @reserve_hold
end

#reserve_planObject (readonly)

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.



54
55
56
# File 'lib/stripe/resources/reserve/release.rb', line 54

def reserve_plan
  @reserve_plan
end

#source_transactionObject (readonly)

Attribute for field source_transaction



56
57
58
# File 'lib/stripe/resources/reserve/release.rb', line 56

def source_transaction
  @source_transaction
end

Class Method Details

.field_remappingsObject



72
73
74
# File 'lib/stripe/resources/reserve/release.rb', line 72

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



68
69
70
# File 'lib/stripe/resources/reserve/release.rb', line 68

def self.inner_class_types
  @inner_class_types = { source_transaction: SourceTransaction }
end

.list(params = {}, opts = {}) ⇒ Object

Returns a list of ReserveReleases previously created. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.



59
60
61
62
63
64
65
66
# File 'lib/stripe/resources/reserve/release.rb', line 59

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/reserve/releases",
    params: params,
    opts: opts
  )
end

.object_nameObject



11
12
13
# File 'lib/stripe/resources/reserve/release.rb', line 11

def self.object_name
  "reserve.release"
end