Table of Contents

Class SchoolOptionClient

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

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public SchoolOptionClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

SchoolOptionClient

The current SchoolOptionClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public SchoolOptionClient ClearParameters()

Returns

SchoolOptionClient

The current SchoolOptionClient instance.

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.