Sha256: bdadd3bf6df8384c36a4d7d3e99ff41b2e7f39152505bc504137fc7ff0c56635

Contents?: true

Size: 1.25 KB

Versions: 53

Compression:

Stored size: 1.25 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
    include Stripe::APIOperations::Save

    OBJECT_NAME = "capability"
    def self.object_name
      "capability"
    end

    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

53 entries across 53 versions & 1 rubygems

Version Path
stripe-13.4.1 lib/stripe/resources/capability.rb
stripe-13.4.0 lib/stripe/resources/capability.rb
stripe-13.3.1 lib/stripe/resources/capability.rb
stripe-13.3.0 lib/stripe/resources/capability.rb
stripe-13.3.0.pre.beta.1 lib/stripe/resources/capability.rb
stripe-13.2.0 lib/stripe/resources/capability.rb
stripe-13.1.2 lib/stripe/resources/capability.rb
stripe-13.2.0.pre.beta.3 lib/stripe/resources/capability.rb
stripe-13.2.0.pre.beta.2 lib/stripe/resources/capability.rb
stripe-13.1.1 lib/stripe/resources/capability.rb
stripe-13.2.0.pre.beta.1 lib/stripe/resources/capability.rb
stripe-13.1.0 lib/stripe/resources/capability.rb
stripe-13.0.2 lib/stripe/resources/capability.rb
stripe-13.1.0.pre.beta.3 lib/stripe/resources/capability.rb
stripe-13.0.1 lib/stripe/resources/capability.rb
stripe-13.1.0.pre.beta.2 lib/stripe/resources/capability.rb
stripe-13.0.0 lib/stripe/resources/capability.rb
stripe-12.7.0.pre.beta.2 lib/stripe/resources/capability.rb
stripe-12.7.0.pre.beta.1 lib/stripe/resources/capability.rb
stripe-12.6.0 lib/stripe/resources/capability.rb