Class: Courier::Models::ElementalTextNode
- Inherits:
-
ElementalBaseNode
- Object
- Internal::Type::BaseModel
- ElementalBaseNode
- Courier::Models::ElementalTextNode
- Defined in:
- lib/courier/models/elemental_text_node.rb,
sig/courier/models/elemental_text_node.rbs
Direct Known Subclasses
Defined Under Namespace
Instance Attribute Summary collapse
-
#align ⇒ Symbol, ...
Text alignment.
-
#bold ⇒ String?
Apply bold to the text.
-
#color ⇒ String?
Specifies the color of text.
-
#content ⇒ String?
The text content displayed in the notification.
-
#font_size ⇒ String?
CSS px font size for this text block, e.g.
- #format_ ⇒ Symbol, ...
-
#italic ⇒ String?
Apply italics to the text.
-
#line_height ⇒ String?
CSS line height for this text block, as a px value or a unitless multiplier, e.g.
-
#locales ⇒ Hash{Symbol=>Courier::Models::LocaleItem}?
Region specific content.
-
#strikethrough ⇒ String?
Apply a strike through the text.
-
#text_style ⇒ Symbol, ...
Allows the text to be rendered as a heading level.
-
#underline ⇒ String?
Apply an underline to the text.
Attributes inherited from ElementalBaseNode
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(align: nil, bold: nil, color: nil, content: nil, font_size: nil, format_: nil, italic: nil, line_height: nil, locales: nil, strikethrough: nil, text_style: nil, underline: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see ElementalTextNode for more details.
- #to_hash ⇒ {
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(align: nil, bold: nil, color: nil, content: nil, font_size: nil, format_: nil, italic: nil, line_height: nil, locales: nil, strikethrough: nil, text_style: nil, underline: nil) ⇒ Object
Some parameter documentations has been truncated, see Courier::Models::ElementalTextNode for more details.
Represents a body of text to be rendered inside of the notification.
|
|
# File 'lib/courier/models/elemental_text_node.rb', line 82
|
Instance Attribute Details
#align ⇒ Symbol, ...
Text alignment.
10 |
# File 'lib/courier/models/elemental_text_node.rb', line 10 optional :align, enum: -> { Courier::ElementalTextNode::Align } |
#bold ⇒ String?
Apply bold to the text
16 |
# File 'lib/courier/models/elemental_text_node.rb', line 16 optional :bold, String, nil?: true |
#color ⇒ String?
Specifies the color of text. Can be any valid css color value
22 |
# File 'lib/courier/models/elemental_text_node.rb', line 22 optional :color, String, nil?: true |
#content ⇒ String?
The text content displayed in the notification. Either this field must be specified, or the elements field
29 |
# File 'lib/courier/models/elemental_text_node.rb', line 29 optional :content, String |
#font_size ⇒ String?
CSS px font size for this text block, e.g. 16px. Overrides the size of the
text_style preset. Email only.
36 |
# File 'lib/courier/models/elemental_text_node.rb', line 36 optional :font_size, String, nil?: true |
#format_ ⇒ Symbol, ...
41 |
# File 'lib/courier/models/elemental_text_node.rb', line 41 optional :format_, enum: -> { Courier::ElementalTextNode::Format }, api_name: :format, nil?: true |
#italic ⇒ String?
Apply italics to the text
47 |
# File 'lib/courier/models/elemental_text_node.rb', line 47 optional :italic, String, nil?: true |
#line_height ⇒ String?
CSS line height for this text block, as a px value or a unitless multiplier,
e.g. 24px or 1.5. Email only.
54 |
# File 'lib/courier/models/elemental_text_node.rb', line 54 optional :line_height, String, nil?: true |
#locales ⇒ Hash{Symbol=>Courier::Models::LocaleItem}?
Region specific content. See locales docs for more details.
62 |
# File 'lib/courier/models/elemental_text_node.rb', line 62 optional :locales, -> { Courier::Internal::Type::HashOf[Courier::LocaleItem] }, nil?: true |
#strikethrough ⇒ String?
Apply a strike through the text
68 |
# File 'lib/courier/models/elemental_text_node.rb', line 68 optional :strikethrough, String, nil?: true |
#text_style ⇒ Symbol, ...
Allows the text to be rendered as a heading level.
74 |
# File 'lib/courier/models/elemental_text_node.rb', line 74 optional :text_style, enum: -> { Courier::TextStyle }, nil?: true |
#underline ⇒ String?
Apply an underline to the text
80 |
# File 'lib/courier/models/elemental_text_node.rb', line 80 optional :underline, String, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/courier/models/elemental_text_node.rb', line 120
|
Instance Method Details
#to_hash ⇒ {
89 |
# File 'sig/courier/models/elemental_text_node.rbs', line 89
def to_hash: -> {
|