Class: Courier::Models::JourneyWebhookTriggerNode

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

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

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

Trigger fired when an external system POSTs to the webhook URL minted for event_source. Narrow it to one event with event_id, or omit event_id to accept every event delivered to the URL.

Parameters:



# File 'lib/courier/models/journey_webhook_trigger_node.rb', line 44

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".



34
# File 'lib/courier/models/journey_webhook_trigger_node.rb', line 34

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

#event_idString?

An optional event filter, matched against the payload's event field. A sender that supplies no event matches the literal custom. Must not contain a forward slash. Omit to accept every event delivered to the URL.

Parameters:

  • (String)

Returns:

  • (String, nil)


42
# File 'lib/courier/models/journey_webhook_trigger_node.rb', line 42

optional :event_id, String

#event_sourceString

The provider key the webhook URL is minted for. Required, and must not contain a forward slash.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/courier/models/journey_webhook_trigger_node.rb', line 11

required :event_source, String

#idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


26
# File 'lib/courier/models/journey_webhook_trigger_node.rb', line 26

optional :id, String

#trigger_typeSymbol, Courier::Models::JourneyWebhookTriggerNode::TriggerType

Parameters:

  • value (Courier::Models::JourneyWebhookTriggerNode::trigger_type)

Returns:



16
# File 'lib/courier/models/journey_webhook_trigger_node.rb', line 16

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

#typeSymbol, Courier::Models::JourneyWebhookTriggerNode::Type

Parameters:

  • value (Courier::Models::JourneyWebhookTriggerNode::type_)

Returns:



21
# File 'lib/courier/models/journey_webhook_trigger_node.rb', line 21

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/courier/models/journey_webhook_trigger_node.rb', line 70

Instance Method Details

#to_hash{

Returns:

  • ({)


43
# File 'sig/courier/models/journey_webhook_trigger_node.rbs', line 43

def to_hash: -> {