Table of Contents

Class HouseholdClient

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

Client for interacting with the Household resource.

public class HouseholdClient : SingletonResourceClient<Household, HouseholdResource, HouseholdResponse>
Inheritance
HouseholdClient
Inherited Members

Constructors

HouseholdClient(HttpClient, Uri)

Client for interacting with the Household resource.

public HouseholdClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

HouseholdMemberships

Associated HouseholdMemberships.

public PaginatedHouseholdMembershipClient HouseholdMemberships { get; }

Property Value

PaginatedHouseholdMembershipClient

People

Associated People.

public PaginatedPersonClient People { get; }

Property Value

PaginatedPersonClient

Methods

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<HouseholdResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludePeople()

Include related People resources in the response.

public HouseholdClient IncludePeople()

Returns

HouseholdClient

PatchAsync(Household, CancellationToken)

Updates an existing Household resource asynchronously.

public Task<HouseholdResponse> PatchAsync(Household resource, CancellationToken cancellationToken = default)

Parameters

resource Household

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<HouseholdResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<HouseholdResource>, CancellationToken)

Updates an existing Household resource asynchronously.

public Task<HouseholdResponse> PatchAsync(JsonApiDocument<HouseholdResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<HouseholdResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<HouseholdResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.