Class InKindDonationClient
- Namespace
- Crews.PlanningCenter.Api.Giving.V2019_10_18
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the InKindDonation resource.
public class InKindDonationClient : SingletonResourceClient<InKindDonation, InKindDonationResource, InKindDonationResponse>
- Inheritance
-
InKindDonationClient
- Inherited Members
Constructors
InKindDonationClient(HttpClient, Uri)
Client for interacting with the InKindDonation resource.
public InKindDonationClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Campus
Associated Campus.
public PaginatedCampusClient Campus { get; }
Property Value
Fund
Associated Fund.
public FundClient Fund { get; }
Property Value
Person
Associated Person.
public PersonClient Person { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the InKindDonation 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 InKindDonation resource asynchronously.
public Task<InKindDonationResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<InKindDonationResponse>
A task representing the asynchronous operation, containing the InKindDonation resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeCampus()
Include related Campus resources in the response.
public InKindDonationClient IncludeCampus()
Returns
IncludeFund()
Include related Fund resources in the response.
public InKindDonationClient IncludeFund()
Returns
IncludePerson()
Include related Person resources in the response.
public InKindDonationClient IncludePerson()
Returns
PatchAsync(InKindDonation, CancellationToken)
Updates an existing InKindDonation resource asynchronously.
public Task<InKindDonationResponse> PatchAsync(InKindDonation resource, CancellationToken cancellationToken = default)
Parameters
resourceInKindDonationThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<InKindDonationResponse>
A task representing the asynchronous operation, containing the updated InKindDonation resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<InKindDonationResource>, CancellationToken)
Updates an existing InKindDonation resource asynchronously.
public Task<InKindDonationResponse> PatchAsync(JsonApiDocument<InKindDonationResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<InKindDonationResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<InKindDonationResponse>
A task representing the asynchronous operation, containing the updated InKindDonation resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.