Table of Contents

Class FieldDefinitionClient

Namespace
Crews.PlanningCenter.Api.People.V2024_09_12
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with the FieldDefinition resource.

public class FieldDefinitionClient : SingletonResourceClient<FieldDefinition, FieldDefinitionResource, FieldDefinitionResponse>
Inheritance
FieldDefinitionClient
Inherited Members

Constructors

FieldDefinitionClient(HttpClient, Uri)

Client for interacting with the FieldDefinition resource.

public FieldDefinitionClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

FieldOptions

Associated FieldOptions.

public PaginatedFieldOptionClient FieldOptions { get; }

Property Value

PaginatedFieldOptionClient

Tab

Associated Tab.

public TabClient Tab { get; }

Property Value

TabClient

Methods

DeleteAsync(CancellationToken)

Deletes the FieldDefinition resource asynchronously.

public Task DeleteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task

A task representing the asynchronous delete operation.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

GetAsync(CancellationToken)

Fetches the FieldDefinition resource asynchronously.

public Task<FieldDefinitionResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<FieldDefinitionResponse>

A task representing the asynchronous operation, containing the FieldDefinition resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeFieldOptions()

Include related FieldOptions resources in the response.

public FieldDefinitionClient IncludeFieldOptions()

Returns

FieldDefinitionClient

IncludeTab()

Include related Tab resources in the response.

public FieldDefinitionClient IncludeTab()

Returns

FieldDefinitionClient

PatchAsync(FieldDefinition, CancellationToken)

Updates an existing FieldDefinition resource asynchronously.

public Task<FieldDefinitionResponse> PatchAsync(FieldDefinition resource, CancellationToken cancellationToken = default)

Parameters

resource FieldDefinition

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<FieldDefinitionResponse>

A task representing the asynchronous operation, containing the updated FieldDefinition resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<FieldDefinitionResource>, CancellationToken)

Updates an existing FieldDefinition resource asynchronously.

public Task<FieldDefinitionResponse> PatchAsync(JsonApiDocument<FieldDefinitionResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<FieldDefinitionResource>

The JSON:API document to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<FieldDefinitionResponse>

A task representing the asynchronous operation, containing the updated FieldDefinition resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.