Class AddressClient
- Namespace
- Crews.PlanningCenter.Api.People.V2020_07_22
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Address resource.
public class AddressClient : SingletonResourceClient<Address, AddressResource, AddressResponse>
- Inheritance
-
AddressClient
- Inherited Members
Constructors
AddressClient(HttpClient, Uri)
Client for interacting with the Address resource.
public AddressClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
DeleteAsync(CancellationToken)
Deletes the Address 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 Address resource asynchronously.
public Task<AddressResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<AddressResponse>
A task representing the asynchronous operation, containing the Address resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(Address, CancellationToken)
Updates an existing Address resource asynchronously.
public Task<AddressResponse> PatchAsync(Address resource, CancellationToken cancellationToken = default)
Parameters
resourceAddressThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<AddressResponse>
A task representing the asynchronous operation, containing the updated Address resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<AddressResource>, CancellationToken)
Updates an existing Address resource asynchronously.
public Task<AddressResponse> PatchAsync(JsonApiDocument<AddressResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<AddressResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<AddressResponse>
A task representing the asynchronous operation, containing the updated Address resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.