Class: Courier::Models::ElementalQuoteNode

Inherits:
ElementalBaseNode show all
Defined in:
lib/courier/models/elemental_quote_node.rb,
sig/courier/models/elemental_quote_node.rbs

Direct Known Subclasses

ElementalQuoteNodeWithType

Instance Attribute Summary collapse

Attributes inherited from ElementalBaseNode

#channels, #if_, #loop_, #ref

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(content:, align: nil, border_color: nil, font_size: nil, line_height: nil, locales: nil, text_style: nil) ⇒ Object

Some parameter documentations has been truncated, see Courier::Models::ElementalQuoteNode for more details.

Renders a quote block.

Parameters:

  • content (String)

    The text value of the quote.

  • align (Symbol, Courier::Models::Alignment, nil) (defaults to: nil)

    Alignment of the quote.

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

    CSS border color property. For example, #fff

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

    CSS px font size for this quote block, e.g. 16px. Overrides the size of the `t

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

    CSS line height for this quote block, as a px value or a unitless multiplier, e.

  • locales (Hash{Symbol=>Courier::Models::LocaleItem}, nil) (defaults to: nil)

    Region specific content. See [locales docs](https://www.courier.com/docs/platfor

  • text_style (Symbol, Courier::Models::TextStyle) (defaults to: nil)


# File 'lib/courier/models/elemental_quote_node.rb', line 51

Instance Attribute Details

#alignSymbol, ...

Alignment of the quote.

Parameters:

  • _ (Courier::Models::alignment, nil)

Returns:



16
# File 'lib/courier/models/elemental_quote_node.rb', line 16

optional :align, enum: -> { Courier::Alignment }, nil?: true

#border_colorString?

CSS border color property. For example, #fff

Parameters:

  • _ (String, nil)

Returns:

  • (String, nil)


22
# File 'lib/courier/models/elemental_quote_node.rb', line 22

optional :border_color, String, nil?: true

#contentString

The text value of the quote.

Parameters:

  • _ (String)

Returns:

  • (String)


10
# File 'lib/courier/models/elemental_quote_node.rb', line 10

required :content, String

#font_sizeString?

CSS px font size for this quote block, e.g. 16px. Overrides the size of the text_style preset. Email only.

Parameters:

  • _ (String, nil)

Returns:

  • (String, nil)


29
# File 'lib/courier/models/elemental_quote_node.rb', line 29

optional :font_size, String, nil?: true

#line_heightString?

CSS line height for this quote block, as a px value or a unitless multiplier, e.g. 24px or 1.5. Email only.

Parameters:

  • _ (String, nil)

Returns:

  • (String, nil)


36
# File 'lib/courier/models/elemental_quote_node.rb', line 36

optional :line_height, String, nil?: true

#localesHash{Symbol=>Courier::Models::LocaleItem}?

Region specific content. See locales docs for more details.

Parameters:

  • _ (Courier::Models::locales, nil)

Returns:



44
# File 'lib/courier/models/elemental_quote_node.rb', line 44

optional :locales, -> { Courier::Internal::Type::HashOf[Courier::LocaleItem] }, nil?: true

#text_styleSymbol, ...

Returns:



49
# File 'lib/courier/models/elemental_quote_node.rb', line 49

optional :text_style, enum: -> { Courier::TextStyle }

Instance Method Details

#to_hash{

Returns:

  • ({)


55
# File 'sig/courier/models/elemental_quote_node.rbs', line 55

def to_hash: -> {