Class: Courier::Models::JourneyNode::JourneyAddToDigestNode

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/journey_node.rb,
sig/courier/models/journey_node.rbs

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

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(subscription_topic_id:, type:, id: nil, conditions: nil) ⇒ Object

Some parameter documentations has been truncated, see Courier::Models::JourneyNode::JourneyAddToDigestNode for more details.

Add the current event to a digest keyed by the given subscription topic. The digest accumulates events and releases them on the schedule configured for the topic, using the notification template configured on that topic. This node's type value is add-to-digest.

The topic must have a template configured. If the topic has no template when the first event reaches this node, the journey run fails immediately: the run is marked ERROR, no digest instance is created, and the journey does not continue past this node. Configure the topic's template before using the topic in a journey.

If the journey run is scoped to a tenant, digests are kept separate per tenant: two runs for the same user under different tenants accumulate and release as separate digests, even on the same topic.

Parameters:



# File 'lib/courier/models/journey_node.rb', line 241

Instance Attribute Details

#conditions ⇒ Array<String>, ...

Condition spec for a journey node. Accepts a single condition atom, an AND/OR group, or an AND/OR nested group. Omit the conditions property entirely to express "no conditions".



239
# File 'lib/courier/models/journey_node.rb', line 239

optional :conditions, union: -> { Courier::JourneyConditionsField }

#id ⇒ String?

Parameters:

  • (String)

Returns:

  • (String, nil)


231
# File 'lib/courier/models/journey_node.rb', line 231

optional :id, String

#subscription_topic_id ⇒ String

The subscription topic that owns the digest the event is added to.

Parameters:

  • value (String)

Returns:

  • (String)


221
# File 'lib/courier/models/journey_node.rb', line 221

required :subscription_topic_id, String

#type ⇒ Symbol, Courier::Models::JourneyNode::JourneyAddToDigestNode::Type

Parameters:

  • value (Courier::Models::JourneyNode::JourneyAddToDigestNode::type_)

Returns:



226
# File 'lib/courier/models/journey_node.rb', line 226

required :type, enum: -> { Courier::JourneyNode::JourneyAddToDigestNode::Type }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


183
# File 'sig/courier/models/journey_node.rbs', line 183

def to_hash: -> {