Table of Contents

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

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedDonationClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

PaginatedDonationClient

The current PaginatedDonationClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public PaginatedDonationClient ClearParameters()

Returns

PaginatedDonationClient

The current PaginatedDonationClient instance.

Filter(string)

Adds a filter query parameter to the request.

public PaginatedDonationClient Filter(string filter)

Parameters

filter string

The filter criteria.

Returns

PaginatedDonationClient

The current PaginatedDonationClient instance.

Remarks

See Planning Center API documentation for details on supported filter values for this resource.

GetAsync(CancellationToken)

Fetches a paginated list of Donation resources asynchronously.

public Task<DonationCollectionResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A 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

DonationClient

IncludeLabels()

Include related Labels resources in the response.

public DonationClient IncludeLabels()

Returns

DonationClient

IncludeNote()

Include related Note resources in the response.

public DonationClient IncludeNote()

Returns

DonationClient

IncludeRefund()

Include related Refund resources in the response.

public DonationClient IncludeRefund()

Returns

DonationClient

Offset(int)

Sets the item offset in the paginated response.

public PaginatedDonationClient Offset(int count)

Parameters

count int

The number of items to skip.

Returns

PaginatedDonationClient

The current PaginatedDonationClient instance.

OrderByCompletedAt()

Sort response items by the CompletedAt attribute.

public DonationClient OrderByCompletedAt()

Returns

DonationClient

OrderByCompletedAtDescending()

Sort response items by the CompletedAt attribute. Use reverse order.

public DonationClient OrderByCompletedAtDescending()

Returns

DonationClient

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public DonationClient OrderByCreatedAt()

Returns

DonationClient

OrderByCreatedAtDescending()

Sort response items by the CreatedAt attribute. Use reverse order.

public DonationClient OrderByCreatedAtDescending()

Returns

DonationClient

OrderByReceivedAt()

Sort response items by the ReceivedAt attribute.

public DonationClient OrderByReceivedAt()

Returns

DonationClient

OrderByReceivedAtDescending()

Sort response items by the ReceivedAt attribute. Use reverse order.

public DonationClient OrderByReceivedAtDescending()

Returns

DonationClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public DonationClient OrderByUpdatedAt()

Returns

DonationClient

OrderByUpdatedAtDescending()

Sort response items by the UpdatedAt attribute. Use reverse order.

public DonationClient OrderByUpdatedAtDescending()

Returns

DonationClient

PerPage(int)

Sets the number of items to be returned per page in the paginated response.

public PaginatedDonationClient PerPage(int count)

Parameters

count int

The number of items to be returned per page.

Returns

PaginatedDonationClient

The current PaginatedDonationClient instance.

PostAsync(Donation, CancellationToken)

Creates a new Donation resource asynchronously.

public Task<DonationResponse> PostAsync(Donation resource, CancellationToken cancellationToken = default)

Parameters

resource Donation

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<DonationResource>

The JSON:API document to be sent in the POST request.

cancellationToken CancellationToken

A 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

value DateTime

Returns

DonationClient

WhereCreatedAt(DateTime)

Query response items by the CreatedAt attribute.

public DonationClient WhereCreatedAt(DateTime value)

Parameters

value DateTime

Returns

DonationClient

WherePaymentMethod(string)

Query response items by the PaymentMethod attribute.

public DonationClient WherePaymentMethod(string value)

Parameters

value string

Returns

DonationClient

WhereReceivedAt(DateTime)

Query response items by the ReceivedAt attribute.

public DonationClient WhereReceivedAt(DateTime value)

Parameters

value DateTime

Returns

DonationClient

WhereUpdatedAt(DateTime)

Query response items by the UpdatedAt attribute.

public DonationClient WhereUpdatedAt(DateTime value)

Parameters

value DateTime

Returns

DonationClient

WithId(string)

Creates a new instance of a Donation client for a specific resource ID.

public DonationClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

DonationClient

A new instance of the resource client for the specified resource ID.