Deletes the bucket identified by its ID.

@param array $options
@return bool
556671
public function deleteBucket(array $options)
    {
        if (!isset($options['BucketId']) && isset($options['BucketName'])) {
            $options['BucketId'] = $this->getBucketIdFromName($options['BucketName']);
        }

        $this->client->request('POST', $this->apiUrl.'/b2_delete_bucket', [
            'headers' => [
                'Authorization' => $this->authToken
            ],
            'json' => [
                'accountId' => $this->accountId,
                'bucketId' => $options['BucketId']
            ]
        ]);

        return true;
    }
141439
public function setOptions(array $options)
    {
        if (null !== $this->logger) {
            $this->logger->startMethod('setOptions', ['options' => $options]);
        }

        $result = 1;
        foreach ($options as $option => $value) {
            $result &= $this->setOptionImpl($option, $value);
        }

        if (1 !== $result) {
            $this->stopMethod();

            return false;
        }

        $this->setResultOK();
        $this->stopMethod();

        return true;
    }
948141
public function groupDelete($groupId, $options=array()){

        $data = array();
        
        $data['group_id'] = $groupId;

        $data = array_merge($data, $options);

        return $this->request($this->groupDeleteUrl, $data);
    }
1221999
public function truncate(array $options): bool
    {
        $options = array_replace($this->defaultOptions, $options);
        $nItems = [];
        foreach (array_reverse($this->props['items']) as $item) {
            $f = $this->filterItem($item, $options);
            if ($f) {
                if ($f !== self::FILTER_LEFT) {
                    $nItems[] = $item;
                }
                $this->props['items'] = array_reverse($nItems);
                return true;
            }
            $nItems[] = $item;
        }
        return false;
    }
156407
public static function deleted($id = null, array $options = array())
	{
		//Make sure we are not filtering out soft deleted items
		$deleted_column = static::soft_delete_property('deleted_field', static::$_default_field_name);
		$options['where'][] = array($deleted_column, 'IS NOT', null);

		static::disable_filter();
		$result = parent::find($id, $options);
		static::enable_filter();

		return $result;
	}
272079
public function drop($collection, array $options = [])
    {
        $collectionName = $this->getCollectionName($collection);

        if ($this->isValidCollectionId($collectionName)) {
            throw new ClientException('Cannot alter a collection without a collection id');
        }

        $appendix = '';
        if (is_array($options) && isset($options['isSystem'])) {
            $appendix = '?isSystem=' . UrlHelper::getBoolString($options['isSystem']);
        }

        $this->getConnection()->delete(UrlHelper::buildUrl(Urls::URL_COLLECTION, [$collectionName]) . $appendix);

        return true;
    }
1319867
public function delete($resource, array $args = [], array $options = [])
    {
        $response = parent::delete($resource, $args, $options);
        $this->calls[] = [
            'method' => 'DELETE',
            'resource' => $resource,
            'args' => $args,
            'options' => $options,
            'success' => $response->success(),
            'response' => $response->getBody(),
        ];
        return $response;
    }
1034425
public function delete($id, $options = [])
    {
        return $this->gateway->commit('delete', $this->gateway->buildUrlFromString('payees/'.$id));
    }
972874
public function delete($options = [])
    {
        if (is_null($key = $this->getKeyName())) {
            throw new Exception('No primary key defined on model.');
        }

        // If the model doesn't exist, there is nothing to delete so we'll just return
        // immediately and not do anything else. Otherwise, we will continue with a
        // deletion process on the model, firing the proper events, and so forth.
        if (! $this->exists) {
            return;
        }

        if ($this->fireModelEvent('deleting') === false) {
            return false;
        }

        // Here, we'll touch the owning models, verifying these timestamps get updated
        // for the models. This will allow any caching to get broken on the parents
        // by the timestamp. Then we will go ahead and delete the model instance.
        $this->touchOwners();

        static::$client::delete($this->$key, $options, $this->attributes);

        $this->exists = false;

        // Once the model has been deleted, we will fire off the deleted event so that
        // the developers may hook into post-delete operations. We will then return
        // a boolean true as the delete is presumably successful on the database.
        $this->fireModelEvent('deleted', false);

        return true;
    }
136264
public function delete($conditions = null, $options = [])
    {
        $options = ($options instanceof Structure) ? $options : new Structure($options);

        $this->triggerEvent('onUserBeforeDelete', ['conditions' => &$conditions, 'options' => &$options]);

        try {
            $this->getHandler()->delete($conditions);
        } catch (\Exception $e) {
            $this->triggerEvent('onUserDeleteFailure', [
                'conditions' => $conditions,
                'exception' => $e,
                'options' => $options
            ]);

            return false;
        }

        $this->triggerEvent('onUserAfterDelete', ['conditions' => $conditions, 'options' => $options]);

        return true;
    }
1293340
public function deleteMany(array $filter, array $options = [])
    {
        $this->writeModels[] = [BulkWrite::DELETE_MANY => [$filter, $options]];

        return $this;
    }
1030554
public function cleanOptions($options = [])
    {
        // If item is null or empty we will remove them.
        return collect($options)->reject(function ($item) {
            return empty($item) || is_null($item);
        })->all();
    }
682300
public function deleteMany($filter, $options = [])
    {
        $filter = $this->castQuery($filter);
        $result = $this->collection->deleteMany($filter, $options);

        if ($result->isAcknowledged()) {
            return true;
        } else {
            return false;
        }
    }
921206
public function delete($id, $options = [])
    {
        $params = [];

        $params['transaction'] = 'fail';

        if ($creditcard === 'success') {
            $params['transaction'] = 'success';
        }

        return $this->gateway->commit('post', 'delete', $params);
    }
987425
public function delete($publicId, $options = array())
    {
        $response = $this->destroy($publicId, $options);

        return (boolean) ($response['result'] == 'ok');
    }
594259
public function remove($id, $options = [])
    {
        $_options = [
            'area' => false,
        ];

        $options = array_merge($_options, $options);

        if ($options['area']) {
            $this->area = $item['area'];
        }

        unset(self::$data[$this->area][$id]);
    }
161395
public function deleteByQuery($options = [])
    {
        if (!isset($this->queryParts['query'])) {
            throw new InvalidCallException('Can not call deleteByQuery when no query is given.');
        }
        $query = [
            'query' => $this->queryParts['query'],
        ];
        if (isset($this->queryParts['filter'])) {
            $query['filter'] = $this->queryParts['filter'];
        }
        $query = Json::encode($query);
        $url = [$this->index !== null ? $this->index : '_all'];
        if ($this->type !== null) {
            $url[] = $this->type;
        }
        $url[] = '_query';

        return $this->db->delete($url, array_merge($this->options, $options), $query);
    }