lib/slack/web/api/endpoints/users_admin.rb in slack-ruby-client-1.1.0 vs lib/slack/web/api/endpoints/users_admin.rb in slack-ruby-client-2.0.0
- old
+ new
@@ -23,11 +23,11 @@
# Invite a guest that can use multiple channels
# @option options [Object] :ultra_restricted
# Invite a guest that can use one channel only
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.admin/users.admin.invite.json
def users_admin_invite(options = {})
- throw ArgumentError.new('Required arguments :email missing') if options[:email].nil?
+ raise ArgumentError, 'Required arguments :email missing' if options[:email].nil?
logger.warn('The users.admin.invite method is undocumented.')
post('users.admin.invite', options)
end
#
@@ -35,10 +35,10 @@
#
# @option options [user] :user
# User to disable
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.admin/users.admin.setInactive.json
def users_admin_setInactive(options = {})
- throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
+ raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
logger.warn('The users.admin.setInactive method is undocumented.')
post('users.admin.setInactive', options)
end
end