Sha256: c2c81e90ac6fd8995d1ba25038d506fe03a6d4d4b7267aefbffd4cea8a098647

Contents?: true

Size: 445 Bytes

Versions: 4

Compression:

Stored size: 445 Bytes

Contents

module Paymill
  module Operations
    module Delete
      module ClassMethods
        # Deletes the given object
        #
        # @param [Integer] id The id of the object that gets deleted
        def delete(id)
          response = Paymill.request(:delete, "#{self.name.split("::").last.downcase}s/#{id}", {})
          true
        end
      end

      def self.included(base)
        base.extend(ClassMethods)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
paymill-0.5.1 lib/paymill/operations/delete.rb
paymill-0.5.0 lib/paymill/operations/delete.rb
paymill-0.4.0 lib/paymill/operations/delete.rb
paymill-0.3.0 lib/paymill/operations/delete.rb