instanceGetOrganizationMembershipsWithHttpInfo method

Future<Response> instanceGetOrganizationMembershipsWithHttpInfo({
  1. String? orderBy,
  2. int? limit,
  3. int? offset,
})

Get a list of all organization memberships within an instance.

Retrieves all organization user memberships for the given instance.

Note: This method returns the HTTP Response.

Parameters:

  • String orderBy: Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username. By prepending one of those values with + or -, we can choose to sort in ascending (ASC) or descending (DESC) order.

  • 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> instanceGetOrganizationMembershipsWithHttpInfo({
  String? orderBy,
  int? limit,
  int? offset,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/organization_memberships';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  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,
  );
}