Class: Moonbase::Models::MessageAttachment

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/message_attachment.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:, created_at:, download_url:, filename:, size:, type: :message_attachment) ⇒ Object

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

The Attachment object represents a file attached to a message. You can download the file content via the ‘download_url`.

Parameters:

  • id (String)

    Unique identifier for the object.

  • created_at (Time)

    Time at which the object was created, as an ISO 8601 timestamp in UTC.

  • download_url (String)

    A temporary, signed URL to download the file content. The URL expires after one

  • filename (String)

    The original name of the uploaded file, including its extension.

  • size (Integer)

    The size of the file in bytes.

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

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



# File 'lib/moonbase/models/message_attachment.rb', line 44

Instance Attribute Details

#created_atTime

Time at which the object was created, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time)


16
# File 'lib/moonbase/models/message_attachment.rb', line 16

required :created_at, Time

#download_urlString

A temporary, signed URL to download the file content. The URL expires after one hour.

Returns:

  • (String)


23
# File 'lib/moonbase/models/message_attachment.rb', line 23

required :download_url, String

#filenameString

The original name of the uploaded file, including its extension.

Returns:

  • (String)


29
# File 'lib/moonbase/models/message_attachment.rb', line 29

required :filename, String

#idString

Unique identifier for the object.

Returns:

  • (String)


10
# File 'lib/moonbase/models/message_attachment.rb', line 10

required :id, String

#sizeInteger

The size of the file in bytes.

Returns:

  • (Integer)


35
# File 'lib/moonbase/models/message_attachment.rb', line 35

required :size, Integer

#typeSymbol, :message_attachment

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

Returns:

  • (Symbol, :message_attachment)


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

required :type, const: :message_attachment