/// <summary> /// Asynchronously Retrieve Payroll Report, with support for cancellation. /// </summary> /// <remarks> /// Retrieves a payroll report associated with a time frame, /// with filters to narrow down the results. /// </remarks> /// <param name="filter"> /// An instance of the <see cref="PayrollReportFilter"/> 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="PayrollReport"/> class, along with /// an output instance of the <see cref="ResultsMeta"/> class containing additional data. /// </returns> public async Task <(PayrollReport, ResultsMeta)> GetPayrollReportAsync( PayrollReportFilter filter, CancellationToken cancellationToken) { var context = new GetReportContext <PayrollReport>(EndpointName.PayrollReports, filter); await ExecuteOperationAsync(context, cancellationToken).ConfigureAwait(false); return(context.Results, context.ResultsMeta); }
/// <summary> /// Asynchronously Retrieve Payroll Report. /// </summary> /// <remarks> /// Retrieves a payroll report associated with a time frame, /// with filters to narrow down the results. /// </remarks> /// <param name="filter"> /// An instance of the <see cref="PayrollReportFilter"/> class, for narrowing down the results. /// </param> /// <returns> /// An instance of the <see cref="PayrollReport"/> class, along with /// an output instance of the <see cref="ResultsMeta"/> class containing additional data. /// </returns> public async Task <(PayrollReport, ResultsMeta)> GetPayrollReportAsync( PayrollReportFilter filter) { return(await GetPayrollReportAsync(filter, default).ConfigureAwait(false)); }
/// <summary> /// Retrieve Payroll Report. /// </summary> /// <remarks> /// Retrieves a payroll report associated with a time frame, /// with filters to narrow down the results. /// </remarks> /// <param name="filter"> /// An instance of the <see cref="PayrollReportFilter"/> class, for narrowing down the results. /// </param> /// <returns> /// An instance of the <see cref="PayrollReport"/> class, along with /// an output instance of the <see cref="ResultsMeta"/> class containing additional data. /// </returns> public (PayrollReport, ResultsMeta) GetPayrollReport(PayrollReportFilter filter) { return(AsyncUtil.RunSync(() => GetPayrollReportAsync(filter))); }