vapi_client/models/
org.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Org {
17    /// 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.
18    #[serde(rename = "hipaaEnabled", skip_serializing_if = "Option::is_none")]
19    pub hipaa_enabled: Option<bool>,
20    #[serde(rename = "subscription", skip_serializing_if = "Option::is_none")]
21    pub subscription: Option<models::Subscription>,
22    /// This is the ID of the subscription the org belongs to.
23    #[serde(rename = "subscriptionId", skip_serializing_if = "Option::is_none")]
24    pub subscription_id: Option<String>,
25    /// This is the unique identifier for the org.
26    #[serde(rename = "id")]
27    pub id: String,
28    /// This is the ISO 8601 date-time string of when the org was created.
29    #[serde(rename = "createdAt")]
30    pub created_at: String,
31    /// This is the ISO 8601 date-time string of when the org was last updated.
32    #[serde(rename = "updatedAt")]
33    pub updated_at: String,
34    /// This is the Stripe customer for the org.
35    #[serde(rename = "stripeCustomerId", skip_serializing_if = "Option::is_none")]
36    pub stripe_customer_id: Option<String>,
37    /// This is the subscription for the org.
38    #[serde(
39        rename = "stripeSubscriptionId",
40        skip_serializing_if = "Option::is_none"
41    )]
42    pub stripe_subscription_id: Option<String>,
43    /// This is the subscription's subscription item.
44    #[serde(
45        rename = "stripeSubscriptionItemId",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub stripe_subscription_item_id: Option<String>,
49    /// This is the subscription's current period start.
50    #[serde(
51        rename = "stripeSubscriptionCurrentPeriodStart",
52        skip_serializing_if = "Option::is_none"
53    )]
54    pub stripe_subscription_current_period_start: Option<String>,
55    /// This is the subscription's status.
56    #[serde(
57        rename = "stripeSubscriptionStatus",
58        skip_serializing_if = "Option::is_none"
59    )]
60    pub stripe_subscription_status: Option<String>,
61    /// This is the plan for the org.
62    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
63    pub plan: Option<models::OrgPlan>,
64    /// This is the name of the org. This is just for your own reference.
65    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
66    pub name: Option<String>,
67    /// This is the channel of the org. There is the cluster the API traffic for the org will be directed.
68    #[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
69    pub channel: Option<Channel>,
70    /// This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.
71    #[serde(rename = "billingLimit", skip_serializing_if = "Option::is_none")]
72    pub billing_limit: Option<f64>,
73    /// 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
74    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
75    pub server: Option<models::Server>,
76    /// 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.
77    #[serde(rename = "concurrencyLimit", skip_serializing_if = "Option::is_none")]
78    pub concurrency_limit: Option<f64>,
79}
80
81impl Org {
82    pub fn new(id: String, created_at: String, updated_at: String) -> Org {
83        Org {
84            hipaa_enabled: None,
85            subscription: None,
86            subscription_id: None,
87            id,
88            created_at,
89            updated_at,
90            stripe_customer_id: None,
91            stripe_subscription_id: None,
92            stripe_subscription_item_id: None,
93            stripe_subscription_current_period_start: None,
94            stripe_subscription_status: None,
95            plan: None,
96            name: None,
97            channel: None,
98            billing_limit: None,
99            server: None,
100            concurrency_limit: None,
101        }
102    }
103}
104/// This is the channel of the org. There is the cluster the API traffic for the org will be directed.
105#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
106pub enum Channel {
107    #[serde(rename = "default")]
108    Default,
109    #[serde(rename = "weekly")]
110    Weekly,
111}
112
113impl Default for Channel {
114    fn default() -> Channel {
115        Self::Default
116    }
117}