Table of Contents

Class MembershipClient

Namespace
Crews.PlanningCenter.Api.Groups.V2023_07_10
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with the Membership resource.

public class MembershipClient : SingletonResourceClient<Membership, MembershipResource, MembershipResponse>
Inheritance
MembershipClient
Inherited Members

Constructors

MembershipClient(HttpClient, Uri)

Client for interacting with the Membership resource.

public MembershipClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Group

Associated Group.

public GroupClient Group { get; }

Property Value

GroupClient

Person

Associated Person.

public PersonClient Person { get; }

Property Value

PersonClient

Methods

DeleteAsync(CancellationToken)

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

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MembershipResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludePerson()

Include related Person resources in the response.

public MembershipClient IncludePerson()

Returns

MembershipClient

PatchAsync(Membership, CancellationToken)

Updates an existing Membership resource asynchronously.

public Task<MembershipResponse> PatchAsync(Membership resource, CancellationToken cancellationToken = default)

Parameters

resource Membership

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MembershipResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<MembershipResource>, CancellationToken)

Updates an existing Membership resource asynchronously.

public Task<MembershipResponse> PatchAsync(JsonApiDocument<MembershipResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<MembershipResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MembershipResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.