Class WebhookSubscriptionClient
- Namespace
- Crews.PlanningCenter.Api.Webhooks.V2022_10_20
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the WebhookSubscription resource.
public class WebhookSubscriptionClient : SingletonResourceClient<WebhookSubscription, WebhookSubscriptionResource, WebhookSubscriptionResponse>
- Inheritance
-
SingletonResourceClient<WebhookSubscription, WebhookSubscriptionResource, WebhookSubscriptionResponse>WebhookSubscriptionClient
- Inherited Members
Constructors
WebhookSubscriptionClient(HttpClient, Uri)
Client for interacting with the WebhookSubscription resource.
public WebhookSubscriptionClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Events
Associated Events.
public PaginatedEventClient Events { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the WebhookSubscription 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 WebhookSubscription resource asynchronously.
public Task<WebhookSubscriptionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<WebhookSubscriptionResponse>
A task representing the asynchronous operation, containing the WebhookSubscription resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(WebhookSubscription, CancellationToken)
Updates an existing WebhookSubscription resource asynchronously.
public Task<WebhookSubscriptionResponse> PatchAsync(WebhookSubscription resource, CancellationToken cancellationToken = default)
Parameters
resourceWebhookSubscriptionThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<WebhookSubscriptionResponse>
A task representing the asynchronous operation, containing the updated WebhookSubscription resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<WebhookSubscriptionResource>, CancellationToken)
Updates an existing WebhookSubscription resource asynchronously.
public Task<WebhookSubscriptionResponse> PatchAsync(JsonApiDocument<WebhookSubscriptionResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<WebhookSubscriptionResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<WebhookSubscriptionResponse>
A task representing the asynchronous operation, containing the updated WebhookSubscription resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
RotateSecretAsync(CancellationToken)
Planning Center does not provide a description for this action.
public Task RotateSecretAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken