Sha256: 224f5dbe5b38ab4bd79e78fceaa9658802254e258ba8d41e76a4760dbec5d35c

Contents?: true

Size: 1.24 KB

Versions: 26

Compression:

Stored size: 1.24 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  # This is an object representing a capability for a Stripe account.
  #
  # Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).
  class Capability < APIResource
    extend Stripe::APIOperations::List
    include Stripe::APIOperations::Save

    OBJECT_NAME = "capability"

    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

    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

    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
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
stripe-8.6.0.pre.beta.3 lib/stripe/resources/capability.rb
stripe-8.6.0.pre.beta.2 lib/stripe/resources/capability.rb
stripe-8.6.0.pre.beta.1 lib/stripe/resources/capability.rb
stripe-8.5.0 lib/stripe/resources/capability.rb
stripe-8.5.0.pre.beta.1 lib/stripe/resources/capability.rb
stripe-8.4.0 lib/stripe/resources/capability.rb
stripe-8.4.0.pre.beta.3 lib/stripe/resources/capability.rb
stripe-8.4.0.pre.beta.2 lib/stripe/resources/capability.rb
stripe-8.4.0.pre.beta.1 lib/stripe/resources/capability.rb
stripe-8.3.0 lib/stripe/resources/capability.rb
stripe-8.3.0.pre.beta.1 lib/stripe/resources/capability.rb
stripe-8.2.0 lib/stripe/resources/capability.rb
stripe-8.2.0.pre.beta.3 lib/stripe/resources/capability.rb
stripe-8.2.0.pre.beta.2 lib/stripe/resources/capability.rb
stripe-8.2.0.pre.beta.1 lib/stripe/resources/capability.rb
stripe-8.1.0 lib/stripe/resources/capability.rb
stripe-8.1.0.pre.beta.4 lib/stripe/resources/capability.rb
stripe-8.1.0.pre.beta.3 lib/stripe/resources/capability.rb
stripe-8.1.0.pre.beta.2 lib/stripe/resources/capability.rb
stripe-8.1.0.pre.beta.1 lib/stripe/resources/capability.rb