Table of Contents

Class PaginatedPledgeCampaignClient

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

Client for interacting with PledgeCampaign collection resources.

public class PaginatedPledgeCampaignClient : PaginatedResourceClient<PledgeCampaign, PledgeCampaignResource, PledgeCampaignCollectionResponse, PledgeCampaignResponse>
Inheritance
PaginatedPledgeCampaignClient
Inherited Members

Constructors

PaginatedPledgeCampaignClient(HttpClient, Uri)

Client for interacting with PledgeCampaign collection resources.

public PaginatedPledgeCampaignClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of PledgeCampaign resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeCampaignCollectionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeFund()

Include related Fund resources in the response.

public PledgeCampaignClient IncludeFund()

Returns

PledgeCampaignClient

OrderByEndsAt()

Sort response items by the EndsAt attribute.

public PledgeCampaignClient OrderByEndsAt()

Returns

PledgeCampaignClient

OrderByEndsAtDescending()

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

public PledgeCampaignClient OrderByEndsAtDescending()

Returns

PledgeCampaignClient

OrderByStartsAt()

Sort response items by the StartsAt attribute.

public PledgeCampaignClient OrderByStartsAt()

Returns

PledgeCampaignClient

OrderByStartsAtDescending()

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

public PledgeCampaignClient OrderByStartsAtDescending()

Returns

PledgeCampaignClient

PostAsync(PledgeCampaign, CancellationToken)

Creates a new PledgeCampaign resource asynchronously.

public Task<PledgeCampaignResponse> PostAsync(PledgeCampaign resource, CancellationToken cancellationToken = default)

Parameters

resource PledgeCampaign

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeCampaignResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<PledgeCampaignResource>, CancellationToken)

Creates a new PledgeCampaign resource asynchronously.

public Task<PledgeCampaignResponse> PostAsync(JsonApiDocument<PledgeCampaignResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<PledgeCampaignResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeCampaignResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereEndsAt(DateTime)

Query response items by the EndsAt attribute.

public PledgeCampaignClient WhereEndsAt(DateTime value)

Parameters

value DateTime

Returns

PledgeCampaignClient

WhereFundId(int)

Query response items by the FundId attribute.

public PledgeCampaignClient WhereFundId(int value)

Parameters

value int

Returns

PledgeCampaignClient

WhereStartsAt(DateTime)

Query response items by the StartsAt attribute.

public PledgeCampaignClient WhereStartsAt(DateTime value)

Parameters

value DateTime

Returns

PledgeCampaignClient

WithId(string)

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

public PledgeCampaignClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

PledgeCampaignClient

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