lib/intercom/api_operations/convert.rb in intercom-2.5.4 vs lib/intercom/api_operations/convert.rb in intercom-3.0.0b1

- old
+ new

@@ -1,16 +1,16 @@ require 'intercom/traits/api_resource' module Intercom module ApiOperations module Convert - def convert(user) - from_response( - Intercom.post( + def convert(contact, user) + Intercom::User.new.from_response( + @client.post( "/contacts/convert", { - contact: { user_id: user_id }, - user: user.identity_hash + contact: { user_id: contact.user_id }, + user: identity_hash(user) } ) ) end end