Class: FastBound::Attachment
- Includes:
- API
- Defined in:
- lib/fastbound-ruby/attachment.rb
Constant Summary collapse
- ENDPOINTS =
{ download: "attachments/download/%s".freeze, }
Constants included from API
FastBound::API::FILE_UPLOAD_ATTRS, FastBound::API::ROOT_URL, FastBound::API::USER_AGENT
Instance Method Summary collapse
- #download(attachment_id) ⇒ Object
-
#initialize(client) ⇒ Attachment
constructor
A new instance of Attachment.
Methods included from API
#delete_request, #get_request, #post_file_request, #post_request, #put_request
Constructor Details
#initialize(client) ⇒ Attachment
Returns a new instance of Attachment.
12 13 14 |
# File 'lib/fastbound-ruby/attachment.rb', line 12 def initialize(client) @client = client end |
Instance Method Details
#download(attachment_id) ⇒ Object
16 17 18 19 20 |
# File 'lib/fastbound-ruby/attachment.rb', line 16 def download() endpoint = ENDPOINTS[:download] % get_request(@client, endpoint) end |