Class PaginatedPledgeCampaignClient
- Namespace
- Crews.PlanningCenter.Api.Giving.V2019_10_18
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with PledgeCampaign collection resources.
public class PaginatedPledgeCampaignClient : PaginatedResourceClient<PledgeCampaign, PledgeCampaignResource, PledgeCampaignCollectionResponse, PledgeCampaignResponse>
- Inheritance
-
PaginatedResourceClient<PledgeCampaign, PledgeCampaignResource, PledgeCampaignCollectionResponse, PledgeCampaignResponse>PaginatedPledgeCampaignClient
- Inherited Members
Constructors
PaginatedPledgeCampaignClient(HttpClient, Uri)
Client for interacting with PledgeCampaign collection resources.
public PaginatedPledgeCampaignClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of PledgeCampaign resources asynchronously.
public Task<PledgeCampaignCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PledgeCampaignCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of PledgeCampaign resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeFund()
Include related Fund resources in the response.
public PledgeCampaignClient IncludeFund()
Returns
OrderByEndsAt()
Sort response items by the EndsAt attribute.
public PledgeCampaignClient OrderByEndsAt()
Returns
OrderByEndsAtDescending()
Sort response items by the EndsAt attribute. Use reverse order.
public PledgeCampaignClient OrderByEndsAtDescending()
Returns
OrderByStartsAt()
Sort response items by the StartsAt attribute.
public PledgeCampaignClient OrderByStartsAt()
Returns
OrderByStartsAtDescending()
Sort response items by the StartsAt attribute. Use reverse order.
public PledgeCampaignClient OrderByStartsAtDescending()
Returns
PostAsync(PledgeCampaign, CancellationToken)
Creates a new PledgeCampaign resource asynchronously.
public Task<PledgeCampaignResponse> PostAsync(PledgeCampaign resource, CancellationToken cancellationToken = default)
Parameters
resourcePledgeCampaignThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PledgeCampaignResponse>
A task representing the asynchronous operation, containing the created PledgeCampaign resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<PledgeCampaignResource>, CancellationToken)
Creates a new PledgeCampaign resource asynchronously.
public Task<PledgeCampaignResponse> PostAsync(JsonApiDocument<PledgeCampaignResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<PledgeCampaignResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PledgeCampaignResponse>
A task representing the asynchronous operation, containing the created PledgeCampaign resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereEndsAt(DateTime)
Query response items by the EndsAt attribute.
public PledgeCampaignClient WhereEndsAt(DateTime value)
Parameters
valueDateTime
Returns
WhereFundId(int)
Query response items by the FundId attribute.
public PledgeCampaignClient WhereFundId(int value)
Parameters
valueint
Returns
WhereStartsAt(DateTime)
Query response items by the StartsAt attribute.
public PledgeCampaignClient WhereStartsAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a PledgeCampaign client for a specific resource ID.
public PledgeCampaignClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- PledgeCampaignClient
A new instance of the resource client for the specified resource ID.