Class: BandwidthIris::PortOut
- Inherits:
-
Object
- Object
- BandwidthIris::PortOut
show all
- Extended by:
- ClientWrapper
- Includes:
- ApiItem
- Defined in:
- lib/bandwidth-iris/port_out.rb
Instance Method Summary
collapse
wrap_client_arg
Methods included from ApiItem
#[], #[]=, #initialize, #to_data
Instance Method Details
#add_notes(note) ⇒ Object
18
19
20
21
22
|
# File 'lib/bandwidth-iris/port_out.rb', line 18
def add_notes(note)
r = @client.make_request(:post, "#{@client.concat_account_path(PORT_OUT_PATH)}/#{id}/notes", {:note => note})
note_id = Client.(r[1][:location])
(get_notes().select {|n| n[:id].to_s == note_id }).first
end
|
#get_notes ⇒ Object
8
9
10
11
12
13
14
15
16
|
# File 'lib/bandwidth-iris/port_out.rb', line 8
def get_notes()
list = @client.make_request(:get, "#{@client.concat_account_path(PORT_OUT_PATH)}/#{id}/notes")[0][:note]
return [] if !list
if list.is_a?(Array)
list
else
[list]
end
end
|