Table of Contents

Class BatchGroupClient

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

Client for interacting with the BatchGroup resource.

public class BatchGroupClient : SingletonResourceClient<BatchGroup, BatchGroupResource, BatchGroupResponse>
Inheritance
BatchGroupClient
Inherited Members

Constructors

BatchGroupClient(HttpClient, Uri)

Client for interacting with the BatchGroup resource.

public BatchGroupClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Batches

Associated Batches.

public PaginatedBatchClient Batches { get; }

Property Value

PaginatedBatchClient

Owner

Associated Owner.

public PersonClient Owner { get; }

Property Value

PersonClient

Methods

CommitAsync(CancellationToken)

Used to commit an in progress batch group.
This action takes an uncommitted BatchGroup and commits it.
It will respond with unprocessable_entity if the BatchGroup cannot be committed.

It does not expect a body.

Committing a BatchGroup happens asyncronously, so initially the BatchGroup's status will be updating.
You can poll that BatchGroup's endpoint to see whether it's changed from updating to committed.

public Task CommitAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<BatchGroupResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeOwner()

Include related Owner resources in the response.

public BatchGroupClient IncludeOwner()

Returns

BatchGroupClient

PatchAsync(BatchGroup, CancellationToken)

Updates an existing BatchGroup resource asynchronously.

public Task<BatchGroupResponse> PatchAsync(BatchGroup resource, CancellationToken cancellationToken = default)

Parameters

resource BatchGroup

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<BatchGroupResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<BatchGroupResource>, CancellationToken)

Updates an existing BatchGroup resource asynchronously.

public Task<BatchGroupResponse> PatchAsync(JsonApiDocument<BatchGroupResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<BatchGroupResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<BatchGroupResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.