src/Google/AdsApi/AdManager/Util/v201805/ReportDownloader.php
private function getDownloadUrl($exportFormat)
    {
        $reportJobStatus = $this->reportService
            ->getReportJobStatus($this->reportJobId);
        if ($reportJobStatus === ReportJobStatus::IN_PROGRESS) {
            throw new UnexpectedValueException(
                sprintf(
                    'Report %d must be completed before downloading. '
                    . 'Report is still %s.',
                    $this->reportJobId,
                    ReportJobStatus::IN_PROGRESS
                )
            );
        } elseif ($reportJobStatus === ReportJobStatus::FAILED) {
            throw new UnexpectedValueException(
                sprintf(
                    'Cannot download report %d because it has a status of %s.',
                    $this->reportJobId,
                    ReportJobStatus::FAILED
                )
            );
        }

        return $this->reportService->getReportDownloadURL(
            $this->reportJobId,
            $exportFormat
        );
    }
private function getDownloadUrl($exportFormat)
    {
        $reportJobStatus = $this->reportService
            ->getReportJobStatus($this->reportJobId);
        if ($reportJobStatus === ReportJobStatus::IN_PROGRESS) {
            throw new UnexpectedValueException(
                sprintf(
                    'Report %d must be completed before downloading. '
                    . 'Report is still %s.',
                    $this->reportJobId,
                    ReportJobStatus::IN_PROGRESS
                )
            );
        } elseif ($reportJobStatus === ReportJobStatus::FAILED) {
            throw new UnexpectedValueException(
                sprintf(
                    'Cannot download report %d because it has a status of %s.',
                    $this->reportJobId,
                    ReportJobStatus::FAILED
                )
            );
        }

        return $this->reportService->getReportDownloadURL(
            $this->reportJobId,
            $exportFormat
        );
    }
private function getDownloadUrl ( $ exportFormat ) { $ reportJobStatus = $ this -> reportService -> getReportJobStatus ( $ this -> reportJobId ) ; if ( $ reportJobStatus === ReportJobStatus :: IN_PROGRESS ) { throw new UnexpectedValueException ( sprintf ( 'Report %d must be completed before downloading. ' . 'Report is still %s.' , $ this -> reportJobId , ReportJobStatus :: IN_PROGRESS ) ) ; } elseif ( $ reportJobStatus === ReportJobStatus :: FAILED ) { throw new UnexpectedValueException ( sprintf ( 'Cannot download report %d because it has a status of %s.' , $ this -> reportJobId , ReportJobStatus :: FAILED ) ) ; } return $ this -> reportService -> getReportDownloadURL ( $ this -> reportJobId , $ exportFormat ) ; }
Gets the download URL for the report.

@param string $exportFormat the export format of the report
@return string the download URL for the report
@throws UnexpectedValueException if the report is still in progress or
has failed
Gets the download URL for the report .