Class: SurgeAPI::Models::Message::Attachment

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

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, attachments: nil, blast_id: nil, body: nil, conversation: nil, metadata: nil) ⇒ Object

Some parameter documentations has been truncated, see SurgeAPI::Models::Message for more details.

A Message is a communication sent to a Contact.

Parameters:

  • id (String) (defaults to: nil)

    Unique identifier for the object.

  • attachments (Array<SurgeAPI::Models::Message::Attachment>) (defaults to: nil)
  • blast_id (String) (defaults to: nil)

    The ID of the blast this message belongs to, if any. This can be used to attribu

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

    The message body.

  • conversation (SurgeAPI::Models::Message::Conversation) (defaults to: nil)

    A conversation with a Contact

  • metadata (Hash{Symbol=>String}) (defaults to: nil)

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



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/surge_api/models/message.rb', line 61

class Attachment < SurgeAPI::Internal::Type::BaseModel
  # @!attribute id
  #   Unique identifier for the object.
  #
  #   @return [String, nil]
  optional :id, String

  # @!attribute type
  #   The type of attachment.
  #
  #   @return [String, nil]
  optional :type, String

  # @!attribute url
  #   The URL of the attachment.
  #
  #   @return [String, nil]
  optional :url, String

  # @!method initialize(id: nil, type: nil, url: nil)
  #   An Attachment is a file that can be sent with a message.
  #
  #   @param id [String] Unique identifier for the object.
  #
  #   @param type [String] The type of attachment.
  #
  #   @param url [String] The URL of the attachment.
end

Instance Attribute Details

#idString?

Unique identifier for the object.

Returns:

  • (String, nil)


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

optional :id, String

#typeString?

The type of attachment.

Returns:

  • (String, nil)


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

optional :type, String

#urlString?

The URL of the attachment.

Returns:

  • (String, nil)


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

optional :url, String