Class PaginatedInKindDonationClient
- Namespace
- Crews.PlanningCenter.Api.Giving.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with InKindDonation collection resources.
public class PaginatedInKindDonationClient : PaginatedResourceClient<InKindDonation, InKindDonationResource, InKindDonationCollectionResponse, InKindDonationResponse>
- Inheritance
-
PaginatedResourceClient<InKindDonation, InKindDonationResource, InKindDonationCollectionResponse, InKindDonationResponse>PaginatedInKindDonationClient
- Inherited Members
Constructors
PaginatedInKindDonationClient(HttpClient, Uri)
Client for interacting with InKindDonation collection resources.
public PaginatedInKindDonationClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of InKindDonation resources asynchronously.
public Task<InKindDonationCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<InKindDonationCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of InKindDonation resources.
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
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public InKindDonationClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public InKindDonationClient OrderByCreatedAtDescending()
Returns
OrderByReceivedOn()
Sort response items by the ReceivedOn attribute.
public InKindDonationClient OrderByReceivedOn()
Returns
OrderByReceivedOnDescending()
Sort response items by the ReceivedOn attribute. Use reverse order.
public InKindDonationClient OrderByReceivedOnDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public InKindDonationClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public InKindDonationClient OrderByUpdatedAtDescending()
Returns
PostAsync(InKindDonation, CancellationToken)
Creates a new InKindDonation resource asynchronously.
public Task<InKindDonationResponse> PostAsync(InKindDonation resource, CancellationToken cancellationToken = default)
Parameters
resourceInKindDonationThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<InKindDonationResponse>
A task representing the asynchronous operation, containing the created InKindDonation resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<InKindDonationResource>, CancellationToken)
Creates a new InKindDonation resource asynchronously.
public Task<InKindDonationResponse> PostAsync(JsonApiDocument<InKindDonationResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<InKindDonationResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<InKindDonationResponse>
A task representing the asynchronous operation, containing the created InKindDonation resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereCampusId(int)
Query response items by the CampusId attribute.
public InKindDonationClient WhereCampusId(int value)
Parameters
valueint
Returns
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public InKindDonationClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereFundId(int)
Query response items by the FundId attribute.
public InKindDonationClient WhereFundId(int value)
Parameters
valueint
Returns
WhereReceivedOn(DateOnly)
Query response items by the ReceivedOn attribute.
public InKindDonationClient WhereReceivedOn(DateOnly value)
Parameters
valueDateOnly
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public InKindDonationClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a InKindDonation client for a specific resource ID.
public InKindDonationClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- InKindDonationClient
A new instance of the resource client for the specified resource ID.