Module: Intercom::ExtendedApiOperations::Reply

Included in:
Conversation
Defined in:
lib/intercom/extended_api_operations/reply.rb

Instance Method Summary collapse

Instance Method Details

#reply(reply_data) ⇒ Object



7
8
9
10
11
12
# File 'lib/intercom/extended_api_operations/reply.rb', line 7

def reply(reply_data)
  collection_name = Utils.resource_class_to_collection_name(self.class)
  # TODO: For server, we should not need to merge in :conversation_id here (already in the URL)
  response = Intercom.post("/#{collection_name}/#{id}/reply", reply_data.merge(:conversation_id => id))
  from_response(response)
end