Class: Infrawrench::TeamMembersNamespace
- Inherits:
-
Object
- Object
- Infrawrench::TeamMembersNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.team.members
Instance Method Summary collapse
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Remove a member from the org.
-
#initialize(transport) ⇒ TeamMembersNamespace
constructor
private
A new instance of TeamMembersNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List org members.
-
#role(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Change a member's role.
Constructor Details
#initialize(transport) ⇒ TeamMembersNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TeamMembersNamespace.
4146 4147 4148 |
# File 'lib/infrawrench/client.rb', line 4146 def initialize(transport) @transport = transport end |
Instance Method Details
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Remove a member from the org
Requires permission: team:remove.
DELETE /api/org/orgId/team/members/id
4162 4163 4164 4165 4166 4167 4168 4169 |
# File 'lib/infrawrench/client.rb', line 4162 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/team/members/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List org members
Requires permission: team:read.
GET /api/org/orgId/team/members
4183 4184 4185 4186 4187 4188 4189 4190 |
# File 'lib/infrawrench/client.rb', line 4183 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/team/members", path_params: { "orgId" => org_id }, request_options: ) end |
#role(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Change a member's role
Requires permission: team:role:write.
PATCH /api/org/orgId/team/members/id/role
4205 4206 4207 4208 4209 4210 4211 4212 4213 |
# File 'lib/infrawrench/client.rb', line 4205 def role(id:, body:, org_id: nil, request_options: nil) @transport.request( http_method: "PATCH", path: "/api/org/{orgId}/team/members/{id}/role", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |