Class InvitesClient
java.lang.Object
io.github.stefanbratanov.jvm.openai.InvitesClient
Invite and manage invitations for an organization. Invited users are automatically added to the
Default project.
Based on Invites
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncreateInvite
(InviteRequest request) Create an invite for a user to the organization.deleteInvite
(String inviteId) Delete an invite.listInvites
(Optional<String> after, Optional<Integer> limit) Returns a list of invites in the organization.retrieveInvite
(String inviteId) Retrieves an invite.
-
Method Details
-
listInvites
Returns a list of invites in the organization.- Parameters:
after
- A cursor for use in pagination. after is an object ID that defines your place in the list.limit
- A limit on the number of objects to be returned.- Throws:
OpenAIException
- in case of API errors
-
createInvite
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.- Throws:
OpenAIException
- in case of API errors
-
retrieveInvite
Retrieves an invite.- Parameters:
inviteId
- The ID of the invite to retrieve.- Throws:
OpenAIException
- in case of API errors
-
deleteInvite
Delete an invite. If the invite has already been accepted, it cannot be deleted.- Parameters:
inviteId
- The ID of the invite to delete.- Throws:
OpenAIException
- in case of API errors
-