Class MembershipTypeClient
- Namespace
- Crews.PlanningCenter.Api.People.V2022_07_14
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the MembershipType resource.
public class MembershipTypeClient : SingletonResourceClient<MembershipType, MembershipTypeResource, MembershipTypeResponse>
- Inheritance
-
MembershipTypeClient
- Inherited Members
Constructors
MembershipTypeClient(HttpClient, Uri)
Client for interacting with the MembershipType resource.
public MembershipTypeClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public MembershipTypeClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- MembershipTypeClient
The current MembershipTypeClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public MembershipTypeClient ClearParameters()
Returns
- MembershipTypeClient
The current MembershipTypeClient instance.
DeleteAsync(CancellationToken)
Deletes the MembershipType 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 MembershipType resource asynchronously.
public Task<MembershipTypeResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<MembershipTypeResponse>
A task representing the asynchronous operation, containing the MembershipType resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(MembershipType, CancellationToken)
Updates an existing MembershipType resource asynchronously.
public Task<MembershipTypeResponse> PatchAsync(MembershipType resource, CancellationToken cancellationToken = default)
Parameters
resourceMembershipTypeThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<MembershipTypeResponse>
A task representing the asynchronous operation, containing the updated MembershipType resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<MembershipTypeResource>, CancellationToken)
Updates an existing MembershipType resource asynchronously.
public Task<MembershipTypeResponse> PatchAsync(JsonApiDocument<MembershipTypeResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<MembershipTypeResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<MembershipTypeResponse>
A task representing the asynchronous operation, containing the updated MembershipType resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.