1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* 1MSG WhatsApp Business API (Public)
*
* Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
*
* The version of the OpenAPI document: 2.0.0
* Contact: support@1msg.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// SendContactRequestContact : Simple contact card. Use this or `contacts`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SendContactRequestContact {
#[serde(rename = "name")]
pub name: Box<models::SendContactRequestContactName>,
/// Contact phone in E.164 (`+79181976551`), not a timestamp
#[serde(rename = "phone")]
pub phone: String,
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "org", skip_serializing_if = "Option::is_none")]
pub org: Option<std::collections::HashMap<String, serde_json::Value>>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl SendContactRequestContact {
/// Simple contact card. Use this or `contacts`.
pub fn new(name: models::SendContactRequestContactName, phone: String) -> SendContactRequestContact {
SendContactRequestContact {
name: Box::new(name),
phone,
email: None,
org: None,
url: None,
}
}
}