sentd 1.0.0

Official Rust SDK for the SENTD Email API
Documentation
use crate::client::Sentd;
use crate::error::Error;
use crate::types::*;

/// Batch API
pub struct Batch {
    client: Sentd,
}

impl Batch {
    pub(crate) fn new(client: Sentd) -> Self {
        Self { client }
    }

    /// Send a batch of emails
    pub async fn send(&self, request: SendBatchRequest) -> Result<SendBatchResponse, Error> {
        self.client.post("/api/batch", &request).await
    }
}