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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! # Tapsilat Rust SDK
//!
//! A comprehensive Rust SDK for the Tapsilat payment processing platform.
//!
//! ## Overview
//!
//! The Tapsilat SDK provides a type-safe, ergonomic interface for integrating with the
//! Tapsilat API. It covers orders and payment terms, card installments, organization
//! settings, submerchants, virtual POS, saved cards, subscriptions, the marketplace
//! (API v2), webhook verification and validation utilities.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use tapsilat::{Config, TapsilatClient, CreateOrderRequest, Currency};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Initialize the client
//! let config = Config::new("your-api-key")
//! .with_base_url("https://panel.tapsilat.dev/api/v1")
//! .with_timeout(30);
//! let client = TapsilatClient::new(config)?;
//!
//! // Create an order
//! let order_request = CreateOrderRequest {
//! amount: 100.0,
//! currency: "TRY".to_string(),
//! locale: "tr".to_string(),
//! conversation_id: Some("order-123".to_string()),
//! buyer: tapsilat::types::CreateBuyerRequest {
//! name: "John".to_string(),
//! surname: "Doe".to_string(),
//! email: Some("john@example.com".to_string()),
//! ..Default::default()
//! },
//! ..Default::default()
//! };
//!
//! let order_response = client.create_order(order_request)?;
//! println!("Order created: {:?}", order_response.order_id);
//! # Ok(())
//! # }
//! ```
//! ## Features
//!
//! - **Type Safety**: Comprehensive type definitions with validation
//! - **Error Handling**: Robust error types with detailed context
//! - **Flexible API**: Both direct client methods and modular interfaces
//! - **Validation**: Built-in validators for Turkish phone numbers, emails, and identity numbers
//! - **Webhook Support**: HMAC-SHA256 webhook verification
//! - **Installments**: Card installment options and the installment table
//!
//! ## Module Organization
//!
//! - [`client`] - Core HTTP client and API methods
//! - [`config`] - Configuration management
//! - [`error`] - Error types and handling
//! - [`types`] - Data types for API requests and responses
//! - [`modules`] - Modular API interfaces (orders, payments, webhooks, etc.)
pub use TapsilatClient;
pub use Config;
pub use ;
pub use ;
pub use *;
// Re-export the deprecated installment plan types for compatibility
pub use ;