/// <summary>
        /// Gets the download status for an existing <see cref="PreReceiveEnvironment"/>.
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/enterprise-admin/pre_receive_environments/#get-a-pre-receive-environments-download-status">API documentation</a> for more information.
        /// </remarks>
        /// <param name="environmentId">The id of the pre-receive environment</param>
        /// <exception cref="NotFoundException">Thrown when the specified <paramref name="environmentId"/> does not exist.</exception>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        public Task <PreReceiveEnvironmentDownload> DownloadStatus(long environmentId)
        {
            var endpoint = ApiUrls.AdminPreReceiveEnvironmentDownloadStatus(environmentId);

            return(ApiConnection.Get <PreReceiveEnvironmentDownload>(endpoint, null, AcceptHeaders.PreReceiveEnvironmentsPreview));
        }