Table of Contents

Class ServiceTimeClient

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

Client for interacting with the ServiceTime resource.

public class ServiceTimeClient : SingletonResourceClient<ServiceTime, ServiceTimeResource, ServiceTimeResponse>
Inheritance
ServiceTimeClient
Inherited Members

Constructors

ServiceTimeClient(HttpClient, Uri)

Client for interacting with the ServiceTime resource.

public ServiceTimeClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTimeResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(ServiceTime, CancellationToken)

Updates an existing ServiceTime resource asynchronously.

public Task<ServiceTimeResponse> PatchAsync(ServiceTime resource, CancellationToken cancellationToken = default)

Parameters

resource ServiceTime

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTimeResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<ServiceTimeResource>, CancellationToken)

Updates an existing ServiceTime resource asynchronously.

public Task<ServiceTimeResponse> PatchAsync(JsonApiDocument<ServiceTimeResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<ServiceTimeResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTimeResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.