Class: Stripe::Capability
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Capability
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/capability.rb
Overview
This is an object representing a capability for a Stripe account.
Related guide: [Account capabilities](stripe.com/docs/connect/account-capabilities)
Defined Under Namespace
Classes: FutureRequirements, Requirements
Constant Summary collapse
- OBJECT_NAME =
"capability"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
The account for which the capability enables functionality.
-
#future_requirements ⇒ Object
readonly
Attribute for field future_requirements.
-
#id ⇒ Object
readonly
The identifier for the capability.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#requested ⇒ Object
readonly
Whether the capability has been requested.
-
#requested_at ⇒ Object
readonly
Time at which the capability was requested.
-
#requirements ⇒ Object
readonly
Attribute for field requirements.
-
#status ⇒ Object
readonly
The status of the capability.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .object_name ⇒ Object
- .retrieve(_id, _opts = {}) ⇒ Object
- .update(_id, _params = nil, _opts = nil) ⇒ Object
Instance Method Summary collapse
Methods included from APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #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
#account ⇒ Object (readonly)
The account for which the capability enables functionality.
84 85 86 |
# File 'lib/stripe/resources/capability.rb', line 84 def account @account end |
#future_requirements ⇒ Object (readonly)
Attribute for field future_requirements
86 87 88 |
# File 'lib/stripe/resources/capability.rb', line 86 def future_requirements @future_requirements end |
#id ⇒ Object (readonly)
The identifier for the capability.
88 89 90 |
# File 'lib/stripe/resources/capability.rb', line 88 def id @id end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
90 91 92 |
# File 'lib/stripe/resources/capability.rb', line 90 def object @object end |
#requested ⇒ Object (readonly)
Whether the capability has been requested.
92 93 94 |
# File 'lib/stripe/resources/capability.rb', line 92 def requested @requested end |
#requested_at ⇒ Object (readonly)
Time at which the capability was requested. Measured in seconds since the Unix epoch.
94 95 96 |
# File 'lib/stripe/resources/capability.rb', line 94 def requested_at @requested_at end |
#requirements ⇒ Object (readonly)
Attribute for field requirements
96 97 98 |
# File 'lib/stripe/resources/capability.rb', line 96 def requirements @requirements end |
#status ⇒ Object (readonly)
The status of the capability.
98 99 100 |
# File 'lib/stripe/resources/capability.rb', line 98 def status @status end |
Class Method Details
.object_name ⇒ Object
12 13 14 |
# File 'lib/stripe/resources/capability.rb', line 12 def self.object_name "capability" end |
.retrieve(_id, _opts = {}) ⇒ Object
109 110 111 112 113 114 |
# File 'lib/stripe/resources/capability.rb', line 109 def self.retrieve(_id, _opts = {}) raise NotImplementedError, "Capabilities cannot be retrieve without an account ID. " \ "Retrieve a capability using Account.retrieve_capability(" \ "'account_id', 'capability_id')`" end |
.update(_id, _params = nil, _opts = nil) ⇒ Object
116 117 118 119 120 121 |
# File 'lib/stripe/resources/capability.rb', line 116 def self.update(_id, _params = nil, _opts = nil) raise NotImplementedError, "Capabilities cannot be updated without an account ID. Update a " \ "capability using `Account.update_capability('account_id', " \ "'capability_id', update_params)`" end |
Instance Method Details
#resource_url ⇒ Object
100 101 102 103 104 105 106 107 |
# File 'lib/stripe/resources/capability.rb', line 100 def resource_url if !respond_to?(:account) || account.nil? raise NotImplementedError, "Capabilities cannot be accessed without an account ID." end "#{Account.resource_url}/#{CGI.escape(account)}/capabilities" \ "/#{CGI.escape(id)}" end |