Class PaymentSourceClient
- Namespace
- Crews.PlanningCenter.Api.Giving.V2019_10_18
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the PaymentSource resource.
public class PaymentSourceClient : SingletonResourceClient<PaymentSource, PaymentSourceResource, PaymentSourceResponse>
- Inheritance
-
PaymentSourceClient
- Inherited Members
Constructors
PaymentSourceClient(HttpClient, Uri)
Client for interacting with the PaymentSource resource.
public PaymentSourceClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Donations
Associated Donations.
public PaginatedDonationClient Donations { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the PaymentSource 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 PaymentSource resource asynchronously.
public Task<PaymentSourceResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PaymentSourceResponse>
A task representing the asynchronous operation, containing the PaymentSource resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(PaymentSource, CancellationToken)
Updates an existing PaymentSource resource asynchronously.
public Task<PaymentSourceResponse> PatchAsync(PaymentSource resource, CancellationToken cancellationToken = default)
Parameters
resourcePaymentSourceThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PaymentSourceResponse>
A task representing the asynchronous operation, containing the updated PaymentSource resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<PaymentSourceResource>, CancellationToken)
Updates an existing PaymentSource resource asynchronously.
public Task<PaymentSourceResponse> PatchAsync(JsonApiDocument<PaymentSourceResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<PaymentSourceResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PaymentSourceResponse>
A task representing the asynchronous operation, containing the updated PaymentSource resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.