Class: Infrawrench::InvitationsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::InvitationsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.invitations
Instance Attribute Summary collapse
-
#by_token ⇒ InvitationsByTokenNamespace
readonly
client.invitations.by_token.
Instance Method Summary collapse
-
#accept(body:, request_options: nil) ⇒ Hash
Accept an invitation.
-
#initialize(transport) ⇒ InvitationsNamespace
constructor
private
A new instance of InvitationsNamespace.
Constructor Details
#initialize(transport) ⇒ InvitationsNamespace
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 InvitationsNamespace.
1870 1871 1872 1873 |
# File 'lib/infrawrench/client.rb', line 1870 def initialize(transport) @transport = transport @by_token = InvitationsByTokenNamespace.new(@transport) end |
Instance Attribute Details
#by_token ⇒ InvitationsByTokenNamespace (readonly)
Returns client.invitations.by_token.
1866 1867 1868 |
# File 'lib/infrawrench/client.rb', line 1866 def by_token @by_token end |
Instance Method Details
#accept(body:, request_options: nil) ⇒ Hash
Accept an invitation
POST /api/invitations/accept
Raises on 400: Bad request
Raises on 403: Forbidden
1888 1889 1890 1891 1892 1893 1894 1895 |
# File 'lib/infrawrench/client.rb', line 1888 def accept(body:, request_options: nil) @transport.request( http_method: "POST", path: "/api/invitations/accept", body: body, request_options: ) end |