Module: Zendesk::User

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

Instance Method Summary collapse

Instance Method Details

#create_user(input) ⇒ Object



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

def create_user(input)
  make_request("users", :create => Zendesk::Main.to_xml('user', input))
end

#delete_user(id) ⇒ Object



24
25
26
# File 'lib/zendesk/user.rb', line 24

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

#get_user(id) ⇒ Object



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

def get_user(id)
  make_request("users/#{id}")
end

#get_users(params = nil) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/zendesk/user.rb', line 4

def get_users(params = nil)
  if params
    make_request("users", :list => params)
  else
    make_request("users")
  end
end

#update_user(id, input) ⇒ Object



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

def update_user(id, input)
  make_request("users/#{id}", :update => Zendesk::Main.to_xml('user', input))
end