pub mod types;
use crate::{client::Client, error::Result};
pub use types::*;
#[derive(Clone)]
pub struct Emails {
client: Client,
}
impl Emails {
pub(crate) fn new(client: Client) -> Self {
Self { client }
}
pub async fn send(&self, params: CreateEmailBaseOptions) -> Result<CreateEmailResponse> {
self.client.post("/emails", ¶ms).await
}
pub async fn get(&self, email_id: &str) -> Result<Email> {
self.client.get(&format!("/emails/{}", email_id)).await
}
}