Table of Contents

Class SchoolOptionClient

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

httpClient HttpClient
uri Uri

Properties

PromotesToSchool

Associated PromotesToSchool.

public SchoolOptionClient PromotesToSchool { get; }

Property Value

SchoolOptionClient

Methods

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A 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

resource SchoolOption

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<SchoolOptionResource>

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

cancellationToken CancellationToken

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