Class HouseholdClient
- Namespace
- Crews.PlanningCenter.Api.People.V2025_07_02
- 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
httpClientHttpClienturiUri
Properties
HouseholdMemberships
Associated HouseholdMemberships.
public PaginatedHouseholdMembershipClient HouseholdMemberships { get; }
Property Value
People
Associated People.
public PaginatedPersonClient People { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Household 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 Household resource asynchronously.
public Task<HouseholdResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
PatchAsync(Household, CancellationToken)
Updates an existing Household resource asynchronously.
public Task<HouseholdResponse> PatchAsync(Household resource, CancellationToken cancellationToken = default)
Parameters
resourceHouseholdThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<HouseholdResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.