Class: Courier::Models::ElementalQuoteNode

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

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) ⇒ ElementalQuoteNode

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)
  • content: (String)
  • align: (Courier::Models::alignment, nil) (defaults to: nil)
  • border_color: (String, nil) (defaults to: nil)
  • font_size: (String, nil) (defaults to: nil)
  • line_height: (String, nil) (defaults to: nil)
  • locales: (Courier::Models::locales, nil) (defaults to: nil)
  • text_style: (Courier::Models::text_style) (defaults to: nil)


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

Instance Attribute Details

#align ⇒ Symbol, ...

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_color ⇒ String?

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

#content ⇒ String

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_size ⇒ String?

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_height ⇒ String?

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

#locales ⇒ Hash{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_style ⇒ Symbol, ...

Parameters:

  • _ (Courier::Models::text_style)

Returns:



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

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

Instance Method Details

#to_hash ⇒ { content: String, align: Courier::Models::alignment?, border_color: String?, font_size: String?, line_height: String?, locales: Courier::Models::locales?, text_style: Courier::Models::text_style }

Returns:

  • ({ content: String, align: Courier::Models::alignment?, border_color: String?, font_size: String?, line_height: String?, locales: Courier::Models::locales?, text_style: Courier::Models::text_style })


55
56
57
58
59
60
61
62
63
# File 'sig/courier/models/elemental_quote_node.rbs', line 55

def to_hash: -> {
  content: String,
  align: Courier::Models::alignment?,
  border_color: String?,
  font_size: String?,
  line_height: String?,
  locales: Courier::Models::locales?,
  text_style: Courier::Models::text_style
}