pub struct Invites<'c, C: Config> { /* private fields */ }
Expand description
Invite and manage invitations for an organization. Invited users are automatically added to the Default project.
Implementations§
Source§impl<'c, C: Config> Invites<'c, C>
impl<'c, C: Config> Invites<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn list<Q>(
&self,
query: &Q,
) -> Result<InviteListResponse, OpenAIError>
pub async fn list<Q>( &self, query: &Q, ) -> Result<InviteListResponse, OpenAIError>
Returns a list of invites in the organization.
Sourcepub async fn retrieve(&self, invite_id: &str) -> Result<Invite, OpenAIError>
pub async fn retrieve(&self, invite_id: &str) -> Result<Invite, OpenAIError>
Retrieves an invite.
Sourcepub async fn create(
&self,
request: InviteRequest,
) -> Result<Invite, OpenAIError>
pub async fn create( &self, request: InviteRequest, ) -> Result<Invite, OpenAIError>
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
Sourcepub async fn delete(
&self,
invite_id: &str,
) -> Result<InviteDeleteResponse, OpenAIError>
pub async fn delete( &self, invite_id: &str, ) -> Result<InviteDeleteResponse, OpenAIError>
Delete an invite. If the invite has already been accepted, it cannot be deleted.
Auto Trait Implementations§
impl<'c, C> Freeze for Invites<'c, C>
impl<'c, C> !RefUnwindSafe for Invites<'c, C>
impl<'c, C> Send for Invites<'c, C>where
C: Sync,
impl<'c, C> Sync for Invites<'c, C>where
C: Sync,
impl<'c, C> Unpin for Invites<'c, C>
impl<'c, C> !UnwindSafe for Invites<'c, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more