Class: BandwidthIris::User

Inherits:
Object
  • Object
show all
Extended by:
ClientWrapper
Includes:
ApiItem
Defined in:
lib/bandwidth-iris/user.rb

Class Method Summary collapse

Methods included from ClientWrapper

wrap_client_arg

Methods included from ApiItem

#[], #[]=, #initialize, #to_data

Class Method Details

.list(client) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/bandwidth-iris/user.rb', line 8

def self.list(client)
  list = client.make_request(:get, USER_PATH)[0][:users][:user]
  return [] if !list
  list = if list.is_a?(Array) then list else [list] end
  list.map do |i|
    User.new(i, client)
  end
end