Module: Zendesk::UserIdentity

Included in:
Main
Defined in:
lib/zendesk/user_identity.rb

Instance Method Summary collapse

Instance Method Details

#user_add_email(user_id, email) ⇒ Object



12
13
14
# File 'lib/zendesk/user_identity.rb', line 12

def user_add_email(user_id, email)
  make_request("users/#{user_id}/user_identities", :create => "<email>#{email}</email>")
end

#user_add_twitter(user_id, twitter) ⇒ Object



4
5
6
# File 'lib/zendesk/user_identity.rb', line 4

def user_add_twitter(user_id, twitter)
  make_request("users/#{user_id}/user_identities", :create => "<twitter>#{twitter}</twitter>")
end

#user_delete_identity(user_id, id) ⇒ Object



16
17
18
# File 'lib/zendesk/user_identity.rb', line 16

def user_delete_identity(user_id, id)
  make_request("users/#{user_id}/user_identities/#{id}", :destroy => true)
end

#user_identities(user_id) ⇒ Object



20
21
22
# File 'lib/zendesk/user_identity.rb', line 20

def user_identities(user_id)
  make_request("users/#{user_id}/user_identities")
end

#user_primary_identity(user_id, id) ⇒ Object



8
9
10
# File 'lib/zendesk/user_identity.rb', line 8

def user_primary_identity(user_id, id)
  make_request("users/#{user_id}/user_identities/#{id}/make_primary", :post => true)
end