usersGetOrganizationInvitationsWithHttpInfo method
Retrieve all invitations for a user
Retrieve a paginated list of the user's organization invitations
Note: This method returns the HTTP Response
.
Parameters:
-
String userId (required): The ID of the user whose organization invitations we want to retrieve
-
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 status: Filter organization invitations based on their status
Implementation
Future<http.Response> usersGetOrganizationInvitationsWithHttpInfo(
String userId, {
int? limit,
int? offset,
String? status,
}) async {
// ignore: prefer_const_declarations
final path = r'/users/{user_id}/organization_invitations'
.replaceAll('{user_id}', userId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (limit != null) {
queryParams.addAll(_queryParams('', 'limit', limit));
}
if (offset != null) {
queryParams.addAll(_queryParams('', 'offset', offset));
}
if (status != null) {
queryParams.addAll(_queryParams('', 'status', status));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}