Module: Frontapp::Client::Conversations

Included in:
Frontapp::Client
Defined in:
lib/frontapp/client/conversations.rb

Instance Method Summary collapse

Instance Method Details

#conversations(params = {}) ⇒ Object



5
6
7
# File 'lib/frontapp/client/conversations.rb', line 5

def conversations(params = {})
  list("conversations", params)
end

#get_conversation(conversation_id) ⇒ Object

Parameters Name Type Description


conversation_id string Id of the requested conversation




14
15
16
# File 'lib/frontapp/client/conversations.rb', line 14

def get_conversation(conversation_id)
  get("conversations/#{conversation_id}")
end

#get_conversation_events(conversation_id) ⇒ Object

Parameters Name Type Description


conversation_id string Id or email of the requested conversation




60
61
62
# File 'lib/frontapp/client/conversations.rb', line 60

def get_conversation_events(conversation_id)
  list("conversations/#{conversation_id}/events")
end

#get_conversation_followers(conversation_id) ⇒ Object

Parameters Name Type Description


conversation_id string Id or email of the requested conversation




51
52
53
# File 'lib/frontapp/client/conversations.rb', line 51

def get_conversation_followers(conversation_id)
  get("conversations/#{conversation_id}/followers")
end

#get_conversation_inboxes(conversation_id) ⇒ Object

Parameters Name Type Description


conversation_id string Id or email of the requested conversation




42
43
44
# File 'lib/frontapp/client/conversations.rb', line 42

def get_conversation_inboxes(conversation_id)
  get("conversations/#{conversation_id}/inboxes")
end

#get_conversation_messages(conversation_id) ⇒ Object

Parameters Name Type Description


conversation_id string Id or email of the requested conversation




69
70
71
# File 'lib/frontapp/client/conversations.rb', line 69

def get_conversation_messages(conversation_id)
  list("conversations/#{conversation_id}/messages")
end

#update_conversation!(conversation_id, params = {}) ⇒ Object

Parameters Name Type Description


conversation_id string Id of the requested conversation


Allowed attributes: Name Type Description


assignee_id string (optional) ID of the teammate to assign the conversation to. Set it to null to unassign. status enum (optional) New status of the conversation tags array (optional) List of all the tag names replacing the old conversation tags


The assignee id is their Frontapp handle, e.g. @username



32
33
34
35
# File 'lib/frontapp/client/conversations.rb', line 32

def update_conversation!(conversation_id, params = {})
  cleaned = params.permit(:assignee_id, :status, :tags)
  update("conversations/#{conversation_id}", cleaned)
end