vapi_client/models/
create_customer_dto.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 CreateCustomerDto {
17    /// 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)
18    #[serde(
19        rename = "numberE164CheckEnabled",
20        skip_serializing_if = "Option::is_none"
21    )]
22    pub number_e164_check_enabled: Option<bool>,
23    /// This is the extension that will be dialed after the call is answered.
24    #[serde(rename = "extension", skip_serializing_if = "Option::is_none")]
25    pub extension: Option<String>,
26    /// This is the number of the customer.
27    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
28    pub number: Option<String>,
29    /// This is the SIP URI of the customer.
30    #[serde(rename = "sipUri", skip_serializing_if = "Option::is_none")]
31    pub sip_uri: Option<String>,
32    /// 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>`.
33    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
34    pub name: Option<String>,
35}
36
37impl CreateCustomerDto {
38    pub fn new() -> CreateCustomerDto {
39        CreateCustomerDto {
40            number_e164_check_enabled: None,
41            extension: None,
42            number: None,
43            sip_uri: None,
44            name: None,
45        }
46    }
47}