Module: A2::Client::Teams
- Included in:
- A2::Client
- Defined in:
- lib/a2/client/teams.rb
Instance Method Summary collapse
- #add_membership(id) ⇒ Object
- #create_team(json) ⇒ Object
- #delete_team(id) ⇒ Object
- #get_team(id) ⇒ Object
- #get_teams_by_membership(membership_id) ⇒ Object
- #list_all_membership(team_id) ⇒ Object
- #list_all_teams ⇒ Object
- #remove_membership(id, json) ⇒ Object
- #update_team(id, json) ⇒ Object
Instance Method Details
#add_membership(id) ⇒ Object
32 33 34 |
# File 'lib/a2/client/teams.rb', line 32 def add_membership(id) post "/apis/iam/v2/teams/#{id}/users:add", json end |
#create_team(json) ⇒ Object
12 13 14 |
# File 'lib/a2/client/teams.rb', line 12 def create_team(json) post '/apis/iam/v2/teams', json end |
#delete_team(id) ⇒ Object
20 21 22 |
# File 'lib/a2/client/teams.rb', line 20 def delete_team(id) delete "/apis/iam/v2/teams/#{id}" end |
#get_team(id) ⇒ Object
8 9 10 |
# File 'lib/a2/client/teams.rb', line 8 def get_team(id) get "/apis/iam/v2/teams/#{id}" end |
#get_teams_by_membership(membership_id) ⇒ Object
28 29 30 |
# File 'lib/a2/client/teams.rb', line 28 def get_teams_by_membership(membership_id) get "/apis/iam/v2/users/#{membership_id}/teams" end |
#list_all_membership(team_id) ⇒ Object
24 25 26 |
# File 'lib/a2/client/teams.rb', line 24 def list_all_membership(team_id) get "/apis/iam/v2/teams/#{team_id}/users" end |
#list_all_teams ⇒ Object
4 5 6 |
# File 'lib/a2/client/teams.rb', line 4 def list_all_teams get '/apis/iam/v2/teams' end |
#remove_membership(id, json) ⇒ Object
36 37 38 |
# File 'lib/a2/client/teams.rb', line 36 def remove_membership(id, json) post "/apis/iam/v2/teams/#{id}/users:remove", json end |
#update_team(id, json) ⇒ Object
16 17 18 |
# File 'lib/a2/client/teams.rb', line 16 def update_team(id, json) put "/apis/iam/v2/teams/#{id}", json end |