delopay 0.4.0

Official Rust SDK for the DeloPay payments API
Documentation
//! 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<()>;
}