Class: SurgeAPI::Models::Message

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/surge_api/models/message.rb

Overview

Defined Under Namespace

Classes: Attachment, Conversation

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: nil, type: nil, url: nil) ⇒ Object

An Attachment is a file that can be sent with a message.

Parameters:

  • id (String) (defaults to: nil)

    Unique identifier for the object.

  • type (String) (defaults to: nil)

    The type of attachment.

  • url (String) (defaults to: nil)

    The URL of the attachment.



# File 'lib/surge_api/models/message.rb', line 80

Instance Attribute Details

#attachmentsArray<SurgeAPI::Models::Message::Attachment>?

Returns:



16
# File 'lib/surge_api/models/message.rb', line 16

optional :attachments, -> { SurgeAPI::Internal::Type::ArrayOf[SurgeAPI::Message::Attachment] }

#blast_idString?

The ID of the blast this message belongs to, if any. This can be used to attribute messages back to a specific blast.

Returns:

  • (String, nil)


23
# File 'lib/surge_api/models/message.rb', line 23

optional :blast_id, String

#bodyString?

The message body.

Returns:

  • (String, nil)


29
# File 'lib/surge_api/models/message.rb', line 29

optional :body, String, nil?: true

#conversationSurgeAPI::Models::Message::Conversation?

A conversation with a Contact



35
# File 'lib/surge_api/models/message.rb', line 35

optional :conversation, -> { SurgeAPI::Message::Conversation }

#idString?

Unique identifier for the object.

Returns:

  • (String, nil)


11
# File 'lib/surge_api/models/message.rb', line 11

optional :id, String

#metadataHash{Symbol=>String}?

Set of key-value pairs that will be stored with the object.

Returns:

  • (Hash{Symbol=>String}, nil)


41
# File 'lib/surge_api/models/message.rb', line 41

optional :metadata, SurgeAPI::Internal::Type::HashOf[String]