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
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedInKindDonationClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedInKindDonationClient
The current PaginatedInKindDonationClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedInKindDonationClient ClearParameters()
Returns
- PaginatedInKindDonationClient
The current PaginatedInKindDonationClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedInKindDonationClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedInKindDonationClient
The current PaginatedInKindDonationClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
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
Offset(int)
Sets the item offset in the paginated response.
public PaginatedInKindDonationClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedInKindDonationClient
The current PaginatedInKindDonationClient instance.
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
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedInKindDonationClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedInKindDonationClient
The current PaginatedInKindDonationClient instance.
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.