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<Box<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<Box<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<Box<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}
67
68impl Org {
69    pub fn new(id: String, created_at: String, updated_at: String) -> Org {
70        Org {
71            hipaa_enabled: None,
72            subscription: None,
73            subscription_id: None,
74            id,
75            created_at,
76            updated_at,
77            stripe_customer_id: None,
78            stripe_subscription_id: None,
79            stripe_subscription_item_id: None,
80            stripe_subscription_current_period_start: None,
81            stripe_subscription_status: None,
82            plan: None,
83            name: None,
84            channel: None,
85            billing_limit: None,
86            server: None,
87            concurrency_limit: None,
88        }
89    }
90}
91/// This is the channel of the org. There is the cluster the API traffic for the org will be directed.
92#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
93pub enum Channel {
94    #[serde(rename = "default")]
95    Default,
96    #[serde(rename = "weekly")]
97    Weekly,
98}
99
100impl Default for Channel {
101    fn default() -> Channel {
102        Self::Default
103    }
104}
105