deleteUsers method

Future<TDeleteUsersResponse> deleteUsers({
  1. required TDeleteUsersBody input,
})

Delete users within an organization.

Sign the provided TDeleteUsersBody with the client's stamp function and submit the request (POST /public/v1/submit/delete_users).

See also: stampDeleteUsers.

Implementation

Future<TDeleteUsersResponse> deleteUsers({
  required TDeleteUsersBody input,
}) async {
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_DELETE_USERS',
  );
  return await request<Map<String, dynamic>, TDeleteUsersResponse>(
      "/public/v1/submit/delete_users",
      body,
      (json) => TDeleteUsersResponse.fromJson(
          transformActivityResponse(json, 'DeleteUsers')));
}