Module: EmailFuse::Emails::Attachments
- Defined in:
- lib/email_fuse/emails/attachments.rb
Overview
Module for sent email attachments API operations
Class Method Summary collapse
-
.get(params = {}) ⇒ Hash
Retrieve a single attachment from a sent email.
-
.list(params = {}) ⇒ Hash
List attachments from a sent email with optional pagination.
Class Method Details
.get(params = {}) ⇒ Hash
Retrieve a single attachment from a sent email
20 21 22 23 24 25 26 |
# File 'lib/email_fuse/emails/attachments.rb', line 20 def get(params = {}) = params[:id] email_id = params[:email_id] path = "emails/#{email_id}/attachments/#{}" EmailFuse::Request.new(path, {}, "get").perform end |
.list(params = {}) ⇒ Hash
List attachments from a sent email with optional pagination
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/email_fuse/emails/attachments.rb', line 54 def list(params = {}) email_id = params[:email_id] base_path = "emails/#{email_id}/attachments" # Extract pagination parameters pagination_params = params.slice(:limit, :after, :before) path = EmailFuse::PaginationHelper.build_paginated_path(base_path, pagination_params) EmailFuse::Request.new(path, {}, "get").perform end |