Module: Five9::UserManagement
- Defined in:
- lib/five9/user_management.rb
Class Method Summary collapse
- .connected? ⇒ Boolean
- .create_user(user_info = {}) ⇒ Object
- .delete_user(username) ⇒ Object
- .establish_connection(adminuser, password) ⇒ Object
- .get_users_general_info(username_pattern = nil) ⇒ Object
- .get_users_info(username_pattern = nil) ⇒ Object
- .modify_user(args) ⇒ Object
- .user_skill_add(skill) ⇒ Object
- .user_skill_modify(skill) ⇒ Object
- .user_skill_remove(skill) ⇒ Object
Class Method Details
.connected? ⇒ Boolean
11 12 13 |
# File 'lib/five9/user_management.rb', line 11 def connected? @connected end |
.create_user(user_info = {}) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/five9/user_management.rb', line 15 def create_user user_info = {} validate_connection do response = @client.call :create_user, { message: { userInfo: user_info } } process_return_hash response, :create_user_response end end |
.delete_user(username) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/five9/user_management.rb', line 23 def delete_user username validate_connection do response = @client.call :delete_user, message: { user_name: username } process_return_hash response, :delete_user_response end end |
.establish_connection(adminuser, password) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/five9/user_management.rb', line 4 def establish_connection adminuser, password @client = Base.new(adminuser, password, "https://api.five9.com/wsadmin/v2/AdminWebService?wsdl&user=") .instance_variable_get :@client @connected = true end |
.get_users_general_info(username_pattern = nil) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/five9/user_management.rb', line 30 def get_users_general_info username_pattern = nil validate_connection do response = @client.call :get_users_general_info, message: { userNamePattern: username_pattern } process_return_hash response, :get_users_general_info_response end end |
.get_users_info(username_pattern = nil) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/five9/user_management.rb', line 38 def get_users_info username_pattern = nil validate_connection do response = @client.call :get_users_info, message: { userNamePattern: username_pattern } process_return_hash response, :get_users_info_response end end |
.modify_user(args) ⇒ Object
46 47 48 49 50 51 |
# File 'lib/five9/user_management.rb', line 46 def modify_user args validate_connection do response = @client.call :modify_user, message: args process_return_hash response, :modify_user_response end end |
.user_skill_add(skill) ⇒ Object
53 54 55 56 57 58 |
# File 'lib/five9/user_management.rb', line 53 def user_skill_add skill validate_connection do response = @client.call :user_skill_add, message: skill process_return_hash response, :user_skill_add_response end end |
.user_skill_modify(skill) ⇒ Object
60 61 62 63 64 65 |
# File 'lib/five9/user_management.rb', line 60 def user_skill_modify skill validate_connection do response = @client.call :user_skill_modify, message: skill process_return_hash response, :user_skill_modify_response end end |
.user_skill_remove(skill) ⇒ Object
67 68 69 70 71 72 |
# File 'lib/five9/user_management.rb', line 67 def user_skill_remove skill validate_connection do response = @client.call :user_skill_remove, message: skill process_return_hash response, :user_skill_remove_response end end |