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)
Constant Summary collapse
- OBJECT_NAME =
"capability"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary
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
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
25 26 27 28 29 30 |
# File 'lib/stripe/resources/capability.rb', line 25 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
32 33 34 35 36 37 |
# File 'lib/stripe/resources/capability.rb', line 32 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
16 17 18 19 20 21 22 23 |
# File 'lib/stripe/resources/capability.rb', line 16 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 |