Class: Sentdm::Models::MessageEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Sentdm::Models::MessageEvent
- Defined in:
- lib/sentdm/models/message_event.rb,
sig/sentdm/models/message_event.rbs
Instance Attribute Summary collapse
-
#event ⇒ String?
The specific event within the family, for example message.delivered or message.received.
-
#field ⇒ String?
The event family, for example message or templates.
-
#payload ⇒ Sentdm::Models::MessageEventPayload?
Body of an outbound message lifecycle event.
-
#timestamp ⇒ String?
When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ).
Instance Method Summary collapse
-
#initialize(event: nil, field: nil, payload: nil, timestamp: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see MessageEvent for more details.
- #to_hash ⇒ {
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: nil, field: nil, payload: nil, timestamp: nil) ⇒ Object
Some parameter documentations has been truncated, see Sentdm::Models::MessageEvent for more details.
The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and varies only in Payload.
|
|
# File 'lib/sentdm/models/message_event.rb', line 37
|
Instance Attribute Details
#event ⇒ String?
The specific event within the family, for example message.delivered or message.received. Absent on events that have no subtype, so treat it as optional.
12 |
# File 'lib/sentdm/models/message_event.rb', line 12 optional :event, String, nil?: true |
#field ⇒ String?
The event family, for example message or templates. Route on this first, then on event for the specific change.
19 |
# File 'lib/sentdm/models/message_event.rb', line 19 optional :field, String |
#payload ⇒ Sentdm::Models::MessageEventPayload?
Body of an outbound message lifecycle event. Delivered once per status change, so a single message produces several of these as it moves toward a terminal status.
27 |
# File 'lib/sentdm/models/message_event.rb', line 27 optional :payload, -> { Sentdm::MessageEventPayload }, nil?: true |
#timestamp ⇒ String?
When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission time, not the time the underlying change happened. Use the timestamp inside the payload for the latter.
35 |
# File 'lib/sentdm/models/message_event.rb', line 35 optional :timestamp, String |
Instance Method Details
#to_hash ⇒ {
31 |
# File 'sig/sentdm/models/message_event.rbs', line 31
def to_hash: -> {
|