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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//! # 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 supports order creation, payment processing, installment plans,
//! webhook verification, and comprehensive 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()),
//! gsm_number: None, identity_number: None, registration_address: None, ip: None, city: None, country: None, zip_code: None
//! },
//! basket_items: None,
//! billing_address: None,
//! shipping_address: None,
//! checkout_design: None,
//! enabled_installments: None,
//! external_reference_id: None,
//! order_cards: None,
//! paid_amount: None,
//! partial_payment: None,
//! payment_failure_url: None,
//! payment_methods: None,
//! payment_mode: None,
//! payment_options: None,
//! payment_success_url: None,
//! payment_terms: None,
//! pf_sub_merchant: None,
//! redirect_failure_url: None,
//! redirect_success_url: None,
//! sub_organization: None,
//! submerchants: None,
//! tax_amount: None,
//! three_d_force: None,
//! metadata: None,
//! consents: None,
//! };
//!
//! 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**: Cryptographic webhook verification
//! - **Installments**: Support for installment plan creation and management
//!
//! ## 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 installment types for convenience
pub use ;