Class: Crm::Core::AttachmentStore::Permission

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

Overview

Permission holds all the pieces of information required to upload an attachment. Generate a permission by calling generate_upload_permission.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, url, fields, upload_id) ⇒ Permission

Returns a new instance of Permission.



64
65
66
# File 'lib/crm/core/attachment_store.rb', line 64

def initialize(uri, url, fields, upload_id)
  @uri, @url, @fields, @upload_id = uri, url, fields, upload_id
end

Instance Attribute Details

#fieldsHash{String => String} (readonly)

Returns a hash of additional request parameters to be sent to the #url.

Returns:

  • (Hash{String => String})


56
57
58
# File 'lib/crm/core/attachment_store.rb', line 56

def fields
  @fields
end

#upload_idString (readonly)

Returns a temporary ID associated with this upload. Use this ID when setting the comment_attachments attribute of an activity.

Returns:

  • (String)


62
63
64
# File 'lib/crm/core/attachment_store.rb', line 62

def upload_id
  @upload_id
end

#uriURI (readonly)

Returns the URI for uploading the new attachment data.

Returns:

  • (URI)


46
47
48
# File 'lib/crm/core/attachment_store.rb', line 46

def uri
  @uri
end

#urlString (readonly)

Returns the URL for uploading the new attachment data.

Returns:

  • (String)


51
52
53
# File 'lib/crm/core/attachment_store.rb', line 51

def url
  @url
end