Class: Mailtrap::InboundFoldersAPI
- Inherits:
-
Object
- Object
- Mailtrap::InboundFoldersAPI
- Includes:
- BaseAPI
- Defined in:
- lib/mailtrap/inbound_folders_api.rb
Instance Attribute Summary
Attributes included from BaseAPI
Instance Method Summary collapse
-
#create(options) ⇒ InboundFolder
Creates a new inbound folder.
-
#delete(folder_id) ⇒ Object
Deletes an inbound folder along with all of its inboxes.
-
#get(folder_id) ⇒ InboundFolder
Retrieves a specific inbound folder.
-
#initialize(client = Mailtrap::Client.new) ⇒ InboundFoldersAPI
constructor
Inbound is scoped to the token's account, so no account_id is required.
-
#list ⇒ Array<InboundFolder>
Lists all inbound folders in the account.
-
#update(folder_id, options) ⇒ InboundFolder
Updates an inbound folder.
Methods included from BaseAPI
Constructor Details
#initialize(client = Mailtrap::Client.new) ⇒ InboundFoldersAPI
Inbound is scoped to the token's account, so no account_id is required.
15 16 17 |
# File 'lib/mailtrap/inbound_folders_api.rb', line 15 def initialize(client = Mailtrap::Client.new) @client = client end |
Instance Method Details
#create(options) ⇒ InboundFolder
Creates a new inbound folder
40 41 42 |
# File 'lib/mailtrap/inbound_folders_api.rb', line 40 def create() base_create() end |
#delete(folder_id) ⇒ Object
Deletes an inbound folder along with all of its inboxes
59 60 61 |
# File 'lib/mailtrap/inbound_folders_api.rb', line 59 def delete(folder_id) base_delete(folder_id) end |
#get(folder_id) ⇒ InboundFolder
Retrieves a specific inbound folder
30 31 32 |
# File 'lib/mailtrap/inbound_folders_api.rb', line 30 def get(folder_id) base_get(folder_id) end |
#list ⇒ Array<InboundFolder>
Lists all inbound folders in the account
22 23 24 |
# File 'lib/mailtrap/inbound_folders_api.rb', line 22 def list base_list end |
#update(folder_id, options) ⇒ InboundFolder
Updates an inbound folder
51 52 53 |
# File 'lib/mailtrap/inbound_folders_api.rb', line 51 def update(folder_id, ) base_update(folder_id, ) end |