Class: Courier::Models::JourneyAPIInvokeTriggerNode

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

Defined Under Namespace

Modules: TriggerType, Type

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

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

Trigger fired when the journey is invoked via the API. The optional ‘schema` field is a JSON Schema that validates the invocation payload.

Parameters:



# File 'lib/courier/models/journey_api_invoke_trigger_node.rb', line 35

Instance Attribute Details

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



27
# File 'lib/courier/models/journey_api_invoke_trigger_node.rb', line 27

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

#idString?

Returns:

  • (String, nil)


19
# File 'lib/courier/models/journey_api_invoke_trigger_node.rb', line 19

optional :id, String

#schemaHash{Symbol=>Object}?

A JSONSchema object (Draft-07-compatible). Validated at runtime by Ajv.

Returns:

  • (Hash{Symbol=>Object}, nil)


33
# File 'lib/courier/models/journey_api_invoke_trigger_node.rb', line 33

optional :schema, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]

#trigger_typeSymbol, Courier::Models::JourneyAPIInvokeTriggerNode::TriggerType



9
# File 'lib/courier/models/journey_api_invoke_trigger_node.rb', line 9

required :trigger_type, enum: -> { Courier::JourneyAPIInvokeTriggerNode::TriggerType }

#typeSymbol, Courier::Models::JourneyAPIInvokeTriggerNode::Type



14
# File 'lib/courier/models/journey_api_invoke_trigger_node.rb', line 14

required :type, enum: -> { Courier::JourneyAPIInvokeTriggerNode::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/courier/models/journey_api_invoke_trigger_node.rb', line 58