Class: Knockapi::Models::Message::RecipientSnapshot

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

Overview

See Also:

  • Knockapi::Models::Message#recipient_snapshot

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(channel_id: nil, email: nil, name: nil, user_id: nil, via_incoming_webhook: nil) ⇒ Object

The destination the message was delivered to, captured at send time. Email channels carry email/name; chat channels carry the destination channel_id or user_id, or via_incoming_webhook. Null when no snapshot was captured.

Parameters:

  • channel_id (String, nil) (defaults to: nil) —

    The chat channel the message was delivered to (chat channels)

  • email (String, nil) (defaults to: nil) —

    The email address the message was delivered to (email channels)

  • name (String, nil) (defaults to: nil) —

    The recipient name at send time (email channels)

  • user_id (String, nil) (defaults to: nil) —

    The chat user the message was direct-messaged to (chat channels)

  • via_incoming_webhook (Boolean, nil) (defaults to: nil) —

    Whether the chat message was delivered via an incoming webhook



# File 'lib/knockapi/models/message.rb', line 447

Instance Attribute Details

#channel_id ⇒ String?

The chat channel the message was delivered to (chat channels)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


421
# File 'lib/knockapi/models/message.rb', line 421

optional :channel_id, String, nil?: true

#email ⇒ String?

The email address the message was delivered to (email channels)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


427
# File 'lib/knockapi/models/message.rb', line 427

optional :email, String, nil?: true

#name ⇒ String?

The recipient name at send time (email channels)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


433
# File 'lib/knockapi/models/message.rb', line 433

optional :name, String, nil?: true

#user_id ⇒ String?

The chat user the message was direct-messaged to (chat channels)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


439
# File 'lib/knockapi/models/message.rb', line 439

optional :user_id, String, nil?: true

#via_incoming_webhook ⇒ Boolean?

Whether the chat message was delivered via an incoming webhook

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


445
# File 'lib/knockapi/models/message.rb', line 445

optional :via_incoming_webhook, Knockapi::Internal::Type::Boolean, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


341
# File 'sig/knockapi/models/message.rbs', line 341

def to_hash: -> {