workos 1.0.0

Official Rust SDK for the WorkOS API
Documentation
// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Invitation {
    /// Distinguishes the invitation object.
    pub object: String,
    /// The unique ID of the invitation.
    pub id: String,
    /// The email address of the recipient.
    pub email: String,
    /// The state of the invitation.
    pub state: InvitationState,
    /// The timestamp when the invitation was accepted, or null if not yet accepted.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub accepted_at: Option<String>,
    /// The timestamp when the invitation was revoked, or null if not revoked.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub revoked_at: Option<String>,
    /// The timestamp when the invitation expires.
    pub expires_at: String,
    /// The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub organization_id: Option<String>,
    /// The ID of the user who invited the recipient, if provided.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub inviter_user_id: Option<String>,
    /// The ID of the user who accepted the invitation, once accepted.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub accepted_user_id: Option<String>,
    /// Slug of the role the invitee will be assigned on acceptance. Reflects the current role on the invitee's organization membership. null when the invitation has no associated organization.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub role_slug: Option<String>,
    /// An ISO 8601 timestamp.
    pub created_at: String,
    /// An ISO 8601 timestamp.
    pub updated_at: String,
    /// The token used to accept the invitation.
    pub token: crate::SecretString,
    /// The URL where the recipient can accept the invitation.
    pub accept_invitation_url: String,
}