/// <summary> /// Asynchronously Retrieve Custom Field Items, with support for cancellation. /// </summary> /// <remarks> /// Retrieves a list of all custom field items associated with a custom field, /// with optional filters to narrow down the results. /// </remarks> /// <param name="filter"> /// An instance of the <see cref="Model.Filters.CustomFieldItemFilter"/> class, for narrowing down the results. /// </param> /// <param name="options"> /// An instance of the <see cref="RequestOptions"/> class, for customizing method processing. /// </param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns> /// The set of the <see cref="CustomFieldItem"/> objects retrieved, along with an output /// instance of the <see cref="ResultsMeta"/> class containing additional data. /// </returns> public async Task <(IList <CustomFieldItem>, ResultsMeta)> GetCustomFieldItemsAsync( Model.Filters.CustomFieldItemFilter filter, RequestOptions options, CancellationToken cancellationToken) { var context = new GetContext <CustomFieldItem>(EndpointName.CustomFieldItems, filter, options); await ExecuteOperationAsync(context, cancellationToken).ConfigureAwait(false); return(context.Results.Items, context.ResultsMeta); }
/// <summary> /// Asynchronously Retrieve Custom Field Items, with support for cancellation. /// </summary> /// <remarks> /// Retrieves a list of all custom field items associated with a custom field, /// with optional filters to narrow down the results. /// </remarks> /// <param name="filter"> /// An instance of the <see cref="Model.Filters.CustomFieldItemFilter"/> 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> /// The set of the <see cref="CustomFieldItem"/> objects retrieved, along with an output /// instance of the <see cref="ResultsMeta"/> class containing additional data. /// </returns> public async Task <(IList <CustomFieldItem>, ResultsMeta)> GetCustomFieldItemsAsync( Model.Filters.CustomFieldItemFilter filter, CancellationToken cancellationToken) { return(await GetCustomFieldItemsAsync(filter, null, cancellationToken).ConfigureAwait(false)); }
/// <summary> /// Asynchronously Retrieve Custom Field Items. /// </summary> /// <remarks> /// Retrieves a list of all custom field items associated with a custom field, /// with optional filters to narrow down the results. /// </remarks> /// <param name="filter"> /// An instance of the <see cref="Model.Filters.CustomFieldItemFilter"/> class, for narrowing down the results. /// </param> /// <param name="options"> /// An instance of the <see cref="RequestOptions"/> class, for customizing method processing. /// </param> /// <returns> /// The set of the <see cref="CustomFieldItem"/> objects retrieved, along with an output /// instance of the <see cref="ResultsMeta"/> class containing additional data. /// </returns> public async Task <(IList <CustomFieldItem>, ResultsMeta)> GetCustomFieldItemsAsync( Model.Filters.CustomFieldItemFilter filter, RequestOptions options) { return(await GetCustomFieldItemsAsync(filter, options, default).ConfigureAwait(false)); }
/// <summary> /// Retrieve Custom Field Items. /// </summary> /// <remarks> /// Retrieves a list of all custom field items associated with a custom field, /// with optional filters to narrow down the results. /// </remarks> /// <param name="filter"> /// An instance of the <see cref="Model.Filters.CustomFieldItemFilter"/> class, for narrowing down the results. /// </param> /// <param name="options"> /// An instance of the <see cref="RequestOptions"/> class, for customizing method processing. /// </param> /// <returns> /// The set of the <see cref="CustomFieldItem"/> objects retrieved, along with an output /// instance of the <see cref="ResultsMeta"/> class containing additional data. /// </returns> public (IList <CustomFieldItem>, ResultsMeta) GetCustomFieldItems( Model.Filters.CustomFieldItemFilter filter, RequestOptions options) { return(AsyncUtil.RunSync(() => GetCustomFieldItemsAsync(filter, options))); }