Class: Mailtrap::InboundThread

Inherits:
Struct
  • Object
show all
Defined in:
lib/mailtrap/inbound_thread.rb

Overview

Data Transfer Object for an inbound thread (summary in list, with embedded messages when fetched by ID) rubocop:disable Lint/StructNewOverride -- size is an API field that shadows Struct#size

Instance Attribute Summary collapse

Instance Attribute Details

#attachmentsArray<InboundAttachment> (readonly)

Attachments across the thread

Returns:



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def attachments
  @attachments
end

#first_message_atString (readonly)

ISO 8601 timestamp of the first message

Returns:

  • (String)

    the current value of first_message_at



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def first_message_at
  @first_message_at
end

#idString (readonly)

The thread ID

Returns:

  • (String)

    the current value of id



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def id
  @id
end

#last_activity_atString (readonly)

ISO 8601 timestamp of the last activity

Returns:

  • (String)

    the current value of last_activity_at



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def last_activity_at
  @last_activity_at
end

#last_message_idString? (readonly)

ID of the most recent message

Returns:

  • (String, nil)

    the current value of last_message_id



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def last_message_id
  @last_message_id
end

#last_received_atString? (readonly)

ISO 8601 timestamp of the last received message

Returns:

  • (String, nil)

    the current value of last_received_at



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def last_received_at
  @last_received_at
end

#last_sent_atString? (readonly)

ISO 8601 timestamp of the last sent message

Returns:

  • (String, nil)

    the current value of last_sent_at



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def last_sent_at
  @last_sent_at
end

#message_countInteger (readonly)

Number of messages in the thread

Returns:

  • (Integer)

    the current value of message_count



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def message_count
  @message_count
end

#messagesArray<InboundThreadMessage>? (readonly)

The thread's messages (only when fetched by ID)

Returns:



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def messages
  @messages
end

#recipientsArray<String> (readonly)

Distinct recipient addresses in the thread

Returns:

  • (Array<String>)

    the current value of recipients



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def recipients
  @recipients
end

#sendersArray<String> (readonly)

Distinct sender addresses in the thread

Returns:

  • (Array<String>)

    the current value of senders



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def senders
  @senders
end

#sizeInteger (readonly)

Total size of the thread in bytes

Returns:

  • (Integer)

    the current value of size



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def size
  @size
end

#subjectString? (readonly)

The thread subject

Returns:

  • (String, nil)

    the current value of subject



20
21
22
# File 'lib/mailtrap/inbound_thread.rb', line 20

def subject
  @subject
end