#USER, ASSIGN_ROLE, not need as we getting arry as parms role_array = [] for role in role_list do role_array.push(role) end #USER, GET USER BY ROLE, fetching a lot of data role = "Admin"; 1 userList = userService.get_users_by_role(role) puts "userName is #{user.userName}"; puts "email is #{user.email}"; puts "firstName #{user.profile.firstName}"; userRoleList = user.roleList(); jsonResponse = user.to_s() #obj.get_all_users_count ## TODO, undefine call methods def get_all_users_count response = @@user_obj.get_all_users_count success = response.isResponseSuccess response totalRecords = response.totalRecords jsonResponse = response.to_s end #TODO, wrong no of argument userName = "Nick"; pwd = "********"; emailId = "nick@shephertz.com"; profileData = App42::User::User::Profile.new(); profileData.firstName = "Nick"; profileData.lastName = "Gill"; userList = userService.get_user_by_profile_data(profileData); for user in userList do puts "UserName is #{user.userName}"; puts "EmailId is #{user.email}"; end jsonResponse = userList.to_s() #obj.create_user ,# TODO uninitialized constant App42::User::User::Profile (NameError) def create_user user_name = "pravin80" email = "pravin80@shephertz.com" user = @@user_obj.create_user(user_name, "123456", email) profile_obj = App42::User::User::Profile.new profile_obj.officeLandLine = ("+1-1800-111-999") profile_obj.firstName = "Nick" profile_obj.dateOfBirth = "03-11-2012" profile_obj.country = ("USA") profile_obj.city = ("Houston") profile_obj.lastName = ("Gill") profile_obj.mobile = ("+958901234571") profile_obj.pincode = ("74193") profile_obj.sex = App42::User::User::UserGender.new.enum("MALE") profile_obj.homeLandLine = ("+1-1800-877-453") profile_obj.state = ("Texas") user.profile= profile_obj user_obj = @@user_obj.createOrUpdateProfile(user) puts "userName is #{user_obj.userName}" puts "email is #{user_obj.email}" puts "firstName #{user_obj.profile.firstName}" jsonResponse = user_obj.to_s() end