Class: Courier::Models::JourneySendNode::Message::Context

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

Overview

See Also:

  • Courier::Models::JourneySendNode::Message#context

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

#initializeContext

Returns a new instance of Context.

Parameters:

  • tenant_id: (String)


106
# File 'sig/courier/models/journey_send_node.rbs', line 106

def initialize: (tenant_id: String) -> void

Instance Attribute Details

#tenant_idString

The tenant to send as. Accepts either a literal tenant id (acme-tenant) or a whole-string mustache reference to a value the run already holds — {{data.tenant_id}} from the invocation payload, or {{f1.body.tenant_id}} from the response of an earlier fetch node with id f1. A reference is resolved separately on every run, so a single journey can deliver as many tenants. Two forms are rejected with 400: mid-string interpolation such as tenant-{{data.region}}, and any value beginning with refs., which is reserved for internal use. A reference that resolves to nothing at run time does not stop the run — the message is still sent, with no tenant context — so make sure the referenced value is always present. GET returns the value in the same form it was supplied.

Parameters:

  • value (String)

Returns:

  • (String)


116
# File 'lib/courier/models/journey_send_node.rb', line 116

required :tenant_id, String

Instance Method Details

#to_hash{ tenant_id: String }

Returns:

  • ({ tenant_id: String })


108
# File 'sig/courier/models/journey_send_node.rbs', line 108

def to_hash: -> { tenant_id: String }