Class PaginatedDonationClient
- Namespace
- Crews.PlanningCenter.Api.Giving.V2019_10_18
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Donation collection resources.
public class PaginatedDonationClient : PaginatedResourceClient<Donation, DonationResource, DonationCollectionResponse, DonationResponse>
- Inheritance
-
PaginatedDonationClient
- Inherited Members
Constructors
PaginatedDonationClient(HttpClient, Uri)
Client for interacting with Donation collection resources.
public PaginatedDonationClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Donation resources asynchronously.
public Task<DonationCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<DonationCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Donation resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeDesignations()
Include related Designations resources in the response.
public DonationClient IncludeDesignations()
Returns
IncludeLabels()
Include related Labels resources in the response.
public DonationClient IncludeLabels()
Returns
IncludeNote()
Include related Note resources in the response.
public DonationClient IncludeNote()
Returns
IncludeRefund()
Include related Refund resources in the response.
public DonationClient IncludeRefund()
Returns
OrderByCompletedAt()
Sort response items by the CompletedAt attribute.
public DonationClient OrderByCompletedAt()
Returns
OrderByCompletedAtDescending()
Sort response items by the CompletedAt attribute. Use reverse order.
public DonationClient OrderByCompletedAtDescending()
Returns
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public DonationClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public DonationClient OrderByCreatedAtDescending()
Returns
OrderByReceivedAt()
Sort response items by the ReceivedAt attribute.
public DonationClient OrderByReceivedAt()
Returns
OrderByReceivedAtDescending()
Sort response items by the ReceivedAt attribute. Use reverse order.
public DonationClient OrderByReceivedAtDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public DonationClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public DonationClient OrderByUpdatedAtDescending()
Returns
PostAsync(Donation, CancellationToken)
Creates a new Donation resource asynchronously.
public Task<DonationResponse> PostAsync(Donation resource, CancellationToken cancellationToken = default)
Parameters
resourceDonationThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<DonationResponse>
A task representing the asynchronous operation, containing the created Donation resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<DonationResource>, CancellationToken)
Creates a new Donation resource asynchronously.
public Task<DonationResponse> PostAsync(JsonApiDocument<DonationResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<DonationResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<DonationResponse>
A task representing the asynchronous operation, containing the created Donation resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereCompletedAt(DateTime)
Query response items by the CompletedAt attribute.
public DonationClient WhereCompletedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public DonationClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WherePaymentMethod(string)
Query response items by the PaymentMethod attribute.
public DonationClient WherePaymentMethod(string value)
Parameters
valuestring
Returns
WhereReceivedAt(DateTime)
Query response items by the ReceivedAt attribute.
public DonationClient WhereReceivedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public DonationClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a Donation client for a specific resource ID.
public DonationClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- DonationClient
A new instance of the resource client for the specified resource ID.