7
8
9
10
11
12
13
|
# File 'lib/bandwidth-iris/available_number.rb', line 7
def self.list(client, query)
response = client.make_request(:get, client.concat_account_path(AVAILABLE_NUMBER_PATH), query)
list = response[0] && response[0][:telephone_number_list] && response[0][:telephone_number_list][:telephone_number]
list ||= response[0] && response[0][:telephone_number_detail_list] && response[0][:telephone_number_detail_list][:telephone_number_detail]
return [] if !list
if list.is_a?(Array) then list else [list] end
end
|