Class: Stripe::Reserve::Plan

Inherits:
APIResource show all
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

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

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

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

#createdObject (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_byObject (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

#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). 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_atObject (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_releaseObject (readonly)

Attribute for field fixed_release



51
52
53
# File 'lib/stripe/resources/reserve/plan.rb', line 51

def fixed_release
  @fixed_release
end

#idObject (readonly)

Unique identifier for the object.



53
54
55
# File 'lib/stripe/resources/reserve/plan.rb', line 53

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`.



55
56
57
# File 'lib/stripe/resources/reserve/plan.rb', line 55

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.



57
58
59
# File 'lib/stripe/resources/reserve/plan.rb', line 57

def 
  @metadata
end

#objectObject (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

#percentObject (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_releaseObject (readonly)

Attribute for field rolling_release



63
64
65
# File 'lib/stripe/resources/reserve/plan.rb', line 63

def rolling_release
  @rolling_release
end

#statusObject (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

#typeObject (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_remappingsObject



73
74
75
# File 'lib/stripe/resources/reserve/plan.rb', line 73

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



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_nameObject



9
10
11
# File 'lib/stripe/resources/reserve/plan.rb', line 9

def self.object_name
  "reserve.plan"
end