Class: Courier::Models::JourneyNode::JourneyBatchNode

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

Defined Under Namespace

Modules: Scope, Type Classes: Retain

Instance Attribute Summary collapse

Class Method 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(max_wait_period:, retain:, scope:, type:, wait_period:, id: nil, category_key: nil, conditions: nil, max_items: nil) ⇒ Object

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

Collect events arriving at the node into a single batch and fire one downstream step with the aggregated payload. The first event into a batch owns the run; later contributing events terminate at the batch step. The batch releases when any of ‘max_items` is reached, a quiet window of `wait_period` elapses, or the `max_wait_period` ceiling hits.

Parameters:



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

Instance Attribute Details

#category_keyString?

Optional partition key. Events with the same ‘category_key` are batched together; events with different values are batched separately.

Returns:

  • (String, nil)


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

optional :category_key, String

#conditionsArray<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”.



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

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

#idString?

Returns:

  • (String, nil)


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

optional :id, String

#max_itemsInteger?

Releases the batch once this many events have been collected.

Returns:

  • (Integer, nil)


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

optional :max_items, Integer

#max_wait_periodString

ISO 8601 duration. Hard ceiling from the first event into the batch; releases the batch unconditionally when it elapses.

Returns:

  • (String)


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

required :max_wait_period, String

#retainCourier::Models::JourneyNode::JourneyBatchNode::Retain

How to select which collected events to retain in the aggregated payload when the batch releases.



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

required :retain, -> { Courier::JourneyNode::JourneyBatchNode::Retain }

#scopeSymbol, Courier::Models::JourneyNode::JourneyBatchNode::Scope



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

required :scope, enum: -> { Courier::JourneyNode::JourneyBatchNode::Scope }

#typeSymbol, Courier::Models::JourneyNode::JourneyBatchNode::Type



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

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

#wait_periodString

ISO 8601 duration. Quiet window that releases the batch when it elapses with no new contributing events. Must be less than ‘max_wait_period`.

Returns:

  • (String)


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

required :wait_period, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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