Module: Courier::Models::ElementalNode
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/courier/models/elemental_node.rb,
sig/courier/models/elemental_node.rbs
Overview
The channel element allows a notification to be customized based on which
channel it is sent through. For example, you may want to display a detailed
message when the notification is sent through email, and a more concise message
in a push notification. Channel elements are only valid as top-level elements;
you cannot nest channel elements. If there is a channel element specified at the
top-level of the document, all sibling elements must be channel elements. Note:
As an alternative, most elements support a channel property. Which allows you
to selectively display an individual element on a per channel basis. See the
control flow docs
for more details.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Class Method Details
.variants ⇒ Array(Courier::Models::ElementalTextNodeWithType, Courier::Models::ElementalMetaNodeWithType, Courier::Models::ElementalChannelNodeWithType, Courier::Models::ElementalImageNodeWithType, Courier::Models::ElementalActionNodeWithType, Courier::Models::ElementalDividerNodeWithType, Courier::Models::ElementalQuoteNodeWithType, Courier::Models::ElementalHTMLNodeWithType)
|
|
# File 'lib/courier/models/elemental_node.rb', line 42
|
Instance Method Details
#self?.variants ⇒ ::Array[Courier::Models::elemental_node]
16 |
# File 'sig/courier/models/elemental_node.rbs', line 16
def self?.variants: -> ::Array[Courier::Models::elemental_node]
|