listWaitlistEntries method
List all waitlist entries
Retrieve a list of waitlist entries for the instance. Entries are ordered by creation date in descending order by default. Supports filtering by email address or status and pagination with limit and offset parameters.
Parameters:
-
int limit: Applies a limit to the number of results returned. Can be used for paginating the results together with
offset
. -
int offset: Skip the first
offset
results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction withlimit
. -
String query: Filter waitlist entries by
email_address
orid
-
String status: Filter waitlist entries by their status
-
String orderBy: Specify the order of results. Supported values are: -
created_at
-email_address
-invited_at
Use+
for ascending or-
for descending order. Defaults to-created_at
.
Implementation
Future<ListWaitlistEntries200Response?> listWaitlistEntries({
int? limit,
int? offset,
String? query,
String? status,
String? orderBy,
}) async {
final response = await listWaitlistEntriesWithHttpInfo(
limit: limit,
offset: offset,
query: query,
status: status,
orderBy: orderBy,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ListWaitlistEntries200Response',
) as ListWaitlistEntries200Response;
}
return null;
}