Class FieldOptionClient
- Namespace
- Crews.PlanningCenter.Api.People.V2018_08_01
- 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
httpClientHttpClienturiUri
Methods
DeleteAsync(CancellationToken)
Deletes the FieldOption resource asynchronously.
public Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
cancellationTokenCancellationTokenA 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
resourceFieldOptionThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<FieldOptionResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.