Class: Infopark::Crm::Attachment
- Inherits:
-
Core::Resource
- Object
- ActiveResource::Base
- Core::Resource
- Infopark::Crm::Attachment
- Defined in:
- lib/crm_connector/attachment.rb
Defined Under Namespace
Classes: Permission
Class Method Summary collapse
-
.download_url(attachment_id, activity_id) ⇒ String
Generates a temporary download URL for the given attachment.
-
.upload_permission ⇒ Permission
Generates a temporary Amazon S3 URL for uploading a file to S3.
Class Method Details
.download_url(attachment_id, activity_id) ⇒ String
Generates a temporary download URL for the given attachment.
30 31 32 |
# File 'lib/crm_connector/attachment.rb', line 30 def self.download_url(, activity_id) get(:download_url, :attachment_id => , :activity_id => activity_id) end |
.upload_permission ⇒ Permission
Generates a temporary Amazon S3 URL for uploading a file to S3.
16 17 18 19 |
# File 'lib/crm_connector/attachment.rb', line 16 def self. perm = get(:upload_permission) Permission.new(perm["url"], perm["fields"], perm["upload_id"]) end |