Module: Intercom::ApiOperations::Convert

Included in:
Service::Contact
Defined in:
lib/intercom/api_operations/convert.rb

Instance Method Summary collapse

Instance Method Details

#convert(contact, user) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/intercom/api_operations/convert.rb', line 6

def convert(contact, user)
  Intercom::User.new.from_response(
    @client.post(
      "/contacts/convert",
      {
        contact: { user_id: contact.user_id },
        user: identity_hash(user)
      }
    )
  )
end