Class ServiceTimeClient
- Namespace
- Crews.PlanningCenter.Api.People.V2020_04_06
- 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
httpClientHttpClienturiUri
Methods
DeleteAsync(CancellationToken)
Deletes the ServiceTime 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 ServiceTime resource asynchronously.
public Task<ServiceTimeResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
resourceServiceTimeThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<ServiceTimeResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.