Class: Crm::Core::AttachmentStore::Permission
- Inherits:
-
Object
- Object
- Crm::Core::AttachmentStore::Permission
- 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
-
#fields ⇒ Hash{String => String}
readonly
Returns a hash of additional request parameters to be sent to the #url.
-
#upload_id ⇒ String
readonly
Returns a temporary ID associated with this upload.
-
#uri ⇒ URI
readonly
Returns the URI for uploading the new attachment data.
-
#url ⇒ String
readonly
Returns the URL for uploading the new attachment data.
Instance Method Summary collapse
-
#initialize(uri, url, fields, upload_id) ⇒ Permission
constructor
A new instance of Permission.
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
#fields ⇒ Hash{String => String} (readonly)
Returns a hash of additional request parameters to be sent to the #url.
56 57 58 |
# File 'lib/crm/core/attachment_store.rb', line 56 def fields @fields end |
#upload_id ⇒ String (readonly)
Returns a temporary ID associated with this upload. Use this ID when setting the comment_attachments
attribute of an activity.
62 63 64 |
# File 'lib/crm/core/attachment_store.rb', line 62 def upload_id @upload_id end |
#uri ⇒ URI (readonly)
Returns the URI for uploading the new attachment data.
46 47 48 |
# File 'lib/crm/core/attachment_store.rb', line 46 def uri @uri end |
#url ⇒ String (readonly)
Returns the URL for uploading the new attachment data.
51 52 53 |
# File 'lib/crm/core/attachment_store.rb', line 51 def url @url end |