Class: Infrawrench::TeamInvitationsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::TeamInvitationsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.team.invitations
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Create an invitation (token valid for 7 days).
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Revoke a pending invitation.
-
#initialize(transport) ⇒ TeamInvitationsNamespace
constructor
private
A new instance of TeamInvitationsNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List pending and historical invitations.
Constructor Details
#initialize(transport) ⇒ TeamInvitationsNamespace
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 TeamInvitationsNamespace.
4836 4837 4838 |
# File 'lib/infrawrench/client.rb', line 4836 def initialize(transport) @transport = transport end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Create an invitation (token valid for 7 days)
Requires permission: team:invite.
POST /api/org/orgId/team/invitations
Raises on 402: Payment required — the organization's plan does not include this
Raises on 409: All seats are in use; retry with addSeat to buy one more
Raises on 502: Buying the extra seat failed; the invitation was not sent
4859 4860 4861 4862 4863 4864 4865 4866 4867 |
# File 'lib/infrawrench/client.rb', line 4859 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/team/invitations", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Revoke a pending invitation
Requires permission: team:invite.
DELETE /api/org/orgId/team/invitations/id
Raises on 404: Not found
4883 4884 4885 4886 4887 4888 4889 4890 |
# File 'lib/infrawrench/client.rb', line 4883 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/team/invitations/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List pending and historical invitations
Requires permission: team:read.
GET /api/org/orgId/team/invitations
4904 4905 4906 4907 4908 4909 4910 4911 |
# File 'lib/infrawrench/client.rb', line 4904 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/team/invitations", path_params: { "orgId" => org_id }, request_options: ) end |