use crate::core::{IntoBody, Json, Result};
platform_service! {
/// Execução em lote: `POST /bulk/direct/{action}` e
/// `POST /bulk/queue/{action}`.
BulkService
}
impl BulkService {
/// Executa um lote de forma síncrona: `POST /bulk/direct/{action}`.
pub async fn direct(&self, action: &str, body: impl IntoBody) -> Result<Json> {
self.base.post(&format!("bulk/direct/{action}"), body).await
}
/// Enfileira um lote: `POST /bulk/queue/{action}`.
pub async fn queue(&self, action: &str, body: impl IntoBody) -> Result<Json> {
self.base.post(&format!("bulk/queue/{action}"), body).await
}
}