listOrganizationInvitationsWithHttpInfo method

Future<Response> listOrganizationInvitationsWithHttpInfo(
  1. String organizationId, {
  2. String? status,
  3. String? emailAddress,
  4. String? orderBy,
  5. int? limit,
  6. int? offset,
})

Get a list of organization invitations

This request returns the list of organization invitations. Results can be paginated using the optional limit and offset query parameters. You can filter them by providing the 'status' query parameter, that accepts multiple values. The organization invitations are ordered by descending creation date. Most recent invitations will be returned first. Any invitations created as a result of an Organization Domain are not included in the results.

Note: This method returns the HTTP Response.

Parameters:

  • String organizationId (required): The organization ID.

  • String status: Filter organization invitations based on their status

  • String emailAddress: Returns organization invitations inviting the specified email address.

  • String orderBy: Allows to return organization invitations in a particular order. You can order the returned organization invitations either by their created_at or email_address. In order to specify the direction, you can use the +/- symbols prepended in the property to order by. For example, if you want organization invitations to be returned in descending order according to their created_at property, you can use -created_at. If you don't use + or -, then + is implied. Defaults to -created_at.

  • 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 with limit.

Implementation

Future<http.Response> listOrganizationInvitationsWithHttpInfo(
  String organizationId, {
  String? status,
  String? emailAddress,
  String? orderBy,
  int? limit,
  int? offset,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/organizations/{organization_id}/invitations'
      .replaceAll('{organization_id}', organizationId);

  // 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 (emailAddress != null) {
    queryParams.addAll(_queryParams('', 'email_address', emailAddress));
  }
  if (orderBy != null) {
    queryParams.addAll(_queryParams('', 'order_by', orderBy));
  }
  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,
  );
}