Module: Zoom::Actions::SipAudio

Included in:
Client
Defined in:
lib/zoom/actions/sip_audio.rb

Instance Method Summary collapse

Instance Method Details

#sip_trunk_numbers_delete(*args) ⇒ Object



18
19
20
21
22
# File 'lib/zoom/actions/sip_audio.rb', line 18

def sip_trunk_numbers_delete(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id)
  Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}/sip_trunk/numbers", headers: request_headers)
end

#sip_trunks_delete(*args) ⇒ Object



12
13
14
15
16
# File 'lib/zoom/actions/sip_audio.rb', line 12

def sip_trunks_delete(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id, :trunk_id)
  Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}/sip_trunk/trunks/#{params[:trunk_id]}", headers: request_headers)
end

#sip_trunks_get(*args) ⇒ Object



6
7
8
9
10
# File 'lib/zoom/actions/sip_audio.rb', line 6

def sip_trunks_get(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id)
  Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/sip_trunk/trunks", headers: request_headers)
end

#sip_trunks_internal_callout_countries_add(*args) ⇒ Object



62
63
64
65
66
# File 'lib/zoom/actions/sip_audio.rb', line 62

def sip_trunks_internal_callout_countries_add(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id)
  Utils.parse_response self.class.post("/accounts/#{params[:account_id]}/sip_trunk/callout_countries", headers: request_headers)
end

#sip_trunks_internal_callout_country_delete(*args) ⇒ Object



30
31
32
33
34
# File 'lib/zoom/actions/sip_audio.rb', line 30

def sip_trunks_internal_callout_country_delete(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(%i[account_id country_id])
  Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}/sip_trunk/callout_countries/#{params[:country_id]}", headers: request_headers)
end

#sip_trunks_internal_callout_country_list(*args) ⇒ Object



43
44
45
46
47
48
# File 'lib/zoom/actions/sip_audio.rb', line 43

def sip_trunks_internal_callout_country_list(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id)
  response = self.class.get("/accounts/#{params[:account_id]}/sip_trunk/callout_countries", headers: request_headers)
  Utils.parse_response(response)
end

#sip_trunks_internal_numbers_add(*args) ⇒ Object



56
57
58
59
60
# File 'lib/zoom/actions/sip_audio.rb', line 56

def sip_trunks_internal_numbers_add(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id)
  Utils.parse_response self.class.post("/accounts/#{params[:account_id]}/sip_trunk/internal_numbers", headers: request_headers)
end

#sip_trunks_internal_numbers_delete(*args) ⇒ Object



24
25
26
27
28
# File 'lib/zoom/actions/sip_audio.rb', line 24

def sip_trunks_internal_numbers_delete(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(%i[account_id number_id])
  Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}/sip_trunk/internal_numbers/#{params[:number_id]}", headers: request_headers)
end

#sip_trunks_internal_numbers_list(*args) ⇒ Object



36
37
38
39
40
41
# File 'lib/zoom/actions/sip_audio.rb', line 36

def sip_trunks_internal_numbers_list(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id).permit(%i[page_size next_page_token])
  response = self.class.get("/accounts/#{params[:account_id]}/sip_trunk/internal_numbers", query: params, headers: request_headers)
  Utils.parse_response(response)
end

#sip_trunks_numbers_assign(*args) ⇒ Object



68
69
70
71
72
# File 'lib/zoom/actions/sip_audio.rb', line 68

def sip_trunks_numbers_assign(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id)
  Utils.parse_response self.class.post("/accounts/#{params[:account_id]}/sip_trunk/numbers", headers: request_headers)
end

#sip_trunks_numbers_list(*args) ⇒ Object



50
51
52
53
54
# File 'lib/zoom/actions/sip_audio.rb', line 50

def sip_trunks_numbers_list(*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  response = self.class.get("/sip_trunk/numbers", headers: request_headers)
  Utils.parse_response(response)
end