Class: Courier::Models::ElementalChannelNode
- Inherits:
-
ElementalBaseNode
- Object
- Internal::Type::BaseModel
- ElementalBaseNode
- Courier::Models::ElementalChannelNode
- Defined in:
- lib/courier/models/elemental_channel_node.rb,
sig/courier/models/elemental_channel_node.rbs
Direct Known Subclasses
Instance Attribute Summary collapse
-
#channel ⇒ String?
The channel the contents of this element should be applied to.
-
#raw ⇒ Hash{Symbol=>Object}?
Raw data to apply to the channel.
Attributes inherited from ElementalBaseNode
Instance Method Summary collapse
-
#initialize(channel: nil, raw: nil) ⇒ ElementalChannelNode
constructor
Some parameter documentations has been truncated, see ElementalChannelNode for more details.
- #to_hash ⇒ { channel: String, raw: ::Hash[Symbol, top]? }
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(channel: nil, raw: nil) ⇒ ElementalChannelNode
Some parameter documentations has been truncated, see Courier::Models::ElementalChannelNode for more details.
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.
|
|
# File 'lib/courier/models/elemental_channel_node.rb', line 20
|
Instance Attribute Details
#channel ⇒ String?
The channel the contents of this element should be applied to. Can be email,
push, direct_message, sms or a provider such as slack
11 |
# File 'lib/courier/models/elemental_channel_node.rb', line 11 optional :channel, String |
Instance Method Details
#to_hash ⇒ { channel: String, raw: ::Hash[Symbol, top]? }
16 |
# File 'sig/courier/models/elemental_channel_node.rbs', line 16
def to_hash: -> { channel: String, raw: ::Hash[Symbol, top]? }
|