ResponsePage<T>
The ResponsePage<T>
class represents a paged response from the GoCardless API.
Properties
Count
- uint
The total number of items that can be accessed via the paged responses (not necessarily through the current page).
Next
- Uri?
The URI of the next response page.
Previous
- Uri?
The URI of the last response page.
Results
- List<T>
The results that were fetched with this page.
Constructor
public ResponsePage(uint count, Uri? next, Uri? previous, List<T> results)
Parameters
count
- uint
The total number of items that can be accessed via the paged responses (not necessarily through the current page).
next
- Uri?
The URI of the next response page.
previous
- Uri?
The URI of the last response page.
results
- List<T>
Methods
GetNextPage
Gets the next ResponsePage<T>
, linked to the current one.
public async Task<NordigenApiResponse<ResponsePage<T>, BasicResponse>?>
GetNextPage(NordigenClient nordigenClient, CancellationToken cancellationToken = default)
Parameters
nordigenClient
- NordigenClient
The client to use to retrieve the page.
cancellationToken
- CancellationToken
A token to signal cancellation of the operation.
Returns
Task<NordigenApiResponse<ResponsePage<T>, BasicResponse>?>
A NordigenApiResponse
containing either the next ResponsePage<T>
or null if there is no next page to retrieve (if the request is successful).
GetPreviousPage
Gets the previous ResponsePage<T>
, linked to the current one.
public async Task<NordigenApiResponse<ResponsePage<T>, BasicResponse>?>
GetPreviousPage(NordigenClient nordigenClient, CancellationToken cancellationToken = default)
Parameters
nordigenClient
- NordigenClient
The client to use to retrieve the page.
cancellationToken
- CancellationToken
A token to signal cancellation of the operation.
Returns
Task<NordigenApiResponse<ResponsePage<T>, BasicResponse>?>
A NordigenApiResponse
containing either the previous ResponsePage<T>
or null if there is no previous page to retrieve (if the request is successful).