listInvitationsWithHttpInfo method
List all invitations
Returns all non-revoked invitations for your application, sorted by creation date
Note: This method returns the HTTP Response
.
Parameters:
-
String status: Filter invitations based on their status
-
String query: Filter invitations based on their
email_address
orid
-
String orderBy: Allows to return organizations in a particular order. At the moment, you can order the returned organizations either by their
name
,created_at
ormembers_count
. In order to specify the direction, you can use the+/-
symbols prepended in the property to order by. For example, if you want organizations to be returned in descending order according to theircreated_at
property, you can use-created_at
. If you don't use+
or-
, then+
is implied. -
bool paginated: Whether to paginate the results. If true, the results will be paginated. If false, the results will not be paginated.
-
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
.
Implementation
Future<http.Response> listInvitationsWithHttpInfo({
String? status,
String? query,
String? orderBy,
bool? paginated,
int? limit,
int? offset,
}) async {
// ignore: prefer_const_declarations
final path = r'/invitations';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (status != null) {
queryParams.addAll(_queryParams('', 'status', status));
}
if (query != null) {
queryParams.addAll(_queryParams('', 'query', query));
}
if (orderBy != null) {
queryParams.addAll(_queryParams('', 'order_by', orderBy));
}
if (paginated != null) {
queryParams.addAll(_queryParams('', 'paginated', paginated));
}
if (limit != null) {
queryParams.addAll(_queryParams('', 'limit', limit));
}
if (offset != null) {
queryParams.addAll(_queryParams('', 'offset', offset));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}