:category: CRUD

 Deletes it.
 Reads itself from the response.
 Raises HttpError if the request is unsuccessful.
 options:: A hash of options to send with the request.
 invalidate:: Invalidates it when true, skips invalidation when false.
168467
def delete(options = {}, invalidate = true)
      if invalidate
        self.invalidate
      end
      options = @options.merge(options)
      response = self.class.delete(@uri, options)
      if response.success?
        deserialize(response)
      else
        fail HttpError, response.response
      end
    end
659969
def delete(self, request, _id):
        
        _id = deserialize(_id)

        to_delete = self.collection.get({'_id': _id})
        if to_delete:
            deleted = to_delete.delete()

            return Response(
                response=serialize(deleted),
                status=(
                    200 if not all(
                        key in deleted for key in [
                            'error_code', 'error_type', 'error_message'
                        ]
                    ) else 400
                )
            )
        else:
            return Response(
                response=serialize(
                    DocumentNotFoundError(self.collection.__name__, _id)
                ),
                status=404
            )
220043
def revert_wire(options = {})
      response = JSON.parse(@client.patch("items/#{send(:id)}/revert_wire", options).body)
      @attributes = response['items']
      true
    end
895182
def delete(self, rid, raise_on_error=True):
        
        return self.ds.delete(rid, raise_on_error)
132519
def delete(options = {:hard => false})
      if options[:hard]
        self.class.delete(self.id, options)
      else
        return if new_record? or destroyed?
        update_column kakurenbo_column, current_time_from_proper_timezone
      end
    end
112358
def delete(self, endpoint, **kwargs):
        
        kwargs.update(self.kwargs.copy())
        response = requests.delete(self.make_url(endpoint), **kwargs)
        return _decode_response(response)
554778
def delete(document_uri)
			validate_uri(document_uri)
			res = HTTParty.delete(document_uri, @default_opts)
			res.success? ? res : handle_error(res)
		end
560105
def delete(key, options = {})
      @key = key
      @options = options
      custom_params = []
      custom_params << recurse_get(@options)
      custom_params << dc(@options)
      @raw = send_delete_request(@conn, ["/v1/kv/#{@key}"], options, custom_params)
    end
703275
def delete(path, body = nil, params = {}, headers = {})
      request_headers = request_headers(headers)
      request_options = {
          path: path,
          headers: request_headers,
          body: encode_body(body, request_headers['Content-Type']),
          query: encode_params(params)
      }
      response = http_client.delete(request_options)
      unless response.status == 204
        handle_error_response(response)
      end
    end
391302
def delete(params = {})
      case @api.version
      when 'v1'
        response = self.class.post(@api.delete_config[:url],
                                  :query => { :auth_token => @token }.merge(params),
                                  :headers => @api.headers
        )
      when 'v2'
        response = self.class.delete(@api.delete_config[:url],
                                  :query => { :auth_token => @token },
                                  :headers => @api.headers
        )
      end

      ErrorHandler.response_code_to_exception_for :user, user_id, response
      true
    end
478801
def delete_link(obj, options = {})
      if policy(obj).destroy?
        default_options = { data: {
          confirm: 'Are you sure? There is no undo for this!',
          tooltip: 'Delete',
          method: 'Delete',
          remote: 'true'
        } }
        url = polymorphic_url(obj)
        action_link('Delete', url, 'trash-o', default_options.deep_merge(options))
      end
    end
448480
def delete(options = {})
      options = options.merge(role_name: @name)
      resp = @client.delete_role(options)
      resp.data
    end
1337219
def save!(_options = {})
      return false if respond_to?(:destroyed?) && destroyed?

      options = { request_namespace => attributes }

      if new_record?
        method = :post
        req_path = api_url(options)
      else
        method = :put
        req_path = api_url(options) + "/#{id}"
      end

      response = @client.make_request!(req_path, method, options)

      handle_response(response)
      self
    end
916527
def delete(options = {})
      options = options.merge(bucket: @bucket_name)
      resp = @client.delete_bucket_tagging(options)
      resp.data
    end
1076568
def delete_link(*args)
      options = {:method => :delete, :confirm => "Are you sure you want to delete this?"}.merge(extract_options_from_args!(args)||{})
      args << options
      link_to(*args)
    end
1098846
def delete(url, params={}, options={})
      response = connection.delete do |req|
        req.saddle_options = options
        req.url(url, params)
      end
      handle_response(response)
    end
398996
def cancellable?(options = {})
      @logger.debug("[cancellable?] options=#{options.inspect}")

      validate_required_params!(options, :transaction_id)

      response = execute_request(:status, options)
      response.cancellable?
    end