Table of Contents

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

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public MaritalStatusClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

MaritalStatusClient

The current MaritalStatusClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public MaritalStatusClient ClearParameters()

Returns

MaritalStatusClient

The current MaritalStatusClient instance.

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A 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

resource MaritalStatus

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<MaritalStatusResource>

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

cancellationToken CancellationToken

A 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.