flowglad 0.1.0

Rust SDK for FlowGlad - Open source billing infrastructure
Documentation
//! # FlowGlad Rust SDK
//!
//! This is the official Rust SDK for [FlowGlad](https://flowglad.com), an open-source
//! billing infrastructure for developers.
//!
//! ## Quick Start
//!
//! ```no_run
//! use flowglad::{Client, Config};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     // Create a client
//!     let config = Config::new("sk_test_...");
//!     let client = Client::new(config)?;
//!
//!     // Use the client to interact with the API
//!     // let customers = client.customers().list().await?;
//!
//!     Ok(())
//! }
//! ```
//!
//! ## Features
//!
//! - **Type-safe API**: Leverage Rust's type system to prevent errors
//! - **Async/await**: Built on tokio for high-performance async IO
//! - **Automatic retries**: Intelligent retry logic with exponential backoff
//! - **Rich errors**: Detailed error types for easy debugging
//!
//! ## Configuration
//!
//! The SDK can be configured using the [`Config`] struct:
//!
//! ```
//! use flowglad::Config;
//! use std::time::Duration;
//!
//! let config = Config::builder()
//!     .api_key("sk_test_...")
//!     .timeout(Duration::from_secs(60))
//!     .max_retries(5)
//!     .build()
//!     .unwrap();
//! ```

#![warn(missing_docs)]
#![warn(rustdoc::broken_intra_doc_links)]
#![forbid(unsafe_code)]

pub mod client;
pub mod config;
pub mod error;
pub mod resources;
pub mod types;

// Re-export main types
pub use client::Client;
pub use config::Config;
pub use error::{Error, Result};

// Re-export commonly used types for convenience
pub use types::{
    Currency, CustomerId, Interval, ListResponse, Metadata, Money, ProductId, Status, Timestamp,
};

/// Prelude module for glob imports
///
/// # Example
/// ```
/// use flowglad::prelude::*;
/// ```
pub mod prelude {
    pub use crate::client::Client;
    pub use crate::config::Config;
    pub use crate::error::{Error, Result};
    pub use crate::types::{Currency, ListResponse, Metadata, Money, Status, Timestamp};
}