1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! # 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();
//! ```
// Re-export main types
pub use Client;
pub use Config;
pub use ;
// Re-export commonly used types for convenience
pub use ;
/// Prelude module for glob imports
///
/// # Example
/// ```
/// use flowglad::prelude::*;
/// ```