Class PersonClient
- Namespace
- Crews.PlanningCenter.Api.Giving.V2019_10_18
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Person resource.
public class PersonClient : SingletonResourceClient<Person, PersonResource, PersonResponse>
- Inheritance
-
PersonClient
- Inherited Members
Constructors
PersonClient(HttpClient, Uri)
Client for interacting with the Person resource.
public PersonClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
BatchGroups
Associated BatchGroups.
public PaginatedBatchGroupClient BatchGroups { get; }
Property Value
Batches
Associated Batches.
public PaginatedBatchClient Batches { get; }
Property Value
Donations
Associated Donations.
public PaginatedDonationClient Donations { get; }
Property Value
InKindDonations
Associated InKindDonations.
public PaginatedInKindDonationClient InKindDonations { get; }
Property Value
PaymentMethods
Associated PaymentMethods.
public PaginatedPaymentMethodClient PaymentMethods { get; }
Property Value
Pledges
Associated Pledges.
public PaginatedPledgeClient Pledges { get; }
Property Value
PrimaryCampus
Associated PrimaryCampus.
public PaginatedCampusClient PrimaryCampus { get; }
Property Value
RecurringDonations
Associated RecurringDonations.
public PaginatedRecurringDonationClient RecurringDonations { get; }
Property Value
Methods
GetAsync(CancellationToken)
Fetches the Person resource asynchronously.
public Task<PersonResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PersonResponse>
A task representing the asynchronous operation, containing the Person resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(Person, CancellationToken)
Updates an existing Person resource asynchronously.
public Task<PersonResponse> PatchAsync(Person resource, CancellationToken cancellationToken = default)
Parameters
resourcePersonThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PersonResponse>
A task representing the asynchronous operation, containing the updated Person resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<PersonResource>, CancellationToken)
Updates an existing Person resource asynchronously.
public Task<PersonResponse> PatchAsync(JsonApiDocument<PersonResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<PersonResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PersonResponse>
A task representing the asynchronous operation, containing the updated Person resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.