Module: Frontapp::Client::Inboxes
- Included in:
- Frontapp::Client
- Defined in:
- lib/frontapp/client/inboxes.rb
Instance Method Summary collapse
-
#create_inbox!(params = {}) ⇒ Object
Allowed attributes: Name Type Description ——————————————- name string Name of the inbox teammate_ids array (optional) List of all the teammate ids who will have access to this inbox.
-
#get_inbox(inbox_id) ⇒ Object
Parameters Name Type Description —————————– inbox_id string Id of the requested inbox —————————–.
-
#get_inbox_channels(inbox_id) ⇒ Object
Parameters Name Type Description —————————– inbox_id string Id of the requested inbox —————————–.
-
#get_inbox_conversations(inbox_id, params = {}) ⇒ Object
Parameters Name Type Description —————————– inbox_id string Id of the requested inbox —————————–.
-
#get_inbox_teammates(inbox_id) ⇒ Object
Parameters Name Type Description —————————– inbox_id string Id of the requested inbox —————————–.
- #inboxes(params = {}) ⇒ Object
Instance Method Details
#create_inbox!(params = {}) ⇒ Object
Allowed attributes: Name Type Description
name string Name of the inbox teammate_ids array (optional) List of all the teammate ids who will have access to this inbox. If omitted, it will automatically select all the administrators in your company.
24 25 26 27 |
# File 'lib/frontapp/client/inboxes.rb', line 24 def create_inbox!(params = {}) cleaned = params.permit(:name, :teammate_ids) create("inboxes", cleaned) end |
#get_inbox(inbox_id) ⇒ Object
Parameters Name Type Description
inbox_id string Id of the requested inbox
14 15 16 |
# File 'lib/frontapp/client/inboxes.rb', line 14 def get_inbox(inbox_id) get("inboxes/#{inbox_id}") end |
#get_inbox_channels(inbox_id) ⇒ Object
Parameters Name Type Description
inbox_id string Id of the requested inbox
34 35 36 |
# File 'lib/frontapp/client/inboxes.rb', line 34 def get_inbox_channels(inbox_id) get("inboxes/#{inbox_id}/channels") end |
#get_inbox_conversations(inbox_id, params = {}) ⇒ Object
Parameters Name Type Description
inbox_id string Id of the requested inbox
Allowed attributes: Name Type Description
q object (optional) Search query. q.statuses array (optional) List of the statuses of the conversations you want to list
50 51 52 53 |
# File 'lib/frontapp/client/inboxes.rb', line 50 def get_inbox_conversations(inbox_id, params = {}) cleaned = params.permit({ q: [:statuses] }) list("inboxes/#{inbox_id}/conversations", cleaned) end |
#get_inbox_teammates(inbox_id) ⇒ Object
Parameters Name Type Description
inbox_id string Id of the requested inbox
60 61 62 |
# File 'lib/frontapp/client/inboxes.rb', line 60 def get_inbox_teammates(inbox_id) get("inboxes/#{inbox_id}/teammates") end |
#inboxes(params = {}) ⇒ Object
5 6 7 |
# File 'lib/frontapp/client/inboxes.rb', line 5 def inboxes(params = {}) list("inboxes", params) end |