Table of Contents

Class PhoneNumberClient

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

Client for interacting with the PhoneNumber resource.

public class PhoneNumberClient : SingletonResourceClient<PhoneNumber, PhoneNumberResource, PhoneNumberResponse>
Inheritance
PhoneNumberClient
Inherited Members

Constructors

PhoneNumberClient(HttpClient, Uri)

Client for interacting with the PhoneNumber resource.

public PhoneNumberClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PhoneNumberResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(PhoneNumber, CancellationToken)

Updates an existing PhoneNumber resource asynchronously.

public Task<PhoneNumberResponse> PatchAsync(PhoneNumber resource, CancellationToken cancellationToken = default)

Parameters

resource PhoneNumber

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PhoneNumberResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<PhoneNumberResource>, CancellationToken)

Updates an existing PhoneNumber resource asynchronously.

public Task<PhoneNumberResponse> PatchAsync(JsonApiDocument<PhoneNumberResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<PhoneNumberResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PhoneNumberResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.