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};
12use utoipa::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18pub struct CreateCustomerDto {
19 /// 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)
20 #[serde(
21 rename = "numberE164CheckEnabled",
22 skip_serializing_if = "Option::is_none"
23 )]
24 pub number_e164_check_enabled: Option<bool>,
25 /// This is the extension that will be dialed after the call is answered.
26 #[serde(rename = "extension", skip_serializing_if = "Option::is_none")]
27 pub extension: Option<String>,
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 number: None,
45 sip_uri: None,
46 name: None,
47 }
48 }
49}