Table of Contents

Class DonationClient

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

Client for interacting with the Donation resource.

public class DonationClient : SingletonResourceClient<Donation, DonationResource, DonationResponse>
Inheritance
DonationClient
Inherited Members

Constructors

DonationClient(HttpClient, Uri)

Client for interacting with the Donation resource.

public DonationClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Campus

Associated Campus.

public PaginatedCampusClient Campus { get; }

Property Value

PaginatedCampusClient

Designations

Associated Designations.

public PaginatedDesignationClient Designations { get; }

Property Value

PaginatedDesignationClient

Labels

Associated Labels.

public PaginatedLabelClient Labels { get; }

Property Value

PaginatedLabelClient

Note

Associated Note.

public NoteClient Note { get; }

Property Value

NoteClient

Refund

Associated Refund.

public RefundClient Refund { get; }

Property Value

RefundClient

Methods

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<DonationResponse>

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

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

IssueRefundAsync(CancellationToken)

Used to refund a batch donation
This action refunds a batch donation.
It will respond with unprocessable_entity if the donation cannot be refunded, or if the donation is not part of a batch.

refunded_at is optional, but recommended for data accuracy.

<code>json<br />{<br /> "data": {<br /> "attributes": {<br /> "refunded_at": "1959-02-03"<br /> }<br /> }<br />}<br /></code>

public Task IssueRefundAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

PatchAsync(Donation, CancellationToken)

Updates an existing Donation resource asynchronously.

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

Parameters

resource Donation

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<DonationResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<DonationResource>, CancellationToken)

Updates an existing Donation resource asynchronously.

public Task<DonationResponse> PatchAsync(JsonApiDocument<DonationResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<DonationResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<DonationResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.