Class: Crm::Activity::Comment::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/crm/activity.rb

Overview

Attachment represents an attachment of an activity comment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Attachment

Returns a new instance of Attachment.



61
62
63
# File 'lib/crm/activity.rb', line 61

def initialize(id)
  @id = id
end

Instance Attribute Details

#idString (readonly)

Returns the ID of this attachment.

Returns:

  • (String)


59
60
61
# File 'lib/crm/activity.rb', line 59

def id
  @id
end

Instance Method Details

#download_urlString

Generates a download URL for this attachment. Retrieve the attachment data by fetching this URL. This URL is only valid for a couple of minutes. Hence, it is recommended to have such URLs generated on demand.

Returns:

  • (String)


71
72
73
# File 'lib/crm/activity.rb', line 71

def download_url
  Crm::Core::AttachmentStore.generate_download_url(id)
end