Table of Contents

Class FieldOptionClient

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

Client for interacting with the FieldOption resource.

public class FieldOptionClient : SingletonResourceClient<FieldOption, FieldOptionResource, FieldOptionResponse>
Inheritance
FieldOptionClient
Inherited Members

Constructors

FieldOptionClient(HttpClient, Uri)

Client for interacting with the FieldOption resource.

public FieldOptionClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

DeleteAsync(CancellationToken)

Deletes the FieldOption 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 FieldOption resource asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<FieldOptionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(FieldOption, CancellationToken)

Updates an existing FieldOption resource asynchronously.

public Task<FieldOptionResponse> PatchAsync(FieldOption resource, CancellationToken cancellationToken = default)

Parameters

resource FieldOption

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<FieldOptionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<FieldOptionResource>, CancellationToken)

Updates an existing FieldOption resource asynchronously.

public Task<FieldOptionResponse> PatchAsync(JsonApiDocument<FieldOptionResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<FieldOptionResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<FieldOptionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.