Table of Contents

Class PaginatedPledgeClient

Namespace
Crews.PlanningCenter.Api.Giving.V2019_10_18
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with Pledge collection resources.

public class PaginatedPledgeClient : PaginatedResourceClient<Pledge, PledgeResource, PledgeCollectionResponse, PledgeResponse>
Inheritance
PaginatedPledgeClient
Inherited Members

Constructors

PaginatedPledgeClient(HttpClient, Uri)

Client for interacting with Pledge collection resources.

public PaginatedPledgeClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of Pledge resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeCollectionResponse>

A task representing the asynchronous operation, containing a paginated list of Pledge resources.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeJointGiver()

Include related JointGiver resources in the response.

public PledgeClient IncludeJointGiver()

Returns

PledgeClient

IncludePledgeCampaign()

Include related PledgeCampaign resources in the response.

public PledgeClient IncludePledgeCampaign()

Returns

PledgeClient

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public PledgeClient OrderByCreatedAt()

Returns

PledgeClient

OrderByCreatedAtDescending()

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

public PledgeClient OrderByCreatedAtDescending()

Returns

PledgeClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public PledgeClient OrderByUpdatedAt()

Returns

PledgeClient

OrderByUpdatedAtDescending()

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

public PledgeClient OrderByUpdatedAtDescending()

Returns

PledgeClient

PostAsync(Pledge, CancellationToken)

Creates a new Pledge resource asynchronously.

public Task<PledgeResponse> PostAsync(Pledge resource, CancellationToken cancellationToken = default)

Parameters

resource Pledge

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeResponse>

A task representing the asynchronous operation, containing the created Pledge resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<PledgeResource>, CancellationToken)

Creates a new Pledge resource asynchronously.

public Task<PledgeResponse> PostAsync(JsonApiDocument<PledgeResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<PledgeResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeResponse>

A task representing the asynchronous operation, containing the created Pledge resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereCreatedAt(DateTime)

Query response items by the CreatedAt attribute.

public PledgeClient WhereCreatedAt(DateTime value)

Parameters

value DateTime

Returns

PledgeClient

WhereUpdatedAt(DateTime)

Query response items by the UpdatedAt attribute.

public PledgeClient WhereUpdatedAt(DateTime value)

Parameters

value DateTime

Returns

PledgeClient

WithId(string)

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

public PledgeClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

PledgeClient

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