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
httpClientHttpClienturiUri
Properties
Group
Associated Group.
public GroupClient Group { get; }
Property Value
Person
Associated Person.
public PersonClient Person { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Membership 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 Membership resource asynchronously.
public Task<MembershipResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
PatchAsync(Membership, CancellationToken)
Updates an existing Membership resource asynchronously.
public Task<MembershipResponse> PatchAsync(Membership resource, CancellationToken cancellationToken = default)
Parameters
resourceMembershipThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<MembershipResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.