Table of Contents

Class PledgeCampaignClient

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

Client for interacting with the PledgeCampaign resource.

public class PledgeCampaignClient : SingletonResourceClient<PledgeCampaign, PledgeCampaignResource, PledgeCampaignResponse>
Inheritance
PledgeCampaignClient
Inherited Members

Constructors

PledgeCampaignClient(HttpClient, Uri)

Client for interacting with the PledgeCampaign resource.

public PledgeCampaignClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Fund

Associated Fund.

public FundClient Fund { get; }

Property Value

FundClient

Pledges

Associated Pledges.

public PaginatedPledgeClient Pledges { get; }

Property Value

PaginatedPledgeClient

Methods

DeleteAsync(CancellationToken)

Deletes the PledgeCampaign resource asynchronously.

public Task DeleteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task

A task representing the asynchronous delete operation.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

GetAsync(CancellationToken)

Fetches the PledgeCampaign resource asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeCampaignResponse>

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

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

PatchAsync(PledgeCampaign, CancellationToken)

Updates an existing PledgeCampaign resource asynchronously.

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

Parameters

resource PledgeCampaign

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeCampaignResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<PledgeCampaignResource>, CancellationToken)

Updates an existing PledgeCampaign resource asynchronously.

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

Parameters

document JsonApiDocument<PledgeCampaignResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeCampaignResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.