Table of Contents

Class NamePrefixClient

Namespace
Crews.PlanningCenter.Api.People.V2022_01_05
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

httpClient HttpClient
uri Uri

Methods

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A 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

resource NamePrefix

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<NamePrefixResource>

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

cancellationToken CancellationToken

A 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.