Module: Zoom::Actions::Account

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

Instance Method Summary collapse

Instance Method Details

#account_create(*args) ⇒ Object



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

def (*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(%i[first_name last_name email password]).permit(options: %i[share_rc room_connectors share_mc meeting_connectors pay_mode])
  Utils.parse_response self.class.post('/accounts', body: params.to_json, headers: request_headers)
end

#account_delete(*args) ⇒ Object



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

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

#account_get(*args) ⇒ Object



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

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

#account_get_locked_settings(*args) ⇒ Object



55
56
57
58
59
# File 'lib/zoom/actions/account.rb', line 55

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

#account_list(*args) ⇒ Object



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

def (*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.permit(%i[page_size page_number])
  Utils.parse_response self.class.get('/accounts', query: params, headers: request_headers)
end

#account_managed_domains(*args) ⇒ Object



49
50
51
52
53
# File 'lib/zoom/actions/account.rb', line 49

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

#account_options_update(*args) ⇒ Object



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

def (*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id).permit(%i[share_rc room_connectors share_mc meeting_connectors pay_mode])
  Utils.parse_response self.class.patch("/accounts/#{params[:account_id]}/options", body: params.except(:account_id).to_json, headers: request_headers)
end

#account_settings_get(*args) ⇒ Object



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

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

#account_settings_update(*args) ⇒ Object



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

def (*args)
  params = Zoom::Params.new(Utils.extract_options!(args))
  params.require(:account_id).permit(:option, Zoom::Constants::Account::Settings::PERMITTED_KEYS)
  params.permit_value(:option, Zoom::Constants::Account::Settings::PERMITTED_OPTIONS)
  Utils.parse_response self.class.patch("/accounts/#{params[:account_id]}/settings", query: params.slice(:option), body: params.except(%i[account_id option]).to_json, headers: request_headers)
end

#account_trusted_domains(*args) ⇒ Object



61
62
63
64
65
# File 'lib/zoom/actions/account.rb', line 61

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