vapi_client/models/
org.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Org {
16    /// When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. When HIPAA is enabled, only OpenAI/Custom LLM or Azure Providers will be available for LLM and Voice respectively. This is due to the compliance requirements of HIPAA. Other providers may not meet these requirements.
17    #[serde(rename = "hipaaEnabled", skip_serializing_if = "Option::is_none")]
18    pub hipaa_enabled: Option<bool>,
19    #[serde(rename = "subscription", skip_serializing_if = "Option::is_none")]
20    pub subscription: Option<models::Subscription>,
21    /// This is the ID of the subscription the org belongs to.
22    #[serde(rename = "subscriptionId", skip_serializing_if = "Option::is_none")]
23    pub subscription_id: Option<String>,
24    /// This is the unique identifier for the org.
25    #[serde(rename = "id")]
26    pub id: String,
27    /// This is the ISO 8601 date-time string of when the org was created.
28    #[serde(rename = "createdAt")]
29    pub created_at: String,
30    /// This is the ISO 8601 date-time string of when the org was last updated.
31    #[serde(rename = "updatedAt")]
32    pub updated_at: String,
33    /// This is the Stripe customer for the org.
34    #[serde(rename = "stripeCustomerId", skip_serializing_if = "Option::is_none")]
35    pub stripe_customer_id: Option<String>,
36    /// This is the subscription for the org.
37    #[serde(
38        rename = "stripeSubscriptionId",
39        skip_serializing_if = "Option::is_none"
40    )]
41    pub stripe_subscription_id: Option<String>,
42    /// This is the subscription's subscription item.
43    #[serde(
44        rename = "stripeSubscriptionItemId",
45        skip_serializing_if = "Option::is_none"
46    )]
47    pub stripe_subscription_item_id: Option<String>,
48    /// This is the subscription's current period start.
49    #[serde(
50        rename = "stripeSubscriptionCurrentPeriodStart",
51        skip_serializing_if = "Option::is_none"
52    )]
53    pub stripe_subscription_current_period_start: Option<String>,
54    /// This is the subscription's status.
55    #[serde(
56        rename = "stripeSubscriptionStatus",
57        skip_serializing_if = "Option::is_none"
58    )]
59    pub stripe_subscription_status: Option<String>,
60    /// This is the plan for the org.
61    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
62    pub plan: Option<models::OrgPlan>,
63    /// This is the secret key used for signing JWT tokens for the org.
64    #[serde(rename = "jwtSecret", skip_serializing_if = "Option::is_none")]
65    pub jwt_secret: Option<String>,
66    /// This is the total number of call minutes used by this org across all time.
67    #[serde(rename = "minutesUsed", skip_serializing_if = "Option::is_none")]
68    pub minutes_used: Option<f64>,
69    /// This is the name of the org. This is just for your own reference.
70    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
71    pub name: Option<String>,
72    /// This is the channel of the org. There is the cluster the API traffic for the org will be directed.
73    #[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
74    pub channel: Option<ChannelTrue>,
75    /// This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.
76    #[serde(rename = "billingLimit", skip_serializing_if = "Option::is_none")]
77    pub billing_limit: Option<f64>,
78    /// This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.  The order of precedence is:  1. assistant.server 2. phoneNumber.server 3. org.server
79    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
80    pub server: Option<models::Server>,
81    /// This is the concurrency limit for the org. This is the maximum number of calls that can be active at any given time. To go beyond 10, please contact us at support@vapi.ai.
82    #[serde(rename = "concurrencyLimit", skip_serializing_if = "Option::is_none")]
83    pub concurrency_limit: Option<f64>,
84    /// Stores the information about the compliance plan enforced at the organization level. Currently pciEnabled is supported through this field. When this is enabled, any logs, recordings, or transcriptions will be shipped to the customer endpoints if provided else lost. At the end of the call, you will receive an end-of-call-report message to store on your server, if webhook is provided. Defaults to false. When PCI is enabled, only PCI-compliant Providers will be available for LLM, Voice and transcribers. This is due to the compliance requirements of PCI. Other providers may not meet these requirements.
85    #[serde(rename = "compliancePlan", skip_serializing_if = "Option::is_none")]
86    pub compliance_plan: Option<models::CompliancePlan>,
87}
88
89impl Org {
90    pub fn new(id: String, created_at: String, updated_at: String) -> Org {
91        Org {
92            hipaa_enabled: None,
93            subscription: None,
94            subscription_id: None,
95            id,
96            created_at,
97            updated_at,
98            stripe_customer_id: None,
99            stripe_subscription_id: None,
100            stripe_subscription_item_id: None,
101            stripe_subscription_current_period_start: None,
102            stripe_subscription_status: None,
103            plan: None,
104            jwt_secret: None,
105            minutes_used: None,
106            name: None,
107            channel: None,
108            billing_limit: None,
109            server: None,
110            concurrency_limit: None,
111            compliance_plan: None,
112        }
113    }
114}
115/// This is the channel of the org. There is the cluster the API traffic for the org will be directed.
116#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
117pub enum ChannelTrue {
118    #[serde(rename = "default")]
119    Default,
120    #[serde(rename = "weekly")]
121    Weekly,
122}
123
124impl Default for ChannelTrue {
125    fn default() -> ChannelTrue {
126        Self::Default
127    }
128}