module Restforce::Concerns::API

def destroy!(sobject, id)

Raises an exception if an error is returned from Salesforce.
Returns true of the sobject was successfully deleted.

client.destroy('Account', '0016000000MRatd')
# Delete the Account with Id '0016000000MRatd'

Examples

id - The Salesforce ID of the record.
sobject - String name of the sobject.

Public: Delete a record.
def destroy!(sobject, id)
  api_delete "sobjects/#{sobject}/#{id}"
  true
end