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, 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](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#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`.
-
#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.
-
#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, 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
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
43 44 45 |
# File 'lib/stripe/resources/reserve/plan.rb', line 43 def created @created end |
#created_by ⇒ Object (readonly)
Indicates which party created this ReservePlan.
45 46 47 |
# File 'lib/stripe/resources/reserve/plan.rb', line 45 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). An unset currency indicates that the plan applies to all currencies.
47 48 49 |
# File 'lib/stripe/resources/reserve/plan.rb', line 47 def currency @currency end |
#disabled_at ⇒ Object (readonly)
Time at which the ReservePlan was disabled.
49 50 51 |
# File 'lib/stripe/resources/reserve/plan.rb', line 49 def disabled_at @disabled_at end |
#fixed_release ⇒ Object (readonly)
Attribute for field fixed_release
51 52 53 |
# File 'lib/stripe/resources/reserve/plan.rb', line 51 def fixed_release @fixed_release end |
#id ⇒ Object (readonly)
Unique identifier for the object.
53 54 55 |
# File 'lib/stripe/resources/reserve/plan.rb', line 53 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`.
55 56 57 |
# File 'lib/stripe/resources/reserve/plan.rb', line 55 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.
57 58 59 |
# File 'lib/stripe/resources/reserve/plan.rb', line 57 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
59 60 61 |
# File 'lib/stripe/resources/reserve/plan.rb', line 59 def object @object end |
#percent ⇒ Object (readonly)
The percent of each Charge to reserve.
61 62 63 |
# File 'lib/stripe/resources/reserve/plan.rb', line 61 def percent @percent end |
#rolling_release ⇒ Object (readonly)
Attribute for field rolling_release
63 64 65 |
# File 'lib/stripe/resources/reserve/plan.rb', line 63 def rolling_release @rolling_release end |
#status ⇒ Object (readonly)
The current status of the ReservePlan. The ReservePlan only affects charges if it is ‘active`.
65 66 67 |
# File 'lib/stripe/resources/reserve/plan.rb', line 65 def status @status end |
#type ⇒ Object (readonly)
The type of the ReservePlan.
67 68 69 |
# File 'lib/stripe/resources/reserve/plan.rb', line 67 def type @type end |
Class Method Details
.field_remappings ⇒ Object
73 74 75 |
# File 'lib/stripe/resources/reserve/plan.rb', line 73 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
69 70 71 |
# File 'lib/stripe/resources/reserve/plan.rb', line 69 def self.inner_class_types @inner_class_types = { fixed_release: FixedRelease, 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 |