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
//! 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>,
}