Class: Dodopayments::Models::ThemeConfig

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/theme_config.rb

Defined Under Namespace

Modules: FontSize, FontWeight

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(dark: nil, font_primary_url: nil, font_secondary_url: nil, font_size: nil, font_weight: nil, light: nil, pay_button_text: nil, radius: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::ThemeConfig for more details.

Custom theme configuration with colors for light and dark modes.

Parameters:

  • dark (Dodopayments::Models::ThemeModeConfig, nil) (defaults to: nil)

    Dark mode color configuration

  • font_primary_url (String, nil) (defaults to: nil)

    URL for the primary font. Must be a valid https:// URL.

  • font_secondary_url (String, nil) (defaults to: nil)

    URL for the secondary font. Must be a valid https:// URL.

  • font_size (Symbol, Dodopayments::Models::ThemeConfig::FontSize, nil) (defaults to: nil)

    Font size for the checkout UI

  • font_weight (Symbol, Dodopayments::Models::ThemeConfig::FontWeight, nil) (defaults to: nil)

    Font weight for the checkout UI

  • light (Dodopayments::Models::ThemeModeConfig, nil) (defaults to: nil)

    Light mode color configuration

  • pay_button_text (String, nil) (defaults to: nil)

    Custom text for the pay button (e.g., “Complete Purchase”, “Subscribe Now”). Max

  • radius (String, nil) (defaults to: nil)

    Border radius for UI elements. Must be a number followed by px, rem, or em (e.g.



# File 'lib/dodopayments/models/theme_config.rb', line 56

Instance Attribute Details

#darkDodopayments::Models::ThemeModeConfig?

Dark mode color configuration



10
# File 'lib/dodopayments/models/theme_config.rb', line 10

optional :dark, -> { Dodopayments::ThemeModeConfig }, nil?: true

#font_primary_urlString?

URL for the primary font. Must be a valid https:// URL.

Returns:

  • (String, nil)


16
# File 'lib/dodopayments/models/theme_config.rb', line 16

optional :font_primary_url, String, nil?: true

#font_secondary_urlString?

URL for the secondary font. Must be a valid https:// URL.

Returns:

  • (String, nil)


22
# File 'lib/dodopayments/models/theme_config.rb', line 22

optional :font_secondary_url, String, nil?: true

#font_sizeSymbol, ...

Font size for the checkout UI



28
# File 'lib/dodopayments/models/theme_config.rb', line 28

optional :font_size, enum: -> { Dodopayments::ThemeConfig::FontSize }, nil?: true

#font_weightSymbol, ...

Font weight for the checkout UI



34
# File 'lib/dodopayments/models/theme_config.rb', line 34

optional :font_weight, enum: -> { Dodopayments::ThemeConfig::FontWeight }, nil?: true

#lightDodopayments::Models::ThemeModeConfig?

Light mode color configuration



40
# File 'lib/dodopayments/models/theme_config.rb', line 40

optional :light, -> { Dodopayments::ThemeModeConfig }, nil?: true

#pay_button_textString?

Custom text for the pay button (e.g., “Complete Purchase”, “Subscribe Now”). Max 100 characters.

Returns:

  • (String, nil)


47
# File 'lib/dodopayments/models/theme_config.rb', line 47

optional :pay_button_text, String, nil?: true

#radiusString?

Border radius for UI elements. Must be a number followed by px, rem, or em (e.g., “4px”, “0.5rem”, “1em”)

Returns:

  • (String, nil)


54
# File 'lib/dodopayments/models/theme_config.rb', line 54

optional :radius, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/dodopayments/models/theme_config.rb', line 91