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(rename = "stripeSubscriptionId", skip_serializing_if = "Option::is_none")]
38    pub stripe_subscription_id: Option<String>,
39    /// This is the subscription's subscription item.
40    #[serde(rename = "stripeSubscriptionItemId", skip_serializing_if = "Option::is_none")]
41    pub stripe_subscription_item_id: Option<String>,
42    /// This is the subscription's current period start.
43    #[serde(rename = "stripeSubscriptionCurrentPeriodStart", skip_serializing_if = "Option::is_none")]
44    pub stripe_subscription_current_period_start: Option<String>,
45    /// This is the subscription's status.
46    #[serde(rename = "stripeSubscriptionStatus", skip_serializing_if = "Option::is_none")]
47    pub stripe_subscription_status: Option<String>,
48    /// This is the plan for the org.
49    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
50    pub plan: Option<models::OrgPlan>,
51    /// This is the name of the org. This is just for your own reference.
52    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
53    pub name: Option<String>,
54    /// This is the channel of the org. There is the cluster the API traffic for the org will be directed.
55    #[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
56    pub channel: Option<Channel>,
57    /// This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.
58    #[serde(rename = "billingLimit", skip_serializing_if = "Option::is_none")]
59    pub billing_limit: Option<f64>,
60    /// 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
61    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
62    pub server: Option<models::Server>,
63    /// 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.
64    #[serde(rename = "concurrencyLimit", skip_serializing_if = "Option::is_none")]
65    pub concurrency_limit: Option<f64>,
66    /// 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.
67    #[serde(rename = "compliancePlan", skip_serializing_if = "Option::is_none")]
68    pub compliance_plan: Option<models::CompliancePlan>,
69}
70
71impl Org {
72    pub fn new(id: String, created_at: String, updated_at: String) -> Org {
73        Org {
74            hipaa_enabled: None,
75            subscription: None,
76            subscription_id: None,
77            id,
78            created_at,
79            updated_at,
80            stripe_customer_id: None,
81            stripe_subscription_id: None,
82            stripe_subscription_item_id: None,
83            stripe_subscription_current_period_start: None,
84            stripe_subscription_status: None,
85            plan: None,
86            name: None,
87            channel: None,
88            billing_limit: None,
89            server: None,
90            concurrency_limit: None,
91            compliance_plan: None,
92        }
93    }
94}
95/// This is the channel of the org. There is the cluster the API traffic for the org will be directed.
96#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
97pub enum Channel {
98    #[serde(rename = "default")]
99    Default,
100    #[serde(rename = "weekly")]
101    Weekly,
102}
103
104impl Default for Channel {
105    fn default() -> Channel {
106        Self::Default
107    }
108}
109