Class MaritalStatusClient
- Namespace
- Crews.PlanningCenter.Api.People.V2022_07_14
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the MaritalStatus resource.
public class MaritalStatusClient : SingletonResourceClient<MaritalStatus, MaritalStatusResource, MaritalStatusResponse>
- Inheritance
-
MaritalStatusClient
- Inherited Members
Constructors
MaritalStatusClient(HttpClient, Uri)
Client for interacting with the MaritalStatus resource.
public MaritalStatusClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
DeleteAsync(CancellationToken)
Deletes the MaritalStatus 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 MaritalStatus resource asynchronously.
public Task<MaritalStatusResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<MaritalStatusResponse>
A task representing the asynchronous operation, containing the MaritalStatus resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(MaritalStatus, CancellationToken)
Updates an existing MaritalStatus resource asynchronously.
public Task<MaritalStatusResponse> PatchAsync(MaritalStatus resource, CancellationToken cancellationToken = default)
Parameters
resourceMaritalStatusThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<MaritalStatusResponse>
A task representing the asynchronous operation, containing the updated MaritalStatus resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<MaritalStatusResource>, CancellationToken)
Updates an existing MaritalStatus resource asynchronously.
public Task<MaritalStatusResponse> PatchAsync(JsonApiDocument<MaritalStatusResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<MaritalStatusResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<MaritalStatusResponse>
A task representing the asynchronous operation, containing the updated MaritalStatus resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.