Class: Dodopayments::Models::CheckoutSessionCustomization

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/checkout_session_customization.rb,
sig/dodopayments/models/checkout_session_customization.rbs

Defined Under Namespace

Modules: Theme

Instance Attribute 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(force_language: nil, show_on_demand_tag: nil, show_order_details: nil, theme: nil, theme_config: nil) ⇒ Object

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

Parameters:

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

    Force the checkout interface to render in a specific language (e.g. en, es)

  • show_on_demand_tag (Boolean) (defaults to: nil)

    Show on demand tag

  • show_order_details (Boolean) (defaults to: nil)

    Show order details by default

  • theme (Symbol, Dodopayments::Models::CheckoutSessionCustomization::Theme, nil) (defaults to: nil)

    Theme of the page (determines which mode - light/dark/system - to use)

  • theme_config (Dodopayments::Models::ThemeConfig, nil) (defaults to: nil)

    Optional custom theme configuration with colors for light and dark modes



# File 'lib/dodopayments/models/checkout_session_customization.rb', line 42

Instance Attribute Details

#force_languageString?

Force the checkout interface to render in a specific language (e.g. en, es)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :force_language, String, nil?: true

#show_on_demand_tagBoolean?

Show on demand tag

Default is true

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


18
# File 'lib/dodopayments/models/checkout_session_customization.rb', line 18

optional :show_on_demand_tag, Dodopayments::Internal::Type::Boolean

#show_order_detailsBoolean?

Show order details by default

Default is true

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


26
# File 'lib/dodopayments/models/checkout_session_customization.rb', line 26

optional :show_order_details, Dodopayments::Internal::Type::Boolean

#themeSymbol, ...

Theme of the page (determines which mode - light/dark/system - to use)

If not provided, uses the business-configured theme from business_themes table.

Parameters:

  • value (Dodopayments::Models::CheckoutSessionCustomization::theme, nil)

Returns:



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

optional :theme, enum: -> { Dodopayments::CheckoutSessionCustomization::Theme }, nil?: true

#theme_configDodopayments::Models::ThemeConfig?

Optional custom theme configuration with colors for light and dark modes

Parameters:

Returns:



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

optional :theme_config, -> { Dodopayments::ThemeConfig }, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


35
# File 'sig/dodopayments/models/checkout_session_customization.rbs', line 35

def to_hash: -> {