Class FieldDefinitionClient
- Namespace
- Crews.PlanningCenter.Api.People.V2022_01_28
- 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
httpClientHttpClienturiUri
Properties
FieldOptions
Associated FieldOptions.
public PaginatedFieldOptionClient FieldOptions { get; }
Property Value
Tab
Associated Tab.
public TabClient Tab { get; }
Property Value
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public FieldDefinitionClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- FieldDefinitionClient
The current FieldDefinitionClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public FieldDefinitionClient ClearParameters()
Returns
- FieldDefinitionClient
The current FieldDefinitionClient instance.
DeleteAsync(CancellationToken)
Deletes the FieldDefinition 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 FieldDefinition resource asynchronously.
public Task<FieldDefinitionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
IncludeTab()
Include related Tab resources in the response.
public FieldDefinitionClient IncludeTab()
Returns
PatchAsync(FieldDefinition, CancellationToken)
Updates an existing FieldDefinition resource asynchronously.
public Task<FieldDefinitionResponse> PatchAsync(FieldDefinition resource, CancellationToken cancellationToken = default)
Parameters
resourceFieldDefinitionThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<FieldDefinitionResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.