Class: Mailtrap::InboundAttachment

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

Overview

Data Transfer Object for an inbound message attachment rubocop:disable Lint/StructNewOverride -- size is an API field that shadows Struct#size

Instance Attribute Summary collapse

Instance Attribute Details

#attachment_idString (readonly)

The attachment ID

Returns:

  • (String)

    the current value of attachment_id



15
16
17
# File 'lib/mailtrap/inbound_attachment.rb', line 15

def attachment_id
  @attachment_id
end

#content_dispositionString? (readonly)

attachment or inline

Returns:

  • (String, nil)

    the current value of content_disposition



15
16
17
# File 'lib/mailtrap/inbound_attachment.rb', line 15

def content_disposition
  @content_disposition
end

#content_idString? (readonly)

The content ID for inline attachments

Returns:

  • (String, nil)

    the current value of content_id



15
16
17
# File 'lib/mailtrap/inbound_attachment.rb', line 15

def content_id
  @content_id
end

#content_typeString? (readonly)

The attachment MIME type

Returns:

  • (String, nil)

    the current value of content_type



15
16
17
# File 'lib/mailtrap/inbound_attachment.rb', line 15

def content_type
  @content_type
end

#download_urlString? (readonly)

Signed URL to download the attachment (only when fetched by ID)

Returns:

  • (String, nil)

    the current value of download_url



15
16
17
# File 'lib/mailtrap/inbound_attachment.rb', line 15

def download_url
  @download_url
end

#download_url_expires_atString? (readonly)

When the download URL expires (only when fetched by ID)

Returns:

  • (String, nil)

    the current value of download_url_expires_at



15
16
17
# File 'lib/mailtrap/inbound_attachment.rb', line 15

def download_url_expires_at
  @download_url_expires_at
end

#filenameString? (readonly)

The attachment filename

Returns:

  • (String, nil)

    the current value of filename



15
16
17
# File 'lib/mailtrap/inbound_attachment.rb', line 15

def filename
  @filename
end

#sizeInteger? (readonly)

The attachment size in bytes

Returns:

  • (Integer, nil)

    the current value of size



15
16
17
# File 'lib/mailtrap/inbound_attachment.rb', line 15

def size
  @size
end