lib/auth0/api/v1/users.rb in auth0-4.0.0 vs lib/auth0/api/v1/users.rb in auth0-4.1.0
- old
+ new
@@ -11,20 +11,20 @@
path = '/api/users'
path += "?search=#{search}" unless search.to_s.empty?
get(path)
end
- alias_method :users_search, :users
- alias_method :get_users, :users
+ alias users_search users
+ alias get_users users
# {https://auth0.com/docs/api#!#get--api-users--user_id-}
def user(user_id)
path = "/api/users/#{user_id}"
get(path)
end
- alias_method :get_user, :user
+ alias get_user user
# {https://auth0.com/docs/api#!#get--api-users--user_id--devices}
def user_devices(user_id)
path = "/api/users/#{user_id}/devices"
get(path)
@@ -36,11 +36,11 @@
path = "/api/connections/#{connection_name}/users"
path += "?search=#{search}" unless search.to_s.empty?
get(path)
end
- alias_method :search_connection_users, :connection_users
+ alias search_connection_users connection_users
# {https://auth0.com/docs/api#!#get--api-enterpriseconnections-users-search--criteria-}
def enterpriseconnections_users(search_criteria = nil, per_page = 500)
path = "/api/enterpriseconnections/users?search=#{search_criteria}&per_page=#{per_page.to_i}"
get(path)
@@ -140,10 +140,10 @@
delete(path)
end
# {https://auth0.com/docs/api#!#delete--api-users--user_id-}
def delete_user(user_id)
- fail Auth0::MissingUserId, 'if you want to remove all users use delete_users method' if user_id.to_s.empty?
+ raise Auth0::MissingUserId, 'if you want to remove all users use delete_users method' if user_id.to_s.empty?
path = "/api/users/#{user_id}"
delete(path)
end
# {https://auth0.com/docs/api#!#delete--api-users--user_id--refresh_tokens--refresh_token-}