vapi_client/models/
create_customer_dto.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 CreateCustomerDto {
16    /// This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.  Use cases: - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.  If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).  @default true (E164 check is enabled)
17    #[serde(
18        rename = "numberE164CheckEnabled",
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub number_e164_check_enabled: Option<bool>,
22    /// This is the extension that will be dialed after the call is answered.
23    #[serde(rename = "extension", skip_serializing_if = "Option::is_none")]
24    pub extension: Option<String>,
25    /// These are the overrides for the assistant's settings and template variables specific to this customer. This allows customization of the assistant's behavior for individual customers in batch calls.
26    #[serde(rename = "assistantOverrides", skip_serializing_if = "Option::is_none")]
27    pub assistant_overrides: Option<models::AssistantOverrides>,
28    /// This is the number of the customer.
29    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
30    pub number: Option<String>,
31    /// This is the SIP URI of the customer.
32    #[serde(rename = "sipUri", skip_serializing_if = "Option::is_none")]
33    pub sip_uri: Option<String>,
34    /// This is the name of the customer. This is just for your own reference.  For SIP inbound calls, this is extracted from the `From` SIP header with format `\"Display Name\" <sip:username@domain>`.
35    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
36    pub name: Option<String>,
37}
38
39impl CreateCustomerDto {
40    pub fn new() -> CreateCustomerDto {
41        CreateCustomerDto {
42            number_e164_check_enabled: None,
43            extension: None,
44            assistant_overrides: None,
45            number: None,
46            sip_uri: None,
47            name: None,
48        }
49    }
50}