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