Class NamePrefixClient
- Namespace
- Crews.PlanningCenter.Api.People.V2025_07_02
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the NamePrefix resource.
public class NamePrefixClient : SingletonResourceClient<NamePrefix, NamePrefixResource, NamePrefixResponse>
- Inheritance
-
NamePrefixClient
- Inherited Members
Constructors
NamePrefixClient(HttpClient, Uri)
Client for interacting with the NamePrefix resource.
public NamePrefixClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
DeleteAsync(CancellationToken)
Deletes the NamePrefix 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 NamePrefix resource asynchronously.
public Task<NamePrefixResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NamePrefixResponse>
A task representing the asynchronous operation, containing the NamePrefix resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(NamePrefix, CancellationToken)
Updates an existing NamePrefix resource asynchronously.
public Task<NamePrefixResponse> PatchAsync(NamePrefix resource, CancellationToken cancellationToken = default)
Parameters
resourceNamePrefixThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NamePrefixResponse>
A task representing the asynchronous operation, containing the updated NamePrefix resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<NamePrefixResource>, CancellationToken)
Updates an existing NamePrefix resource asynchronously.
public Task<NamePrefixResponse> PatchAsync(JsonApiDocument<NamePrefixResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<NamePrefixResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NamePrefixResponse>
A task representing the asynchronous operation, containing the updated NamePrefix resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.