Table of Contents

Class SubscriptionClient

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

Client for interacting with the Subscription resource.

[Obsolete("This resource is deprecated and may be removed in a future version.")]
public class SubscriptionClient : SingletonResourceClient<Subscription, SubscriptionResource, SubscriptionResponse>
Inheritance
SubscriptionClient
Inherited Members

Constructors

SubscriptionClient(HttpClient, Uri)

Client for interacting with the Subscription resource.

public SubscriptionClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Events

Associated Events.

[Obsolete("This endpoint is deprecated and may be removed in a future release.")]
public PaginatedEventClient Events { get; }

Property Value

PaginatedEventClient

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public SubscriptionClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

SubscriptionClient

The current SubscriptionClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public SubscriptionClient ClearParameters()

Returns

SubscriptionClient

The current SubscriptionClient instance.

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<SubscriptionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(Subscription, CancellationToken)

Updates an existing Subscription resource asynchronously.

public Task<SubscriptionResponse> PatchAsync(Subscription resource, CancellationToken cancellationToken = default)

Parameters

resource Subscription

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<SubscriptionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<SubscriptionResource>, CancellationToken)

Updates an existing Subscription resource asynchronously.

public Task<SubscriptionResponse> PatchAsync(JsonApiDocument<SubscriptionResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<SubscriptionResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<SubscriptionResponse>

A task representing the asynchronous operation, containing the updated Subscription 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.

[Obsolete("This action is deprecated and may be removed in a future release.")]
public Task RotateSecretAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task