Class: Knockapi::Models::MessageEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/message_event.rb

Overview

Defined Under Namespace

Modules: Type

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

#initialize(id:, _typename:, inserted_at:, recipient:, type:, data: nil) ⇒ Object

Some parameter documentations has been truncated, see Knockapi::Models::MessageEvent for more details.

A message event. Occurs when a message [delivery or engagement status](/send-notifications/message-statuses) changes.



# File 'lib/knockapi/models/message_event.rb', line 44


Instance Attribute Details

#_typenameString

The typename of the schema.



17
# File 'lib/knockapi/models/message_event.rb', line 17

required :_typename, String, api_name: :__typename

#dataHash{Symbol=>Object}?

The data associated with the message event. Only present for some event types.



42
# File 'lib/knockapi/models/message_event.rb', line 42

optional :data, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown], nil?: true

#idString

The unique identifier for the message event.



11
# File 'lib/knockapi/models/message_event.rb', line 11

required :id, String

#inserted_atTime

Timestamp when the event was created.



23
# File 'lib/knockapi/models/message_event.rb', line 23

required :inserted_at, Time

#recipientString, Knockapi::Models::RecipientReference::ObjectReference

A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).



30
# File 'lib/knockapi/models/message_event.rb', line 30

required :recipient, union: -> { Knockapi::RecipientReference }

#typeSymbol, Knockapi::Models::MessageEvent::Type

The type of event that occurred.



36
# File 'lib/knockapi/models/message_event.rb', line 36

required :type, enum: -> { Knockapi::MessageEvent::Type }