Class PaginatedPledgeClient
- Namespace
- Crews.PlanningCenter.Api.Giving.V2019_10_18
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Pledge collection resources.
public class PaginatedPledgeClient : PaginatedResourceClient<Pledge, PledgeResource, PledgeCollectionResponse, PledgeResponse>
- Inheritance
-
PaginatedPledgeClient
- Inherited Members
Constructors
PaginatedPledgeClient(HttpClient, Uri)
Client for interacting with Pledge collection resources.
public PaginatedPledgeClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Pledge resources asynchronously.
public Task<PledgeCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PledgeCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Pledge resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeJointGiver()
Include related JointGiver resources in the response.
public PledgeClient IncludeJointGiver()
Returns
IncludePledgeCampaign()
Include related PledgeCampaign resources in the response.
public PledgeClient IncludePledgeCampaign()
Returns
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public PledgeClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public PledgeClient OrderByCreatedAtDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public PledgeClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public PledgeClient OrderByUpdatedAtDescending()
Returns
PostAsync(Pledge, CancellationToken)
Creates a new Pledge resource asynchronously.
public Task<PledgeResponse> PostAsync(Pledge resource, CancellationToken cancellationToken = default)
Parameters
resourcePledgeThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PledgeResponse>
A task representing the asynchronous operation, containing the created Pledge resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<PledgeResource>, CancellationToken)
Creates a new Pledge resource asynchronously.
public Task<PledgeResponse> PostAsync(JsonApiDocument<PledgeResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<PledgeResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PledgeResponse>
A task representing the asynchronous operation, containing the created Pledge resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public PledgeClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public PledgeClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a Pledge client for a specific resource ID.
public PledgeClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- PledgeClient
A new instance of the resource client for the specified resource ID.