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