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
//! API resources. Each resource groups the operations for one object type.
//!
//! Access them from a [`crate::Delopay`] client, e.g. `client.payments()`.
pub mod analytics;
pub mod analytics_dashboard;
pub mod api_keys;
pub mod authentication;
pub mod availability_overrides;
pub mod billing;
pub mod blocklist;
pub mod cards;
pub mod connectors;
pub mod customers;
pub mod disputes;
pub mod ephemeral_keys;
pub mod events;
pub mod export;
pub mod feature_matrix;
pub mod fee_program;
pub mod fees;
pub mod files;
pub mod forex;
pub mod mandates;
pub mod merchant_accounts;
pub mod payment_links;
pub mod payment_methods;
pub mod payments;
pub mod payouts;
pub mod poll;
pub mod profile_acquirers;
pub mod profiles;
pub mod projects;
pub mod refunds;
pub mod regions;
pub mod relay;
pub mod routing;
pub mod search;
pub mod shops;
pub mod stripe_connect;
pub mod subscriptions;
pub mod three_ds_rules;
pub mod users;
pub mod verification;
/// Crate-internal pre-serialization validation for request structs that carry
/// a `#[serde(flatten)] extra` map.
///
/// Direct `struct -> bytes` serialization (see [`crate::core::encoding::to_json_vec`])
/// does not deduplicate JSON object keys the way the old
/// `struct -> serde_json::Value -> bytes` path did via `BTreeMap`. If a caller
/// puts a key in `extra` that collides with one of the struct's own named
/// fields, serde happily emits both, producing a JSON object with a literal
/// duplicate key (server behavior on such a body is undefined). Implementors
/// check `extra` against their own field names before the struct is handed to
/// `to_json_vec`.
pub(crate) trait ValidateRequest {
fn validate(&self) -> crate::core::error::Result<()>;
}