whatsapp_cloud_api/models/text_message.rs
1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Debug, Serialize, Deserialize)]
4pub struct Text {
5 body: String,
6 preview_url: Option<bool>,
7}
8
9impl Text {
10 pub fn new(body: &str) -> Self {
11 Self {
12 body: body.into(),
13 preview_url: None,
14 }
15 }
16
17 pub fn with_preview_url(body: &str) -> Self {
18 Self {
19 body: body.into(),
20 preview_url: Some(true),
21 }
22 }
23}