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