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(email: nil, name: nil) ⇒ RecipientSnapshot

Recipient contact information captured at email send time. Null for non-email channels.

Parameters:

  • email (String) (defaults to: nil)

    The email address the message was delivered to

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

    The recipient name at send time

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


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

Instance Attribute Details

#emailString?

The email address the message was delivered to

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :email, String

#nameString?

The recipient name at send time

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :name, String, nil?: true

Instance Method Details

#to_hash{ email: String, name: String? }

Returns:

  • ({ email: String, name: String? })


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

def to_hash: -> { email: String, name: String? }