Delete single contact
198467
def delete_contact(self, contact_id):
        
        url = self.CONTACTS_ID_URL % contact_id

        connection = Connection(self.token)
        connection.set_url(self.production, url)

        return connection.delete_request()
44522
public static function remove_contact(int $userid, int $contactid) {
        global $DB;

        if ($contact = self::get_contact($userid, $contactid)) {
            $DB->delete_records('message_contacts', ['id' => $contact->id]);

            $event = \core\event\message_contact_removed::create(array(
                'objectid' => $contact->id,
                'userid' => $userid,
                'relateduserid' => $contactid,
                'context' => \context_user::instance($userid)
            ));
            $event->add_record_snapshot('message_contacts', $contact);
            $event->trigger();
        }
    }
852215
def delete_tenant(self, tenant_id):
        
        self._delete(self._get_single_id_url(self._get_tenants_url(), tenant_id))
22861
def cancel(self, contacts):
        
        self.is_in_effect = False
        contact = contacts[self.ref]
        contact.raise_cancel_downtime_log_entry()
        self.can_be_deleted = True
1207030
public function removeAddressRelation($contact, $contactAddress)
    {
        if (!$contact || !$contactAddress) {
            throw new \Exception('Contact and ContactAddress cannot be null');
        }

        // reload address to get all data (including relational data)
        /** @var Address $address */
        $address = $contactAddress->getAddress();
        $address = $this->em->getRepository(
            'SuluContactBundle:Address'
        )->findById($address->getId());

        $isMain = $contactAddress->getMain();

        // remove relation
        $contact->removeContactAddress($contactAddress);
        $address->removeContactAddress($contactAddress);

        // if was main, set a new one
        if ($isMain) {
            $this->setMainForCollection($contact->getContactAddresses());
        }

        // delete address if it has no more relations
        if (!$address->hasRelations()) {
            $this->em->remove($address);
        }

        $this->em->remove($contactAddress);
    }
690629
def delete(self):
        
        if not self.object_id:
            raise RuntimeError('Attempting to delete an unsaved Contact')

        url = self.build_url(
            self._endpoints.get('root_contact').format(id=self.object_id))

        response = self.con.delete(url)

        return bool(response)
1215843
def unlinkUser(self, delete=False):
        
        userid = self.getUsername()
        user = self.getUser()
        if user:
            logger.debug("Unlinking User '{}' from Contact '{}'".format(
                userid, self.Title()))

            # Unlink the User
            if not self._unlinkUser():
                return False

            # Also remove the Plone User (caution)
            if delete:
                logger.debug("Removing Plone User '{}'".format(userid))
                api.user.delete(username=userid)

            return True
        return False
398405
function ContactsGroupsPermissionsDelete(options, groupId, username) {
    ActionAbstract.call(this, options);
    this._groupId = groupId;
    this._username = username;
}
566981
function remove(req, res, next) {
  var params = {
    appId: req.params.id
  };

  forms.deleteAppReferences(req.connectionOptions, params, formsResultHandlers(constants.resultTypes.formProjects, req, next));
}
1209016
function _delete(name) {
    observers[name].unobserve();
    delete observers[name];
    delete u        [name];
    delete shadow   [name];
  }
375678
public function removeContact($contact_id = null, $id = null)
    {
        if (is_null($contact_id) || is_null($id)) {
            throw new InvalidArgumentException('Null Contact or Group id.');
        }
        $ResourceName = $this->resourceName . ($id ? '/' . $id . '/contacts/' . $contact_id : null);

        list($responseStatus, , $responseBody) = $this->HttpClient->performHttpRequest(
            Common\HttpClient::REQUEST_DELETE,
            $ResourceName
        );
        if ($responseStatus !== Common\HttpClient::HTTP_NO_CONTENT) {
            return json_decode($responseBody);
        }
    }
1149041
function remove(connections, params, cb) {
  var failed = validate(params).has(CONSTANTS.DATA_TARGET_ID);

  if (failed) {
    return cb(buildErrorResponse({error: new Error("An ID Parameter Is Required To Remove A Data Target"), code: ERROR_CODES.FH_FORMS_INVALID_PARAMETERS}));
  }

  if (!misc.checkId(params._id)) {
    return cb(buildErrorResponse({error: new Error("Invalid ID Paramter"), code: ERROR_CODES.FH_FORMS_INVALID_PARAMETERS}));
  }

  async.waterfall([
    function findAssociatedForms(cb) {
      checkFormsUsingDataTarget(connections, params, cb);
    },
    function verifyNoFormsAssociated(updatedDataTarget, cb) {
      //If there is more than one form using this data target, then do not delete it.

      if (updatedDataTarget.forms.length > 0) {
        return cb(buildErrorResponse({
          error: new Error("Forms Are Associated With This Data Target. Please Disassociate Forms From This Data Target Before Deleting."),
          code: ERROR_CODES.FH_FORMS_UNEXPECTED_ERROR
        }));
      }

      return cb(undefined, updatedDataTarget);
    },
    function processResponse(updatedDataTarget, cb) {
      //Removing The Data Target
      var DataTarget = models.get(connections.mongooseConnection, models.MODELNAMES.DATA_TARGET);

      DataTarget.remove({_id: updatedDataTarget._id}, function(err) {
        if (err) {
          return cb(buildErrorResponse({
            error: err,
            userDetail: "Unexpected Error When Removing A Data Target",
            code: ERROR_CODES.FH_FORMS_UNEXPECTED_ERROR
          }));
        }

        //Data Target Removed Successfully
        return cb();
      });
    }
  ], cb);

}
740979
def delete(ids, force):
    """"""
    records_deprecation_warning()

    from .api import Record
    for id_ in ids:
        record = Record.get_record(id_, with_deleted=force)
        record.delete(force=force)
    db.session.commit()
639110
def delete_one(self, *args, **kwargs):
        
        result = self.collection.delete_one(*args, **kwargs)
        return result.raw_result
697614
function(){
        this.randX=65535;
        while(this.joints!==null){
            this.removeJoint(this.joints);
        }
        while(this.contacts!==null){
            this.removeContact(this.contacts);
        }
        while(this.rigidBodies!==null){
            this.removeRigidBody(this.rigidBodies);
        }
        OIMO.nextID=0;
    }
718077
function ContactsGroupsAssignmentsDelete(options, contactId, groupId) {
    ActionAbstract.call(this, options);
    this._groupId = groupId;
    this._contactId = contactId;
}
510708
function cleanup() {
                start = target = null;
                swiping = false;

                self.off(moveEvent, move);
            }