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
use anyhow::Result;
use crate::Client;
pub struct EmailAddressValidation {
pub client: Client,
}
impl EmailAddressValidation {
#[doc(hidden)]
pub fn new(client: Client) -> Self {
EmailAddressValidation { client }
}
pub async fn post_validations_email(
&self,
body: &crate::types::PostValidationsEmailRequest,
) -> Result<crate::types::PostValidationsEmailResponse> {
let url = self.client.url("/validations/email", None);
self.client
.post(
&url,
crate::Message {
body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
content_type: Some("application/json".to_string()),
},
)
.await
}
}