public function run()
    {
        if (empty($this->request)) {
            $this->setLogs('Skipping empty operation: '.$this->name, 'notice');

            return true;
        }

        $this->setLogs($this->name, 'name');
        $this->setLogs(($this->test ? 'TEST' : 'PROD'), 'mode');

        // Send the API request.
        $apiRequest = new ApiRequest($this->request, $this->transport, $this->tokenHelper, $this->test);
        $apiRequest->send();
        $this->setLogs($apiRequest->getLogs(), 'request');

        // Parse the API response.
        $apiResponse          = new ApiResponse(
            $this->responseExpected, $this->successDefinition, $this->transport, $this->test
        );
        $this->responseActual = $apiResponse->parse()->getResponse();
        $this->setLogs($apiResponse->getLogs(), 'response');

        // Validate the API response with the given success definition.
        $valid = false;
        try {
            $valid = $apiResponse->validate();
        } catch (\Exception $e) {
        }

        $this->setValid($valid);
        $this->setLogs($valid, 'valid');
        if ($this->updatePayload && $this->test) {
            $this->updatePayloadResponse();
        }

        // Allow any exception encountered during validation to bubble upward.
        if (!empty($e)) {
            throw $e;
        }

        return $this;
    }