rain_sdk/
lib.rs

1//! # Rain SDK
2//!
3//! A modern, type-safe Rust SDK for the Rain Cards API.
4//!
5//! ## Features
6//!
7//! - **Async and Sync Support**: Use async/await or blocking operations
8//! - **Type Safety**: Strongly typed models for all API endpoints
9//! - **API Key Authentication**: Simple API key-based authentication
10//! - **Comprehensive Error Handling**: Detailed error types with context
11//!
12//! ## Quick Start
13//!
14//! ```no_run
15//! use rain_sdk::{RainClient, Config, Environment, AuthConfig};
16//!
17//! # #[cfg(feature = "async")]
18//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
19//! let config = Config::new(Environment::Dev);
20//! let auth = AuthConfig::with_api_key("your-api-key".to_string());
21//! let client = RainClient::new(config, auth)?;
22//!
23//! // Use the client to make API calls
24//! # Ok(())
25//! # }
26//! ```
27//!
28//! ## Documentation
29//!
30//! See the [documentation](https://docs.rs/rain-sdk) for detailed API reference.
31
32pub mod api;
33pub mod auth;
34pub mod client;
35pub mod config;
36pub mod error;
37pub mod models;
38
39pub use auth::AuthConfig;
40pub use client::RainClient;
41pub use config::{Config, Environment};
42pub use error::{RainError, Result};
43
44// Re-export API modules
45pub use api::{
46    applications, balances, cards, companies, contracts, disputes, keys, payments, reports,
47    shipping_groups, signatures, subtenants, transactions, users, webhooks,
48};