Class: Stripe::Reserve::Plan
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Reserve::Plan
- Defined in:
- lib/stripe/resources/reserve/plan.rb
Overview
ReservePlans are used to automatically place holds on a merchant's funds until the plan expires. It takes a portion of each incoming Charge (including those resulting from a Transfer from a platform account).
Defined Under Namespace
Classes: FixedRelease, ManualRelease, RollingRelease
Constant Summary collapse
- OBJECT_NAME =
"reserve.plan"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#created_by ⇒ Object
readonly
Indicates which party created this ReservePlan.
-
#currency ⇒ Object
readonly
Three-letter ISO currency code, in lowercase.
-
#destination ⇒ Object
readonly
The balance destination to which the reserved funds are sent.
-
#disabled_at ⇒ Object
readonly
Time at which the ReservePlan was disabled.
-
#fixed_release ⇒ Object
readonly
Attribute for field fixed_release.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#manual_release ⇒ Object
readonly
Attribute for field manual_release.
-
#metadata ⇒ Object
readonly
Set of key-value pairs that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#percent ⇒ Object
readonly
The percent of each Charge to reserve.
-
#rolling_release ⇒ Object
readonly
Attribute for field rolling_release.
-
#status ⇒ Object
readonly
The current status of the ReservePlan.
-
#type ⇒ Object
readonly
The type of the ReservePlan.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
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, #_get_union_variant_class, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, inner_class_union_variant_types, #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
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
53 54 55 |
# File 'lib/stripe/resources/reserve/plan.rb', line 53 def created @created end |
#created_by ⇒ Object (readonly)
Indicates which party created this ReservePlan.
55 56 57 |
# File 'lib/stripe/resources/reserve/plan.rb', line 55 def created_by @created_by end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Must be a supported currency. An unset currency indicates that the plan applies to all currencies.
57 58 59 |
# File 'lib/stripe/resources/reserve/plan.rb', line 57 def currency @currency end |
#destination ⇒ Object (readonly)
The balance destination to which the reserved funds are sent.
59 60 61 |
# File 'lib/stripe/resources/reserve/plan.rb', line 59 def destination @destination end |
#disabled_at ⇒ Object (readonly)
Time at which the ReservePlan was disabled.
61 62 63 |
# File 'lib/stripe/resources/reserve/plan.rb', line 61 def disabled_at @disabled_at end |
#fixed_release ⇒ Object (readonly)
Attribute for field fixed_release
63 64 65 |
# File 'lib/stripe/resources/reserve/plan.rb', line 63 def fixed_release @fixed_release end |
#id ⇒ Object (readonly)
Unique identifier for the object.
65 66 67 |
# File 'lib/stripe/resources/reserve/plan.rb', line 65 def id @id 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.
67 68 69 |
# File 'lib/stripe/resources/reserve/plan.rb', line 67 def livemode @livemode end |
#manual_release ⇒ Object (readonly)
Attribute for field manual_release
69 70 71 |
# File 'lib/stripe/resources/reserve/plan.rb', line 69 def manual_release @manual_release end |
#metadata ⇒ Object (readonly)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
71 72 73 |
# File 'lib/stripe/resources/reserve/plan.rb', line 71 def @metadata end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
73 74 75 |
# File 'lib/stripe/resources/reserve/plan.rb', line 73 def object @object end |
#percent ⇒ Object (readonly)
The percent of each Charge to reserve.
75 76 77 |
# File 'lib/stripe/resources/reserve/plan.rb', line 75 def percent @percent end |
#rolling_release ⇒ Object (readonly)
Attribute for field rolling_release
77 78 79 |
# File 'lib/stripe/resources/reserve/plan.rb', line 77 def rolling_release @rolling_release end |
#status ⇒ Object (readonly)
The current status of the ReservePlan. The ReservePlan only affects charges if it is active.
79 80 81 |
# File 'lib/stripe/resources/reserve/plan.rb', line 79 def status @status end |
#type ⇒ Object (readonly)
The type of the ReservePlan.
81 82 83 |
# File 'lib/stripe/resources/reserve/plan.rb', line 81 def type @type end |
Class Method Details
.field_remappings ⇒ Object
91 92 93 |
# File 'lib/stripe/resources/reserve/plan.rb', line 91 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
83 84 85 86 87 88 89 |
# File 'lib/stripe/resources/reserve/plan.rb', line 83 def self.inner_class_types @inner_class_types = { fixed_release: FixedRelease, manual_release: ManualRelease, rolling_release: RollingRelease, } end |
.object_name ⇒ Object
9 10 11 |
# File 'lib/stripe/resources/reserve/plan.rb', line 9 def self.object_name "reserve.plan" end |