pub struct UsersService { /* private fields */ }users only.Expand description
Typed access to the users API v2 surface (7 operations). Obtained via
Ghl::users.
Implementations§
Source§impl UsersService
impl UsersService
Sourcepub async fn get_user_by_location(
&self,
params: &GetUserByLocationParams,
) -> Result<LocationSuccessfulResponseDto>
pub async fn get_user_by_location( &self, params: &GetUserByLocationParams, ) -> Result<LocationSuccessfulResponseDto>
Get User by Location
Deprecated. Use GET /users/search instead. Pass locationId as a query parameter
to filter results by location, along with the required companyId and other search
filters as needed.
GET /users/
Requires scope: users.readonly.
Sourcepub async fn create_user(
&self,
body: &CreateUserDto,
) -> Result<UserSuccessfulResponseDto>
pub async fn create_user( &self, body: &CreateUserDto, ) -> Result<UserSuccessfulResponseDto>
Create User
POST /users/
Requires scope: users.write.
Sourcepub async fn search_users(
&self,
params: &SearchUsersParams,
) -> Result<SearchUserSuccessfulResponseDto>
pub async fn search_users( &self, params: &SearchUsersParams, ) -> Result<SearchUserSuccessfulResponseDto>
Search Users
GET /users/search
Requires scope: users.readonly.
Sourcepub async fn filter_users_by_email(
&self,
body: &FilterByEmailDto,
) -> Result<SearchUserSuccessfulResponseDto>
pub async fn filter_users_by_email( &self, body: &FilterByEmailDto, ) -> Result<SearchUserSuccessfulResponseDto>
Filter Users by Email
Filter users by company ID, deleted status, and email array
POST /users/search/filter-by-email
Requires scope: users.readonly.
Sourcepub async fn delete_user(
&self,
user_id: &str,
) -> Result<DeleteUserSuccessfulResponseDto>
pub async fn delete_user( &self, user_id: &str, ) -> Result<DeleteUserSuccessfulResponseDto>
Delete User
DELETE /users/{userId}
Requires scope: users.write.
Sourcepub async fn get_user(&self, user_id: &str) -> Result<UserSuccessfulResponseDto>
pub async fn get_user(&self, user_id: &str) -> Result<UserSuccessfulResponseDto>
Get User
GET /users/{userId}
Requires scope: users.readonly.
Sourcepub async fn update_user(
&self,
user_id: &str,
body: &UpdateUserDto,
) -> Result<UserSuccessfulResponseDto>
pub async fn update_user( &self, user_id: &str, body: &UpdateUserDto, ) -> Result<UserSuccessfulResponseDto>
Update User
PUT /users/{userId}
Requires scope: users.write.
Trait Implementations§
Source§impl Clone for UsersService
impl Clone for UsersService
Source§fn clone(&self) -> UsersService
fn clone(&self) -> UsersService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more