dodopayments_rust 2.2.1

Rust SDK for Dodo Payments API
Documentation
/*
 * public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.87.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ThemeConfig : Custom theme configuration with colors for light and dark modes.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ThemeConfig {
    /// Dark mode color configuration
    #[serde(rename = "dark", skip_serializing_if = "Option::is_none")]
    pub dark: Option<Box<models::ThemeModeConfig>>,
    /// URL for the primary font. Must be a valid https:// URL.
    #[serde(rename = "font_primary_url", skip_serializing_if = "Option::is_none")]
    pub font_primary_url: Option<String>,
    /// URL for the secondary font. Must be a valid https:// URL.
    #[serde(rename = "font_secondary_url", skip_serializing_if = "Option::is_none")]
    pub font_secondary_url: Option<String>,
    /// Font size for the checkout UI
    #[serde(rename = "font_size", skip_serializing_if = "Option::is_none")]
    pub font_size: Option<models::FontSize>,
    /// Font weight for the checkout UI
    #[serde(rename = "font_weight", skip_serializing_if = "Option::is_none")]
    pub font_weight: Option<models::FontWeight>,
    /// Light mode color configuration
    #[serde(rename = "light", skip_serializing_if = "Option::is_none")]
    pub light: Option<Box<models::ThemeModeConfig>>,
    /// Custom text for the pay button (e.g., \"Complete Purchase\", \"Subscribe Now\"). Max 100 characters.
    #[serde(rename = "pay_button_text", skip_serializing_if = "Option::is_none")]
    pub pay_button_text: Option<String>,
    /// Border radius for UI elements. Must be a number followed by px, rem, or em (e.g., \"4px\", \"0.5rem\", \"1em\")
    #[serde(rename = "radius", skip_serializing_if = "Option::is_none")]
    pub radius: Option<String>,
}

impl ThemeConfig {
    /// Custom theme configuration with colors for light and dark modes.
    pub fn new() -> ThemeConfig {
        ThemeConfig {
            dark: None,
            font_primary_url: None,
            font_secondary_url: None,
            font_size: None,
            font_weight: None,
            light: None,
            pay_button_text: None,
            radius: None,
        }
    }
}