Sha256: 57be124e69e50efe67451aaf3ed017678c09fa8c7282a2b455e564aad25c4e89

Contents?: true

Size: 340 Bytes

Versions: 15

Compression:

Stored size: 340 Bytes

Contents

require 'intercom/utils'

module Intercom
  module ApiOperations
    module Archive
      def archive(object)
        collection_name = Utils.resource_class_to_collection_name(collection_class)
        @client.delete("/#{collection_name}/#{object.id}", {})
        object
      end

      alias_method 'delete', 'archive'
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
intercom-3.9.5 lib/intercom/api_operations/archive.rb
intercom-3.9.4 lib/intercom/api_operations/archive.rb
intercom-3.9.3 lib/intercom/api_operations/archive.rb
intercom-3.9.2 lib/intercom/api_operations/archive.rb
intercom-3.9.0 lib/intercom/api_operations/archive.rb
intercom-3.8.1 lib/intercom/api_operations/archive.rb
intercom-3.8.0 lib/intercom/api_operations/archive.rb
intercom-3.7.7 lib/intercom/api_operations/archive.rb
intercom-3.7.6 lib/intercom/api_operations/archive.rb
intercom-3.7.5 lib/intercom/api_operations/archive.rb
intercom-3.7.4 lib/intercom/api_operations/archive.rb
intercom-3.7.3 lib/intercom/api_operations/archive.rb
intercom-3.7.2 lib/intercom/api_operations/archive.rb
intercom-3.7.1 lib/intercom/api_operations/archive.rb
intercom-3.7.0 lib/intercom/api_operations/archive.rb