Delete a customer.
336853
def delete_customer(self, handle):
        """"""

        self.request(E.deleteCustomerRequest(E.handle(handle)))

        return True
163058
def delete(self, id):
        
        resp = self.client.accounts.delete(id)
        self.display(resp)
1281969
def delete_user(ctx, yes):
    """"""

    if ctx.obj['username'] is None:
        username = _ask("Please enter username:")
    else:
        username = ctx.obj['username']

    del_user = ctx.obj['db'].objectmodels['user'].find_one({'name': username})
    if yes or _ask('Confirm deletion', default=False, data_type='bool'):
        try:
            del_user.delete()
            log("Done")
        except AttributeError:
            log('User not found', lvl=warn)
    else:
        log("Cancelled")
683131
def delete_user(self, user):
        
        name = utils.get_name(user)
        self._user_manager.delete(name)
634287
def delete(self, customer_id, token_id, data={}, **kwargs):
        "
        url = "{}/{}/tokens/{}".format(self.base_url, customer_id, token_id)
        return self.delete_url(url, data, **kwargs)
1354745
public function delete()
    {
        if (!userHasPermission('admin:invoice:customer:delete')) {
            unauthorised();
        }

        // --------------------------------------------------------------------------

        $oUri           = Factory::service('Uri');
        $oCustomerModel = Factory::model('Customer', 'nails/module-invoice');
        $oCustomer      = $oCustomerModel->getById(
            $oUri->segment(5),
            ['expand' => ['invoices']]
        );
        if (!$oCustomer) {
            show404();
        }

        if ($oCustomer->invoices->count) {

            $sStatus  = 'error';
            $sMessage = 'Cannot delete a customer who has invoices.';

        } else {

            if ($oCustomerModel->delete($oCustomer->id)) {

                $sStatus  = 'success';
                $sMessage = 'Invoice deleted successfully!';

            } else {

                $sStatus  = 'error';
                $sMessage = 'Invoice failed to delete. ' . $this->oInvoiceModel->lastError();
            }
        }

        $oSession = Factory::service('Session', 'nails/module-auth');
        $oSession->setFlashData($sStatus, $sMessage);
        redirect('admin/invoice/customer/index');
    }
1120935
def delete(self, *args, **kwargs):
        
        super(UpdateCountsMixin, self).delete(*args, **kwargs)
        self.update_count()
1069031
def delete(self, receiver_id=None, event_id=None):
        """"""
        event = self._get_event(receiver_id, event_id)
        event.delete()
        db.session.commit()
        return make_response(event)
141339
def delete(self, user):
        """"""
        if user:
            can_delete = yield self.can_delete(user)
        else:
            can_delete = False

        if not can_delete:
            raise exceptions.Unauthorized('User may not delete the resource')

        try:
            parent = yield self.get_parent()
        except couch.NotFound:
            msg = '{}_id {} not found'.format(
                self.parent_resource.resource_type,
                self.parent_id)
            raise exceptions.ValidationError(msg)

        yield parent.delete_subresource(self)
1073341
public function deleteCustomer($customerId)
    {
        $requestData = new Delete\RequestData($customerId);
        $request = new Delete\Request($requestData);

        return $this->sendRequest($request, Delete\ApiResponse::class);
    }
676802
def purge(self, connection):
        """"""
        self._checkpid()
        if connection.pid == self.pid:
            idx = connection._pattern_idx
            if connection in self._in_use_connections[idx]:
                self._in_use_connections[idx].remove(connection)
            else:
                self._available_connections[idx].remove(connection)
            connection.disconnect()
1024179
def delete(self, name):
    '''
    
    '''
    conn = self._client.connect()
    conn.execute( self._table.delete().where(self._table.c.name==name) )
402542
def delete(self, service_name, *ids, **kwargs):
        """"""
        return self._send(requests.delete, service_name, id=ids, **kwargs)
538419
def remove(self):
		

		# First, wipe default source on all customers that use this card.
		Customer.objects.filter(default_source=self.id).update(default_source=None)

		try:
			self._api_delete()
		except InvalidRequestError as exc:
			if "No such source:" in str(exc) or "No such customer:" in str(exc):
				# The exception was thrown because the stripe customer or card was already
				# deleted on the stripe side, ignore the exception
				pass
			else:
				# The exception was raised for another reason, re-raise it
				raise

		self.delete()
1253528
@RequestMapping(path = "/{customerId}", method = RequestMethod.DELETE)
    public ResponseEntity removeCustomer(@PathVariable("customerId") Long customerId){
        boolean succeed = customerService.removeCustomer(customerId);
        if(succeed){
            return new ResponseEntity(HttpStatus.OK);
        }else{
            return new ResponseEntity(HttpStatus.NOT_FOUND);
        }
    }
431718
def unlink(self):
        
        s_line_obj = self.env['sale.order.line']
        for line in self:
            if line.service_line_id:
                sale_unlink_obj = s_line_obj.browse([line.service_line_id.id])
                sale_unlink_obj.unlink()
        return super(HotelServiceLine, self).unlink()
879676
def remove_user(user):
    """"""
    def processor(action, argument):
        ActionUsers.query_by_action(action, argument=argument).filter(
            ActionUsers.user_id == user.id
        ).delete(synchronize_session=False)
    return processor