https://developer.zendesk.com/rest_api/docs/core/organization_memberships#delete-membership
498179
def organization_membership_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/organization_memberships/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
99989
def remove_organisation_from_all(cls, organisation_id):
        """"""
        users = yield views.organisation_members.get(key=organisation_id,
                                                     include_docs=True)
        users = [x['doc'] for x in users['rows']]
        for user in users:
            user['organisations'][organisation_id]['state'] = State.deactivated.name

        db = cls.db_client()
        yield db.save_docs(users)
18730
def org_remove_member(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/removeMember' % object_id, input_params, always_retry=always_retry, **kwargs)
356000
def _delete_membership(self, pipeline=None):
        
        Set(self._key['all'], pipeline=pipeline).remove(self.id)
1250102
def remove(self, *members):
        
        if self.serialized:
            members = list(map(self._dumps, members))
        return self._client.srem(self.key_prefix, *members)
983678
def dismiss(self, member_ids):
        
        url = 'http://www.shanbay.com/api/v1/team/member/'
        data = {
            'action': 'dispel',
        }
        if isinstance(member_ids, (list, tuple)):
            data['ids'] = ','.join(map(str, member_ids))
        else:
            data['ids'] = member_ids
        r = self.request(url, 'put', data=data)
        try:
            return r.json()['msg'] == "SUCCESS"
        except Exception as e:
            logger.exception(e)
            return False
325305
def del_membership(self, user, role):
        
        if not self.has_membership(user, role):
            return True
        targetRecord = AuthMembership.objects(creator=self.client, user=user).first()
        if not targetRecord:
            return True
        for group in targetRecord.groups:
            if group.role==role:
                targetRecord.groups.remove(group)
        targetRecord.save()
        return True
1311859
def remove(self, *members):
        
        members = list(map(self._dumps, members))
        self._client.zrem(self.key_prefix, *members)
432592
def revoke_membership(self, username):
        
        url = self._build_url('memberships', username, base_url=self._api)
        return self._boolean(self._delete(url), 204, 404)
1098758
def delete(self):
        """"""
        pipeline = self.db.pipeline()
        self._delete_from_indices(pipeline)
        self._delete_membership(pipeline)
        pipeline.delete(self.key())
        pipeline.execute()
462548
@DELETE
  @Path("{id}")
  @RolesAllowed({"ROLE_ADMIN"})
  public Response delete(@PathParam("id") Long id) {
    checkNotNull(id);
    userService.deleteById(id);
    return Response.noContent().build();
  }
88440
def delete(method, hmc, uri, uri_parms, logon_required):
        """"""
        try:
            resource = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        resource.manager.remove(resource.oid)
476237
def remove_member(self, user, api=None):
        
        api = api or self._API
        AutomationMember.remove(automation=self.id, user=user, api=api)
646757
def delete_resource(self, session, data, api_type, obj_id):
        
        resource = self._fetch_resource(session, api_type, obj_id,
                                        Permissions.VIEW)
        self._check_instance_relationships_for_delete(resource)

        session.delete(resource)
        session.commit()

        response = JSONAPIResponse()
        response.status_code = 204

        return response
663927
def organization_memberships(self, user):
        
        return self._query_zendesk(self.endpoint.organization_memberships, 'organization_membership', id=user)
1301633
def _api_delete(path, data, server=None):
    '''
    
    '''
    server = _get_server(server)
    response = requests.delete(
            url=_get_url(server['ssl'], server['url'], server['port'], path),
            auth=_get_auth(server['user'], server['password']),
            headers=_get_headers(),
            params=data,
            verify=False
    )
    return _api_response(response)
763474
function deleteOrganizationAttachedPolicies (params, cb) {
      let promise = null
      if (typeof cb !== 'function') [promise, cb] = asyncify()

      const { id } = params
      const tasks = [
        (job, next) => {
          Joi.validate({ id }, validationRules.deleteOrganizationPolicies, (err) => {
            if (err) return next(Boom.badRequest(err))
            next()
          })
        },
        (job, next) => {
          job.id = id

          next()
        },
        checkOrg,
        clearOrganizationAttachedPolicies
      ]

      db.withTransaction(tasks, (err, res) => {
        if (err) return cb(err)

        organizationOps.readById(id, cb)
      })

      return promise
    }