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
httpClientHttpClienturiUri
Properties
Fund
Associated Fund.
public FundClient Fund { get; }
Property Value
Pledges
Associated Pledges.
public PaginatedPledgeClient Pledges { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the PledgeCampaign 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 PledgeCampaign resource asynchronously.
public Task<PledgeCampaignResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
PatchAsync(PledgeCampaign, CancellationToken)
Updates an existing PledgeCampaign resource asynchronously.
public Task<PledgeCampaignResponse> PatchAsync(PledgeCampaign resource, CancellationToken cancellationToken = default)
Parameters
resourcePledgeCampaignThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<PledgeCampaignResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.