delopay 0.20.0

Official Rust SDK for the DeloPay payments API
Documentation
//! The mandate model.

use serde::Deserialize;
use serde_json::Value;

use crate::core::models::common::MandateStatus;

/// A mandate as returned by the API.
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct MandateResponse {
    /// Unique mandate ID.
    pub mandate_id: String,
    /// Current status.
    pub status: MandateStatus,
    /// Saved payment method this mandate is bound to.
    #[serde(default)]
    pub payment_method_id: Option<String>,
    /// Payment method family.
    #[serde(default)]
    pub payment_method: Option<String>,
    /// Payment method sub-type.
    #[serde(default)]
    pub payment_method_type: Option<String>,
    /// Any additional response fields not modeled above (e.g. `card`, `customer_acceptance`).
    #[serde(flatten)]
    pub extra: serde_json::Map<String, Value>,
}