Class PaymentMethodClient
- Namespace
- Crews.PlanningCenter.Api.Giving.V2019_10_18
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the PaymentMethod resource.
public class PaymentMethodClient : SingletonResourceClient<PaymentMethod, PaymentMethodResource, PaymentMethodResponse>
- Inheritance
-
PaymentMethodClient
- Inherited Members
Constructors
PaymentMethodClient(HttpClient, Uri)
Client for interacting with the PaymentMethod resource.
public PaymentMethodClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
RecurringDonations
Associated RecurringDonations.
public PaginatedRecurringDonationClient RecurringDonations { get; }
Property Value
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaymentMethodClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaymentMethodClient
The current PaymentMethodClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaymentMethodClient ClearParameters()
Returns
- PaymentMethodClient
The current PaymentMethodClient instance.
GetAsync(CancellationToken)
Fetches the PaymentMethod resource asynchronously.
public Task<PaymentMethodResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PaymentMethodResponse>
A task representing the asynchronous operation, containing the PaymentMethod resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.