Class: Courier::Models::ElementalActionNode
- Inherits:
-
ElementalBaseNode
- Object
- Internal::Type::BaseModel
- ElementalBaseNode
- Courier::Models::ElementalActionNode
- Defined in:
- lib/courier/models/elemental_action_node.rb,
sig/courier/models/elemental_action_node.rbs
Direct Known Subclasses
Defined Under Namespace
Modules: Style
Instance Attribute Summary collapse
-
#action_id ⇒ String?
A unique id used to identify the action when it is executed.
-
#align ⇒ Symbol, ...
The alignment of the action button.
-
#background_color ⇒ String?
The background color of the action button.
-
#border_radius ⇒ String?
CSS border-radius applied to the action button.
-
#border_size ⇒ String?
CSS border width applied to the action button.
-
#content ⇒ String
The text content of the action shown to the user.
-
#disable_tracking ⇒ Boolean?
When true, the action's href is not rewritten for click-through tracking, even when click-through tracking is enabled for the workspace.
-
#font_size ⇒ String?
CSS font-size applied to the action button label.
-
#href ⇒ String
The target URL of the action.
-
#locales ⇒ Hash{Symbol=>Courier::Models::LocaleItem}?
Region specific content.
-
#padding ⇒ String?
CSS padding applied to the action button.
-
#style ⇒ Symbol, ...
Defaults to
button.
Attributes inherited from ElementalBaseNode
Instance Method Summary collapse
-
#initialize(content:, href:, action_id: nil, align: nil, background_color: nil, border_radius: nil, border_size: nil, disable_tracking: nil, font_size: nil, locales: nil, padding: nil, style: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see ElementalActionNode 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(content:, href:, action_id: nil, align: nil, background_color: nil, border_radius: nil, border_size: nil, disable_tracking: nil, font_size: nil, locales: nil, padding: nil, style: nil) ⇒ Object
Some parameter documentations has been truncated, see Courier::Models::ElementalActionNode for more details.
Allows the user to execute an action. Can be a button or a link.
|
|
# File 'lib/courier/models/elemental_action_node.rb', line 81
|
Instance Attribute Details
#action_id ⇒ String?
A unique id used to identify the action when it is executed.
22 |
# File 'lib/courier/models/elemental_action_node.rb', line 22 optional :action_id, String, nil?: true |
#align ⇒ Symbol, ...
The alignment of the action button. Defaults to "center".
28 |
# File 'lib/courier/models/elemental_action_node.rb', line 28 optional :align, enum: -> { Courier::Alignment }, nil?: true |
#background_color ⇒ String?
The background color of the action button.
34 |
# File 'lib/courier/models/elemental_action_node.rb', line 34 optional :background_color, String, nil?: true |
#border_radius ⇒ String?
CSS border-radius applied to the action button. For example, 4px
40 |
# File 'lib/courier/models/elemental_action_node.rb', line 40 optional :border_radius, String, nil?: true |
#border_size ⇒ String?
CSS border width applied to the action button. For example, 1px
46 |
# File 'lib/courier/models/elemental_action_node.rb', line 46 optional :border_size, String, nil?: true |
#content ⇒ String
The text content of the action shown to the user.
10 |
# File 'lib/courier/models/elemental_action_node.rb', line 10 required :content, String |
#disable_tracking ⇒ Boolean?
When true, the action's href is not rewritten for click-through tracking, even when click-through tracking is enabled for the workspace.
53 |
# File 'lib/courier/models/elemental_action_node.rb', line 53 optional :disable_tracking, Courier::Internal::Type::Boolean, nil?: true |
#font_size ⇒ String?
CSS font-size applied to the action button label. For example, 14px
59 |
# File 'lib/courier/models/elemental_action_node.rb', line 59 optional :font_size, String, nil?: true |
#href ⇒ String
The target URL of the action.
16 |
# File 'lib/courier/models/elemental_action_node.rb', line 16 required :href, String |
#locales ⇒ Hash{Symbol=>Courier::Models::LocaleItem}?
Region specific content. See locales docs for more details.
67 |
# File 'lib/courier/models/elemental_action_node.rb', line 67 optional :locales, -> { Courier::Internal::Type::HashOf[Courier::LocaleItem] }, nil?: true |
#padding ⇒ String?
CSS padding applied to the action button. For example, 8px 16px
73 |
# File 'lib/courier/models/elemental_action_node.rb', line 73 optional :padding, String, nil?: true |
#style ⇒ Symbol, ...
Defaults to button.
79 |
# File 'lib/courier/models/elemental_action_node.rb', line 79 optional :style, enum: -> { Courier::ElementalActionNode::Style }, nil?: true |
Instance Method Details
#to_hash ⇒ {
85 |
# File 'sig/courier/models/elemental_action_node.rbs', line 85
def to_hash: -> {
|