Class: Sentdm::Models::TemplateEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Sentdm::Models::TemplateEvent
- Defined in:
- lib/sentdm/models/template_event.rb,
sig/sentdm/models/template_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::TemplateEventPayload?
Body of a template status 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 TemplateEvent 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::TemplateEvent 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/template_event.rb', line 36
|
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/template_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/template_event.rb', line 19 optional :field, String |
#payload ⇒ Sentdm::Models::TemplateEventPayload?
Body of a template status event. Delivered when a template's review outcome changes, so you can react without polling.
26 |
# File 'lib/sentdm/models/template_event.rb', line 26 optional :payload, -> { Sentdm::TemplateEventPayload }, 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.
34 |
# File 'lib/sentdm/models/template_event.rb', line 34 optional :timestamp, String |
Instance Method Details
#to_hash ⇒ {
31 |
# File 'sig/sentdm/models/template_event.rbs', line 31
def to_hash: -> {
|