Sha256: 6b7b9a4d1f61283d5642eb10fb557bdfb520b551a3a0f36cf88b7da2738aca74

Contents?: true

Size: 1.03 KB

Versions: 46

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

module Stripe
  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

46 entries across 46 versions & 1 rubygems

Version Path
stripe-5.37.0 lib/stripe/resources/capability.rb
stripe-5.36.0 lib/stripe/resources/capability.rb
stripe-5.35.0 lib/stripe/resources/capability.rb
stripe-5.34.0 lib/stripe/resources/capability.rb
stripe-5.33.0 lib/stripe/resources/capability.rb
stripe-5.32.1 lib/stripe/resources/capability.rb
stripe-5.32.0 lib/stripe/resources/capability.rb
stripe-5.31.0 lib/stripe/resources/capability.rb
stripe-5.30.0 lib/stripe/resources/capability.rb
stripe-5.29.1 lib/stripe/resources/capability.rb
stripe-5.29.0 lib/stripe/resources/capability.rb
stripe-5.28.0 lib/stripe/resources/capability.rb
stripe-5.27.0 lib/stripe/resources/capability.rb
stripe-5.26.0 lib/stripe/resources/capability.rb
stripe-5.25.0 lib/stripe/resources/capability.rb
stripe-5.24.0 lib/stripe/resources/capability.rb
stripe-5.23.1 lib/stripe/resources/capability.rb
stripe-5.23.0 lib/stripe/resources/capability.rb
stripe-5.22.0 lib/stripe/resources/capability.rb
stripe-5.21.0 lib/stripe/resources/capability.rb