Classes/AbstractFinisher.php
protected function callAPI($data) {
    $apiUtility = new PipedriveApi($this->apiEndpoint);
    $apiUtility->setData($data);

    $formState = $this->finisherContext->getFormRuntime()->getFormState();

    $response = $apiUtility->execute();

    if($response->data->id) {
      $formState->setFormValue($this->getIdentifier() . ".ID", $response->data->id);
      return true;
    } else {
      throw new FinisherException("Something went wrong while calling the API!");
    }
  }
protected function callAPI($data) {
    $apiUtility = new PipedriveApi($this->apiEndpoint);
    $apiUtility->setData($data);

    $formState = $this->finisherContext->getFormRuntime()->getFormState();

    $response = $apiUtility->execute();

    if($response->data->id) {
      $formState->setFormValue($this->getIdentifier() . ".ID", $response->data->id);
      return true;
    } else {
      throw new FinisherException("Something went wrong while calling the API!");
    }
  }
Runs the API request for the given data

@return bool
@throws FinisherException