Finalize a dispute, given a dispute ID

@param string $id
174914
public function finalize($id)
    {
        try {
            if (trim($id) == "") {
                throw new Exception\NotFound();
            }

            $path = $this->_config->merchantPath() . '/disputes/' . $id . '/finalize';
            $response = $this->_http->put($path);

            if (isset($response['apiErrorResponse'])) {
                return new Result\Error($response['apiErrorResponse']);
            }

            return new Result\Successful();
        } catch (Exception\NotFound $e) {
            throw new Exception\NotFound('dispute with id "' . $id . '" not found');
        }
    }
517291
private function resolveAutomaticResolvable(string $id)
    {
        if (Validator::key($id)->validate($this->autoResolvable)) {
            return $this->instances[$id] = $this->autoResolve($this->autoResolvable[$id]);
        }
        return $this->autoResolve($id);
    }
145128
public function remove($id) {
		// Format id
		$id = $this->_format($id);
		// Verify existence
		if(!$this->has($id)) {
			throw new NotFoundException("'$id' value does not exist");
		}
		// Remove value
		unset($this->values[$id]);
	}
362784
public function actionSend($id)
    {
        $message = Message::findOne($id);
        if ($message !== null) {
            try {
                $message->status = $this->send($message) > 0 ? Message::STATUS_SUCCESS : Message::STATUS_ERROR;
                $message->save(true, ['status']);
            } catch (\Exception $e) {
                $message->status = Message::STATUS_ERROR;
                $message->save(true, ['status']);
                $this->stderr($e->getMessage());
            }
        } else {
            $this->stdout("Message not found\n");
            exit(1);
        }
    }
563963
public function removeMessage($id)
    {
        if (!$this->_protocol->store(array(Zend_Mail_Storage::FLAG_DELETED), $id, null, '+')) {
            /**
             * @see Zend_Mail_Storage_Exception
             */
            // require_once 'Zend/Mail/Storage/Exception.php';
            throw new Zend_Mail_Storage_Exception('cannot set deleted flag');
        }
        // TODO: expunge here or at close? we can handle an error here better and are more fail safe
        if (!$this->_protocol->expunge()) {
            /**
             * @see Zend_Mail_Storage_Exception
             */
            // require_once 'Zend/Mail/Storage/Exception.php';
            throw new Zend_Mail_Storage_Exception('message marked as deleted, but could not expunge');
        }
    }
1230305
public function close($id)
	{
		$endpoint = new Close($this->getTransport());
		$endpoint->setId($id);

		try {
			$result = $endpoint->performRequest();
		} catch (ResourceNotFoundException $e) {
			return false;
		}

		return $result['status'] == 204;
	}
728833
public function prioritize(/*string*/ $id, /*int*/ $newPriority) {
    // Normalize priority.
    $newPriority = intval($newPriority);

    // The priority must be valid.
    if(self::PRIO_START <= $newPriority && self::PRIO_END >= $newPriority) {
      // The new priority must be different than old one.
      if(
        isset($this->priorities[$id]) &&
        $newPriority !== ($priority = $this->priorities[$id])
      ) {
        // Get the callback.
        $callback = $this->callbacks[$priority][$id];

        // Unregister from old priority.
        $this->releaseImpl($id, $priority);

        // Register new callback at the new priority.
        $this->registerImpl($id, $callback, $newPriority);
      }
    }
  }
509531
public function delete($id = null)
	{
		$wheres = $this->compileWheres();

		foreach ($this->get() as $entity)
		{
			$this->collection->remove($entity);
		}
	}
1129721
function finalizeMeasurement(id) {
        if (activeTests[id.id]) {
            delete activeTests[id.id];
        }

        if (updatableTests[id.id]) {
            delete updatableTests[id.id];
        }
    }
983731
public function deleteRow($id)
    {
        unset($this->rows[$id]);

        if (in_array($id, $this->specialRows['header'])) {
            unset($this->specialRows['header'][array_search($id, $this->specialRows['header'])]);
        }

        if (in_array($id, $this->specialRows['footer'])) {
            unset($this->specialRows['footer'][array_search($id, $this->specialRows['footer'])]);
        }

        if ($this->activeRow == $id) {
            end($this->rows);
            $this->activeRow = key($this->rows);
        }

        return $this;
    }
907206
public function handleDelete(int $id): void
	{
		if ($this->isAjax() && $this->editConst) {
			$content = $this->orm->content->getById($id);
			$this->orm->content->removeAndFlush($content);
			$this['list']->reload();
		} else {
			$this->terminate();
		}
	}
1028619
public function _performDelete($id)
    {
        if ($this->model) {
            $this->model->delete($id);
        } else {
            $this->dq->where('id', $id)->delete();
        }
    }
325700
public function delete($id)
    {
        $query = $this->createQueryBuilder();

        $query->where($this->getPrimaryKey($query), $id);
        $query->delete();
    }
542802
@POST
    @Path("close")    
    public void close(String id) {
    	Connection connection = ConnectionHolder.get().get(id);
    	try {
			connection.close();
			ConnectionHolder.get().remove(id);
		} catch (SQLException e) {
			// TODO
			throw new RuntimeException(e);
		}		
    }
1319416
public function setIssueStatus($id, $status)
    {
        $api = $this->client->issue_status;
        $statusId = $api->getIdByName($status);

        return $this->update($id, [
            'status_id' => $statusId,
        ]);
    }
959396
public function delete($id)
    {
        $doctrineMessage = $this->repository->findById($id);
        $doctrineMessage->setDelivered(true);
        $this->em->flush();

        return true;
    }
1047130
public function deleteById($id)
    {
        $deleteResult = $this->getRequest()->request(
            'DELETE',
            $this->getRequestUrl(sprintf('inputs/%s', $id))
        );

        return $deleteResult['status'];
    }