Class: Mailtrap::SandboxAttachmentsAPI
- Inherits:
-
Object
- Object
- Mailtrap::SandboxAttachmentsAPI
- Includes:
- BaseAPI
- Defined in:
- lib/mailtrap/sandbox_attachments_api.rb
Instance Attribute Summary collapse
-
#sandbox_id ⇒ Object
readonly
Returns the value of attribute sandbox_id.
-
#sandbox_message_id ⇒ Object
readonly
Returns the value of attribute sandbox_message_id.
Attributes included from BaseAPI
Instance Method Summary collapse
-
#get(sandbox_attachment_id) ⇒ SandboxAttachment
Retrieves a specific sandbox attachment.
-
#inbox_id ⇒ Integer
deprecated
Deprecated.
Use #sandbox_id instead.
-
#initialize(account_id, sandbox_id, sandbox_message_id, client = Mailtrap::Client.new) ⇒ SandboxAttachmentsAPI
constructor
A new instance of SandboxAttachmentsAPI.
-
#list ⇒ Array<SandboxAttachment>
Lists all sandbox attachments for a message, limited up to 30 at once.
Methods included from BaseAPI
Constructor Details
#initialize(account_id, sandbox_id, sandbox_message_id, client = Mailtrap::Client.new) ⇒ SandboxAttachmentsAPI
Returns a new instance of SandboxAttachmentsAPI.
21 22 23 24 25 26 27 28 29 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 21 def initialize(account_id, sandbox_id, , client = Mailtrap::Client.new) raise ArgumentError, 'sandbox_id is required' if sandbox_id.nil? raise ArgumentError, 'sandbox_message_id is required' if .nil? @sandbox_id = sandbox_id @sandbox_message_id = super(account_id, client) end |
Instance Attribute Details
#sandbox_id ⇒ Object (readonly)
Returns the value of attribute sandbox_id.
11 12 13 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 11 def sandbox_id @sandbox_id end |
#sandbox_message_id ⇒ Object (readonly)
Returns the value of attribute sandbox_message_id.
11 12 13 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 11 def @sandbox_message_id end |
Instance Method Details
#get(sandbox_attachment_id) ⇒ SandboxAttachment
Retrieves a specific sandbox attachment
42 43 44 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 42 def get() base_get() end |
#inbox_id ⇒ Integer
Deprecated.
Use #sandbox_id instead.
Returns The sandbox ID.
33 34 35 36 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 33 def inbox_id Deprecation.warn('Mailtrap::SandboxAttachmentsAPI#inbox_id', 'Mailtrap::SandboxAttachmentsAPI#sandbox_id') sandbox_id end |
#list ⇒ Array<SandboxAttachment>
Lists all sandbox attachments for a message, limited up to 30 at once
49 50 51 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 49 def list base_list end |