Class: Knockapi::Models::MessageEvent

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

Overview

See Also:

  • Knockapi::Resources::Messages#list_events

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

Parameters:

  • id (String)

    The unique identifier for the message event.

  • _typename (String)

    The typename of the schema.

  • inserted_at (Time)

    Timestamp when the event was created.

  • recipient (String, Knockapi::Models::RecipientReference::ObjectReference)

    A reference to a recipient, either a user identifier (string) or an object refer

  • type (Symbol, Knockapi::Models::MessageEvent::Type)

    The type of event that occurred.

  • data (Hash{Symbol=>Object}, nil) (defaults to: nil)

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



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

Instance Attribute Details

#_typenameString

The typename of the schema.

Parameters:

  • value (String)

Returns:

  • (String)


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.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:



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.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#inserted_atTime

Timestamp when the event was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

Parameters:

  • value (Knockapi::Models::recipient_reference)

Returns:



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.

Parameters:

  • value (Knockapi::Models::MessageEvent::type_)

Returns:



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

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

Instance Method Details

#to_hash{

Returns:

  • ({)


35
# File 'sig/knockapi/models/message_event.rbs', line 35

def to_hash: -> {