getOrganizationWithHttpInfo method

Future<Response> getOrganizationWithHttpInfo(
  1. String organizationId, {
  2. bool? includeMembersCount,
  3. bool? includeMissingMemberWithElevatedPermissions,
})

Retrieve an organization by ID or slug

Fetches the organization whose ID or slug matches the provided id_or_slug URL query parameter.

Note: This method returns the HTTP Response.

Parameters:

  • String organizationId (required): The ID or slug of the organization

  • bool includeMembersCount: Flag to denote whether or not the organization's members count should be included in the response.

  • bool includeMissingMemberWithElevatedPermissions: Flag to denote whether or not to include a member with elevated permissions who is not currently a member of the organization.

Implementation

Future<http.Response> getOrganizationWithHttpInfo(
  String organizationId, {
  bool? includeMembersCount,
  bool? includeMissingMemberWithElevatedPermissions,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/organizations/{organization_id}'
      .replaceAll('{organization_id}', organizationId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (includeMembersCount != null) {
    queryParams.addAll(
        _queryParams('', 'include_members_count', includeMembersCount));
  }
  if (includeMissingMemberWithElevatedPermissions != null) {
    queryParams.addAll(_queryParams(
        '',
        'include_missing_member_with_elevated_permissions',
        includeMissingMemberWithElevatedPermissions));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}