Sha256: 5a5882165d4c914e4e8fc084212c7d50b7b17f50d40c10173e7b7b41e2e363fc

Contents?: true

Size: 833 Bytes

Versions: 7

Compression:

Stored size: 833 Bytes

Contents

require "ribose/actions/base"

module Ribose
  module Actions
    module Delete
      extend Ribose::Actions::Base

      def delete
        Ribose::Request.delete(resource_path, custom_option)
      end

      module ClassMethods
        # Delete a resource
        #
        # @param resource_id [String] Resource UUID
        # @param options [Hash] Query parameters as Hash
        #
        def delete(resource_id, options = {})
          new(resource_id: resource_id, **options).delete
        end

        # Aliases for delete
        #
        # There is another variation `cancel` that we have been using in
        # some resources inter exchangbly, so let's keep that legacy support
        # for now and we can decide about those in the future.
        #
        alias_method :cancel, :delete
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ribose-0.5.0 lib/ribose/actions/delete.rb
ribose-0.4.1 lib/ribose/actions/delete.rb
ribose-0.4.0 lib/ribose/actions/delete.rb
ribose-0.3.2 lib/ribose/actions/delete.rb
ribose-0.3.1 lib/ribose/actions/delete.rb
ribose-0.3.0 lib/ribose/actions/delete.rb
ribose-0.2.0 lib/ribose/actions/delete.rb