Class: Moonbase::Models::EmailMessage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/email_message.rb

Overview

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:, body:, bulk:, created_at:, draft:, lock_version:, spam:, subject:, trash:, unread:, addresses: nil, attachments: nil, conversation: nil, summary: nil, type: :email_message) ⇒ Object

Some parameter documentations has been truncated, see Moonbase::Models::EmailMessage for more details.

The Email Message object represents a single email within a ‘Conversation`.

Parameters:

  • id (String)

    Unique identifier for the object.

  • body (Moonbase::Models::FormattedText)

    Structured content that can be rendered in multiple formats, currently supportin

  • bulk (Boolean)

    ‘true` if the message appears to be part of a bulk mailing.

  • created_at (Time)

    The time the message was received, as an ISO 8601 timestamp in UTC.

  • draft (Boolean)

    ‘true` if the message is a draft that has not been sent.

  • lock_version (Integer)

    The current lock version of the message for optimistic concurrency control.

  • spam (Boolean)

    ‘true` if the message is classified as spam.

  • subject (String)

    The subject line of the email.

  • trash (Boolean)

    ‘true` if the message is in the trash.

  • unread (Boolean)

    ‘true` if the message has not been read.

  • addresses (Array<Moonbase::Models::Address>) (defaults to: nil)

    A list of ‘Address` objects associated with the message (sender and recipients).

  • attachments (Array<Moonbase::Models::MessageAttachment>) (defaults to: nil)

    A list of ‘Attachment` objects on the message.

  • conversation (Moonbase::Models::InboxConversation) (defaults to: nil)

    The ‘Conversation` thread this message is part of.

  • summary (String) (defaults to: nil)

    A concise, system-generated summary of the email content.

  • type (Symbol, :email_message) (defaults to: :email_message)

    String representing the object’s type. Always ‘email_message` for this object.



# File 'lib/moonbase/models/email_message.rb', line 104

Instance Attribute Details

#addressesArray<Moonbase::Models::Address>?

A list of ‘Address` objects associated with the message (sender and recipients).

Note: Only present when requested using the ‘include` query parameter.

Returns:



80
# File 'lib/moonbase/models/email_message.rb', line 80

optional :addresses, -> { Moonbase::Internal::Type::ArrayOf[Moonbase::Address] }

#attachmentsArray<Moonbase::Models::MessageAttachment>?

A list of ‘Attachment` objects on the message.

Note: Only present when requested using the ‘include` query parameter.

Returns:



88
# File 'lib/moonbase/models/email_message.rb', line 88

optional :attachments, -> { Moonbase::Internal::Type::ArrayOf[Moonbase::MessageAttachment] }

#bodyMoonbase::Models::FormattedText

Structured content that can be rendered in multiple formats, currently supporting Markdown.



18
# File 'lib/moonbase/models/email_message.rb', line 18

required :body, -> { Moonbase::FormattedText }

#bulkBoolean

‘true` if the message appears to be part of a bulk mailing.

Returns:

  • (Boolean)


24
# File 'lib/moonbase/models/email_message.rb', line 24

required :bulk, Moonbase::Internal::Type::Boolean

#conversationMoonbase::Models::InboxConversation?

The ‘Conversation` thread this message is part of.

Note: Only present when requested using the ‘include` query parameter.



96
# File 'lib/moonbase/models/email_message.rb', line 96

optional :conversation, -> { Moonbase::InboxConversation }

#created_atTime

The time the message was received, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time)


30
# File 'lib/moonbase/models/email_message.rb', line 30

required :created_at, Time

#draftBoolean

‘true` if the message is a draft that has not been sent.

Returns:

  • (Boolean)


36
# File 'lib/moonbase/models/email_message.rb', line 36

required :draft, Moonbase::Internal::Type::Boolean

#idString

Unique identifier for the object.

Returns:

  • (String)


11
# File 'lib/moonbase/models/email_message.rb', line 11

required :id, String

#lock_versionInteger

The current lock version of the message for optimistic concurrency control.

Returns:

  • (Integer)


42
# File 'lib/moonbase/models/email_message.rb', line 42

required :lock_version, Integer

#spamBoolean

‘true` if the message is classified as spam.

Returns:

  • (Boolean)


48
# File 'lib/moonbase/models/email_message.rb', line 48

required :spam, Moonbase::Internal::Type::Boolean

#subjectString

The subject line of the email.

Returns:

  • (String)


54
# File 'lib/moonbase/models/email_message.rb', line 54

required :subject, String

#summaryString?

A concise, system-generated summary of the email content.

Returns:

  • (String, nil)


102
# File 'lib/moonbase/models/email_message.rb', line 102

optional :summary, String

#trashBoolean

‘true` if the message is in the trash.

Returns:

  • (Boolean)


60
# File 'lib/moonbase/models/email_message.rb', line 60

required :trash, Moonbase::Internal::Type::Boolean

#typeSymbol, :email_message

String representing the object’s type. Always ‘email_message` for this object.

Returns:

  • (Symbol, :email_message)


66
# File 'lib/moonbase/models/email_message.rb', line 66

required :type, const: :email_message

#unreadBoolean

‘true` if the message has not been read.

Returns:

  • (Boolean)


72
# File 'lib/moonbase/models/email_message.rb', line 72

required :unread, Moonbase::Internal::Type::Boolean