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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
//! # Payabli API SDK
//!
//!
//! ## Payabli API
//!
//! The Payabli API is a RESTful API that enables you to build robust payment solutions on the Payabli platform. Process card and ACH transactions, manage entities like vendors and customers, handle subscriptions and recurring billing, tokenize payment methods securely, and send payouts.
//!
//! The API provides comprehensive endpoints for accepting payments, making payouts to vendors, and managing merchant operations. Use our sandbox environment to build and test your integration, then seamlessly move to production.
//!
//! The API includes built-in security features like idempotency keys to prevent duplicate transactions, rate limits for optimal performance, and multiple authentication token types for different use cases. Available in both sandbox and production environments with complete support for webhooks, fraud controls, and real-time transaction processing.
//!
//! See the [API overview](https://docs.payabli.com/developers/api-reference/api-overview) for information on authentication, error handling, idempotency, rate limits, and more.
//!
//! See our full collection of [developer tools](https://docs.payabli.com/developers/developer-guides/tools-overview) for SDKs, our MCP server, Postman collection information, and example apps to help you get started quickly.
//!
//! ## Getting Started
//!
//! ```rust
//! use payabli_api::prelude::*;
//!
//! #[tokio::main]
//! async fn main() {
//! let config = ClientConfig {
//! api_key: Some("<value>".to_string()),
//! ..Default::default()
//! };
//! let client = ApiClient::new(config).expect("Failed to build client");
//! client
//! .bill
//! .add_bill(
//! &"8cfec329267".to_string(),
//! &BillOutData {
//! accounting_field_1: Some(AccountingField("MyInternalId".to_string())),
//! accounting_field_2: None,
//! additional_data: None,
//! attachments: Some(Attachments(Some(vec![FileContent {
//! f_content: None,
//! filename: Some("my-doc.pdf".to_string()),
//! ftype: Some(FileContentFtype::Pdf),
//! furl: Some("https://mysite.com/my-doc.pdf".to_string()),
//! }]))),
//! bill_date: Some(Datenullable(Some(
//! NaiveDate::parse_from_str("2024-07-01", "%Y-%m-%d").unwrap(),
//! ))),
//! bill_items: Some(Billitems(Some(vec![BillItem {
//! item_categories: Some(vec![Some("deposits".to_string())]),
//! item_commodity_code: Some(ItemCommodityCode("010".to_string())),
//! item_cost: 5.0,
//! item_description: Some(ItemDescription("Deposit for materials".to_string())),
//! item_mode: Some(0),
//! item_product_code: Some(ItemProductCode("M-DEPOSIT".to_string())),
//! item_product_name: Some(ItemProductName("Materials deposit".to_string())),
//! item_qty: Some(1),
//! item_tax_amount: Some(7.0),
//! item_tax_rate: Some(0.075),
//! item_total_amount: Some(123.0),
//! item_unit_of_measure: Some(ItemUnitofMeasure("SqFt".to_string())),
//! }]))),
//! bill_number: Some("ABC-123".to_string()),
//! comments: Some(Comments("Deposit for materials".to_string())),
//! discount: None,
//! due_date: Some(Datenullable(Some(
//! NaiveDate::parse_from_str("2024-07-01", "%Y-%m-%d").unwrap(),
//! ))),
//! end_date: Some(Datenullable(Some(
//! NaiveDate::parse_from_str("2024-07-01", "%Y-%m-%d").unwrap(),
//! ))),
//! frequency: Some(Frequency::Monthly),
//! lot_number: None,
//! mode: Some(0),
//! net_amount: Some(3762.87),
//! scheduled_options: None,
//! status: Some(Billstatus(-99)),
//! terms: Some(Terms("NET30".to_string())),
//! total_amount: None,
//! vendor: Some(VendorData {
//! vendor_number: Some(VendorNumber("1234-A".to_string())),
//! additional_data: None,
//! address_1: None,
//! address_2: None,
//! billing_data: None,
//! city: None,
//! contacts: None,
//! country: None,
//! custom_field_1: None,
//! custom_field_2: None,
//! customer_vendor_account: None,
//! ein: None,
//! email: None,
//! internal_reference_id: None,
//! location_code: None,
//! mcc: None,
//! name_1: None,
//! name_2: None,
//! payee_name_1: None,
//! payee_name_2: None,
//! payment_method: None,
//! phone: None,
//! remit_address_1: None,
//! remit_address_2: None,
//! remit_city: None,
//! remit_country: None,
//! remit_email: None,
//! remit_state: None,
//! remit_zip: None,
//! state: None,
//! vendor_status: None,
//! zip: None,
//! }),
//! },
//! None,
//! )
//! .await;
//! }
//! ```
//!
//! ## Modules
//!
//! - [`api`] - Core API types and models
//! - [`client`] - Client implementations
//! - [`config`] - Configuration options
//! - [`core`] - Core utilities and infrastructure
//! - [`error`] - Error types and handling
//! - [`prelude`] - Common imports for convenience
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use ApiError;