/// <summary>
        /// Retrieve project report for given jobcode id's over a date range.
        /// </summary>
        private ProjectReport GetProjectReport(List <long> jobcodeId, DateTimeOffset startDate, DateTimeOffset endDate)
        {
            var filter = new ProjectReportFilter {
                StartDate = startDate, EndDate = endDate, JobcodeIds = jobcodeId
            };

            ProjectReport projectReport = this.apiClient.GetProjectReport(filter).Item1;

            return(projectReport);
        }
        /// <summary>
        /// Asynchronously Retrieve Project Report, with support for cancellation.
        /// </summary>
        /// <remarks>
        /// Retrieves a project report with filters to narrow down the results.
        /// </remarks>
        /// <param name="filter">
        /// An instance of the <see cref="ProjectReportFilter"/> class, for narrowing down the results.
        /// </param>
        /// <param name="cancellationToken">
        /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>
        /// An instance of the <see cref="ProjectReport"/> class, along with
        /// an output instance of the <see cref="ResultsMeta"/> class containing additional data.
        /// </returns>
        public async Task <(ProjectReport, ResultsMeta)> GetProjectReportAsync(
            ProjectReportFilter filter,
            CancellationToken cancellationToken)
        {
            var context = new GetReportContext <ProjectReport>(EndpointName.ProjectReports, filter);

            await ExecuteOperationAsync(context, cancellationToken).ConfigureAwait(false);

            return(context.Results, context.ResultsMeta);
        }
 /// <summary>
 /// Asynchronously Retrieve Project Report.
 /// </summary>
 /// <remarks>
 /// Retrieves a project report with filters to narrow down the results.
 /// </remarks>
 /// <param name="filter">
 /// An instance of the <see cref="ProjectReportFilter"/> class, for narrowing down the results.
 /// </param>
 /// <returns>
 /// An instance of the <see cref="ProjectReport"/> class, along with
 /// an output instance of the <see cref="ResultsMeta"/> class containing additional data.
 /// </returns>
 public async Task <(ProjectReport, ResultsMeta)> GetProjectReportAsync(
     ProjectReportFilter filter)
 {
     return(await GetProjectReportAsync(filter, default).ConfigureAwait(false));
 }
 /// <summary>
 /// Retrieve Project Report.
 /// </summary>
 /// <remarks>
 /// Retrieves a project report with filters to narrow down the results.
 /// </remarks>
 /// <param name="filter">
 /// An instance of the <see cref="ProjectReportFilter"/> class, for narrowing down the results.
 /// </param>
 /// <returns>
 /// An instance of the <see cref="ProjectReport"/> class, along with
 /// an output instance of the <see cref="ResultsMeta"/> class containing additional data.
 /// </returns>
 public (ProjectReport, ResultsMeta) GetProjectReport(ProjectReportFilter filter)
 {
     return(AsyncUtil.RunSync(() => GetProjectReportAsync(filter)));
 }