Class: Mailtrap::SandboxAttachmentsAPI
- Inherits:
-
Object
- Object
- Mailtrap::SandboxAttachmentsAPI
- Includes:
- BaseAPI
- Defined in:
- lib/mailtrap/sandbox_attachments_api.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#inbox_id ⇒ Object
readonly
Returns the value of attribute inbox_id.
-
#sandbox_message_id ⇒ Object
readonly
Returns the value of attribute sandbox_message_id.
Instance Method Summary collapse
-
#get(sandbox_attachment_id) ⇒ SandboxAttachment
Retrieves a specific sandbox attachment.
-
#initialize(account_id, inbox_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, inbox_id, sandbox_message_id, client = Mailtrap::Client.new) ⇒ SandboxAttachmentsAPI
Returns a new instance of SandboxAttachmentsAPI.
20 21 22 23 24 25 26 27 28 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 20 def initialize(account_id, inbox_id, , client = Mailtrap::Client.new) raise ArgumentError, 'inbox_id is required' if inbox_id.nil? raise ArgumentError, 'sandbox_message_id is required' if .nil? @inbox_id = inbox_id = super(account_id, client) end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
10 11 12 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 10 def account_id @account_id end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 10 def client @client end |
#inbox_id ⇒ Object (readonly)
Returns the value of attribute inbox_id.
10 11 12 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 10 def inbox_id @inbox_id end |
#sandbox_message_id ⇒ Object (readonly)
Returns the value of attribute sandbox_message_id.
10 11 12 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 10 def end |
Instance Method Details
#get(sandbox_attachment_id) ⇒ SandboxAttachment
Retrieves a specific sandbox attachment
34 35 36 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 34 def get() base_get() end |
#list ⇒ Array<SandboxAttachment>
Lists all sandbox attachments for a message, limited up to 30 at once
41 42 43 |
# File 'lib/mailtrap/sandbox_attachments_api.rb', line 41 def list base_list end |