lib/intercom/api_operations/delete.rb in intercom-2.5.4 vs lib/intercom/api_operations/delete.rb in intercom-3.0.0b1
- old
+ new
@@ -1,15 +1,13 @@
require 'intercom/traits/api_resource'
module Intercom
module ApiOperations
module Delete
-
- def delete
- collection_name = Utils.resource_class_to_collection_name(self.class)
- Intercom.delete("/#{collection_name}/#{id}", {})
- self
+ def delete(object)
+ collection_name = Utils.resource_class_to_collection_name(collection_class)
+ @client.delete("/#{collection_name}/#{object.id}", {})
+ object
end
-
end
end
end