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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ContactResponse {
#[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
#[serde(rename = "contact_type", skip_serializing_if = "Option::is_none")]
pub contact_type: Option<ContactType>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "phone", skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
#[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "deleted_at", skip_serializing_if = "Option::is_none")]
pub deleted_at: Option<String>,
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<Box<String>>,
}
impl ContactResponse {
pub fn new() -> ContactResponse {
ContactResponse {
user_id: None,
contact_type: None,
name: None,
email: None,
phone: None,
customer_id: None,
created_at: None,
deleted_at: None,
updated_at: None,
id: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ContactType {
#[serde(rename = "primary")]
Primary,
#[serde(rename = "billing")]
Billing,
#[serde(rename = "technical")]
Technical,
#[serde(rename = "security")]
Security,
#[serde(rename = "emergency")]
Emergency,
#[serde(rename = "general compliance")]
GeneralCompliance,
}
impl Default for ContactType {
fn default() -> ContactType {
Self::Primary
}
}