ferrox_integrations/
lib.rs1use async_trait::async_trait;
2use ferrox_errors::AppError;
3
4#[async_trait]
6pub trait PaymentProvider: Send + Sync {
7 async fn charge(&self, amount: i64, currency: &str, source_id: &str) -> Result<String, AppError>;
9
10 async fn refund(&self, transaction_id: &str) -> Result<(), AppError>;
12}
13
14#[async_trait]
16pub trait NotificationProvider: Send + Sync {
17 async fn send_email(&self, to: &str, subject: &str, body: &str) -> Result<(), AppError>;
19
20 async fn send_chat(&self, channel_id: &str, message: &str) -> Result<(), AppError>;
22}
23
24pub fn setup() {
25 println!("ferrox-integrations initialized: Third-Party API abstractions ready.");
26}