Table of Contents

Class PledgeClient

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

Client for interacting with the Pledge resource.

public class PledgeClient : SingletonResourceClient<Pledge, PledgeResource, PledgeResponse>
Inheritance
PledgeClient
Inherited Members

Constructors

PledgeClient(HttpClient, Uri)

Client for interacting with the Pledge resource.

public PledgeClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

JointGiver

Associated JointGiver.

public PersonClient JointGiver { get; }

Property Value

PersonClient

PledgeCampaign

Associated PledgeCampaign.

public PledgeCampaignClient PledgeCampaign { get; }

Property Value

PledgeCampaignClient

Methods

DeleteAsync(CancellationToken)

Deletes the Pledge 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 Pledge resource asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeResponse>

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

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

PatchAsync(Pledge, CancellationToken)

Updates an existing Pledge resource asynchronously.

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

Parameters

resource Pledge

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<PledgeResource>, CancellationToken)

Updates an existing Pledge resource asynchronously.

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

Parameters

document JsonApiDocument<PledgeResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PledgeResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.