pub mod types;
use crate::{client::Client, emails::CreateEmailBaseOptions, error::Result};
pub use types::*;
#[derive(Clone)]
pub struct Batch {
client: Client,
}
impl Batch {
pub(crate) fn new(client: Client) -> Self {
Self { client }
}
pub async fn send(&self, emails: Vec<CreateEmailBaseOptions>) -> Result<BatchSendResponse> {
self.client.post("/emails/batch", &emails).await
}
}