Class PhoneNumberClient
- Namespace
- Crews.PlanningCenter.Api.People.V2022_01_28
- 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
httpClientHttpClienturiUri
Methods
DeleteAsync(CancellationToken)
Deletes the PhoneNumber 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 PhoneNumber resource asynchronously.
public Task<PhoneNumberResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
resourcePhoneNumberThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<PhoneNumberResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.