delopay 0.20.0

Official Rust SDK for the DeloPay payments API
Documentation
//! Deployment branding: the product name, logos, favicon and default checkout
//! colours the platform operator saved for the whole deployment.
//!
//! Not to be confused with [`crate::branding`], a shop's own checkout look.

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

/// The deployment's branding as every page may read it.
///
/// Holds only what the platform operator saved. `None` means "nothing saved,
/// keep your own default"; it never means "no logo". The API does not echo its
/// own fallbacks here.
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct PublicBranding {
    /// The product name, shown in titles and "Powered by".
    #[serde(default)]
    pub name: Option<String>,
    /// Absolute `https://` address of the logo.
    #[serde(default)]
    pub logo_url: Option<String>,
    /// Absolute `https://` address of the logo for dark mode.
    #[serde(default)]
    pub logo_dark_url: Option<String>,
    /// Absolute `https://` address of the square mark, for small spaces.
    #[serde(default)]
    pub symbol_url: Option<String>,
    /// Absolute `https://` address of the favicon.
    #[serde(default)]
    pub favicon_url: Option<String>,
    /// `#rrggbb` checkout theme colour, used when a shop chose none.
    #[serde(default)]
    pub checkout_theme: Option<String>,
    /// `#rrggbb` checkout background colour, used when a shop set none.
    #[serde(default)]
    pub checkout_background: Option<String>,
    /// Changes whenever the saved branding changes (`"0"` while nothing is
    /// saved). Pass it as the asset version to bust caches.
    pub version: String,
    /// Any additional response fields not modeled above.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, Value>,
}