Table of Contents

Class InactiveReasonClient

Namespace
Crews.PlanningCenter.Api.People.V2021_08_17
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with the InactiveReason resource.

public class InactiveReasonClient : SingletonResourceClient<InactiveReason, InactiveReasonResource, InactiveReasonResponse>
Inheritance
InactiveReasonClient
Inherited Members

Constructors

InactiveReasonClient(HttpClient, Uri)

Client for interacting with the InactiveReason resource.

public InactiveReasonClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public InactiveReasonClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

InactiveReasonClient

The current InactiveReasonClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public InactiveReasonClient ClearParameters()

Returns

InactiveReasonClient

The current InactiveReasonClient instance.

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<InactiveReasonResponse>

A task representing the asynchronous operation, containing the InactiveReason resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(InactiveReason, CancellationToken)

Updates an existing InactiveReason resource asynchronously.

public Task<InactiveReasonResponse> PatchAsync(InactiveReason resource, CancellationToken cancellationToken = default)

Parameters

resource InactiveReason

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<InactiveReasonResponse>

A task representing the asynchronous operation, containing the updated InactiveReason resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<InactiveReasonResource>, CancellationToken)

Updates an existing InactiveReason resource asynchronously.

public Task<InactiveReasonResponse> PatchAsync(JsonApiDocument<InactiveReasonResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<InactiveReasonResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<InactiveReasonResponse>

A task representing the asynchronous operation, containing the updated InactiveReason resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.