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
httpClientHttpClienturiUri
Properties
JointGiver
Associated JointGiver.
public PersonClient JointGiver { get; }
Property Value
PledgeCampaign
Associated PledgeCampaign.
public PledgeCampaignClient PledgeCampaign { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Pledge resource asynchronously.
public Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
cancellationTokenCancellationTokenA 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
IncludePledgeCampaign()
Include related PledgeCampaign resources in the response.
public PledgeClient IncludePledgeCampaign()
Returns
PatchAsync(Pledge, CancellationToken)
Updates an existing Pledge resource asynchronously.
public Task<PledgeResponse> PatchAsync(Pledge resource, CancellationToken cancellationToken = default)
Parameters
resourcePledgeThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<PledgeResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.