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