delopay 0.2.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 cards;
pub mod customers;
pub mod disputes;
pub mod ephemeral_keys;
pub mod events;
pub mod export;
pub mod files;
pub mod forex;
pub mod mandates;
pub mod payment_links;
pub mod payment_methods;
pub mod payments;
pub mod payouts;
pub mod poll;
pub mod refunds;
pub mod subscriptions;

/// 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<()>;
}