Class: Trycourier::Models::ElementalChannelNode
- Inherits:
-
ElementalBaseNode
- Object
- Internal::Type::BaseModel
- ElementalBaseNode
- Trycourier::Models::ElementalChannelNode
- Defined in:
- lib/trycourier/models/elemental_channel_node.rb
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: , raw: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see ElementalChannelNode for more details.
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: , raw: nil) ⇒ Object
Some parameter documentations has been truncated, see Trycourier::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](www.courier.com/docs/platform/content/elemental/control-flow/) for more details.
|
|
# File 'lib/trycourier/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/trycourier/models/elemental_channel_node.rb', line 11 required :channel, String |
#raw ⇒ Hash{Symbol=>Object}?
Raw data to apply to the channel. If ‘elements` has not been specified, `raw` is required.
18 |
# File 'lib/trycourier/models/elemental_channel_node.rb', line 18 optional :raw, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true |