Class: SmartRecruiters::AccessGroupsResource
- Inherits:
-
Resource
- Object
- Resource
- SmartRecruiters::AccessGroupsResource
show all
- Defined in:
- lib/smartrecruiters/resources/access_groups.rb
Constant Summary
collapse
- ACCESS_GROUP_API =
'user-api/v201804/access-groups'
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#assign_users(group_id:, user_ids:) ⇒ Object
11
12
13
|
# File 'lib/smartrecruiters/resources/access_groups.rb', line 11
def assign_users(group_id:, user_ids:)
Collection.from_response post_request("#{ACCESS_GROUP_API}/#{group_id}/users", body: user_ids), type: User
end
|
#remove_user(group_id:, user_id:) ⇒ Object
15
16
17
|
# File 'lib/smartrecruiters/resources/access_groups.rb', line 15
def remove_user(group_id:, user_id:)
delete_request("#{ACCESS_GROUP_API}/#{group_id}/users/#{user_id}")
end
|