Class: ZoomUs::Phone

Inherits:
Object
  • Object
show all
Defined in:
lib/zoom_us/phone.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ Phone

Returns a new instance of Phone.



19
20
21
# File 'lib/zoom_us/phone.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/zoom_us/phone.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#account_call_logs(opts = {}) ⇒ InlineResponse20066

Get Account’s Call Logs Retrieve [call logs](support.zoom.us/hc/en-us/articles/360021114452-Viewing-Call-Logs) for an account. Scopes: ‘phone:read:admin`

Prerequisite:
1. Business or Enterprise account
2. A Zoom Phone license
3. Account Owner and a [role](support.zoom.us/hc/en-us/articles/115001078646-Role-Based-Access-Control) with Zoom Phone Management

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call. (default to 30)

  • :page_number (Integer)

    The current page number of returned records. (default to 1)

  • :from (String)

    Start date from which you would like to get the call logs. The start date should be within past six months.

  • :to (String)

    The end date upto which you would like to get the call logs for. The end date should be within past six months.

  • :type (String)

    The type of the call logs. The value can be either "all" or "missed".

Returns:

  • (InlineResponse20066)


31
32
33
34
# File 'lib/zoom_us/phone.rb', line 31

def (opts = {})
  data, _status_code, _headers = (opts)
  data
end

#account_call_logs_with_http_info(opts = {}) ⇒ Array<(InlineResponse20066, Fixnum, Hash)>

Get Account&#39;s Call Logs Retrieve [call logs](support.zoom.us/hc/en-us/articles/360021114452-Viewing-Call-Logs) for an account. Scopes: &#x60;phone:read:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite:&lt;br&gt; 1. Business or Enterprise account&lt;br&gt; 2. A Zoom Phone license&lt;br&gt; 3. Account Owner and a [role](support.zoom.us/hc/en-us/articles/115001078646-Role-Based-Access-Control) with Zoom Phone Management&lt;br&gt;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :page_number (Integer)

    The current page number of returned records.

  • :from (String)

    Start date from which you would like to get the call logs. The start date should be within past six months.

  • :to (String)

    The end date upto which you would like to get the call logs for. The end date should be within past six months.

  • :type (String)

    The type of the call logs. The value can be either &quot;all&quot; or &quot;missed&quot;.

Returns:

  • (Array<(InlineResponse20066, Fixnum, Hash)>)

    InlineResponse20066 data, response status code and response headers



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/zoom_us/phone.rb', line 45

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.account_call_logs ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 300
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PhoneApi.account_call_logs, must be smaller than or equal to 300.'
  end

  # resource path
  local_var_path = '/phone/call_logs'

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil?
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20066')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#account_call_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#assign_calling_plan(user_id, opts = {}) ⇒ Object

Assign Calling Plan to a User Assign [calling plan](marketplace.zoom.us/docs/api-reference/other-references/plans#zoom-phone-calling-plans) to a [Zoom Phone](support.zoom.us/hc/en-us/categories/360001370051-Zoom-Phone) user. Scopes: ‘phone:write` `phone:write:admin`

Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body47)

Returns:

  • (Object)


95
96
97
98
# File 'lib/zoom_us/phone.rb', line 95

def assign_calling_plan(user_id, opts = {})
  data, _status_code, _headers = assign_calling_plan_with_http_info(user_id, opts)
  data
end

#assign_calling_plan_with_http_info(user_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Assign Calling Plan to a User Assign [calling plan](marketplace.zoom.us/docs/api-reference/other-references/plans#zoom-phone-calling-plans) to a [Zoom Phone](support.zoom.us/hc/en-us/categories/360001370051-Zoom-Phone) user. Scopes: &#x60;phone:write&#x60; &#x60;phone:write:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body47)

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/zoom_us/phone.rb', line 106

def assign_calling_plan_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.assign_calling_plan ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.assign_calling_plan"
  end
  # resource path
  local_var_path = '/phone/users/{userId}/calling_plans'.sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#assign_calling_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#assign_phone_number(user_id, opts = {}) ⇒ InlineResponse20067

Assign Phone Number to User Assign a [phone number](support.zoom.us/hc/en-us/articles/360020808292-Managing-Phone-Numbers) to a user who has already enabled Zoom Phone. Scopes: ‘phone:write` `phone:write:admin`

Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body46)

    Provide either an id or a number in the request body.

Returns:

  • (InlineResponse20067)


151
152
153
154
# File 'lib/zoom_us/phone.rb', line 151

def assign_phone_number(user_id, opts = {})
  data, _status_code, _headers = assign_phone_number_with_http_info(user_id, opts)
  data
end

#assign_phone_number_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse20067, Fixnum, Hash)>

Assign Phone Number to User Assign a [phone number](support.zoom.us/hc/en-us/articles/360020808292-Managing-Phone-Numbers) to a user who has already enabled Zoom Phone. Scopes: &#x60;phone:write&#x60; &#x60;phone:write:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body46)

    Provide either an id or a number in the request body.

Returns:

  • (Array<(InlineResponse20067, Fixnum, Hash)>)

    InlineResponse20067 data, response status code and response headers



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/zoom_us/phone.rb', line 162

def assign_phone_number_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.assign_phone_number ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.assign_phone_number"
  end
  # resource path
  local_var_path = '/phone/users/{userId}/phone_numbers'.sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20067')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#assign_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#change_main_company_number(opts = {}) ⇒ Object

Change Main Company Number The [main company number](support.zoom.us/hc/en-us/articles/360028553691) can be used by external callers to reach your phone users (by dialing the main company number and the user’s extension). It can also be used by phone users in your account as their caller ID while making calls.
Use this API to [change the main company number](support.zoom.us/hc/en-us/articles/360028553691#h_82414c34-9df2-428a-85a4-efcf7f9e0d72) of an account.
Prerequisites:
* Pro or higher account plan. * Account owner or admin permissions
Scopes: ‘phone:write:admin`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body71)

Returns:

  • (Object)


206
207
208
209
# File 'lib/zoom_us/phone.rb', line 206

def change_main_company_number(opts = {})
  data, _status_code, _headers = change_main_company_number_with_http_info(opts)
  data
end

#change_main_company_number_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Change Main Company Number The [main company number](support.zoom.us/hc/en-us/articles/360028553691) can be used by external callers to reach your phone users (by dialing the main company number and the user&#39;s extension). It can also be used by phone users in your account as their caller ID while making calls.&lt;br&gt;&lt;br&gt; Use this API to [change the main company number](support.zoom.us/hc/en-us/articles/360028553691#h_82414c34-9df2-428a-85a4-efcf7f9e0d72) of an account.&lt;br&gt;&lt;br&gt; Prerequisites:&lt;br&gt; * Pro or higher account plan. * Account owner or admin permissions&lt;br&gt; Scopes: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body71)

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/zoom_us/phone.rb', line 216

def change_main_company_number_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.change_main_company_number ...'
  end
  # resource path
  local_var_path = '/phone/company_number'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#change_main_company_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_phone_number_details(number_id, opts = {}) ⇒ InlineResponse20092

Get Phone Number Details A Zoom account owner or admin can purchase phone numbers and assign them to Zoom phone users. Use this API to get details on a specific Phone number in a Zoom account.
Prerequisites:
* Pro or higher plan with Zoom phone license
Scope: ‘phone:read:admin`

Parameters:

  • number_id

    Unique Identifier of the Phone Number. This can be retrieved from the List Phone Numbers API.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (InlineResponse20092)


256
257
258
259
# File 'lib/zoom_us/phone.rb', line 256

def get_phone_number_details(number_id, opts = {})
  data, _status_code, _headers = get_phone_number_details_with_http_info(number_id, opts)
  data
end

#get_phone_number_details_with_http_info(number_id, opts = {}) ⇒ Array<(InlineResponse20092, Fixnum, Hash)>

Get Phone Number Details A Zoom account owner or admin can purchase phone numbers and assign them to Zoom phone users. Use this API to get details on a specific Phone number in a Zoom account.&lt;br&gt;&lt;br&gt; Prerequisites:&lt;br&gt; * Pro or higher plan with Zoom phone license&lt;br&gt; Scope: &#x60;phone:read:admin&#x60;&lt;br&gt;

Parameters:

  • number_id

    Unique Identifier of the Phone Number. This can be retrieved from the List Phone Numbers API.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse20092, Fixnum, Hash)>)

    InlineResponse20092 data, response status code and response headers



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/zoom_us/phone.rb', line 266

def get_phone_number_details_with_http_info(number_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.get_phone_number_details ...'
  end
  # verify the required parameter 'number_id' is set
  if @api_client.config.client_side_validation && number_id.nil?
    fail ArgumentError, "Missing the required parameter 'number_id' when calling PhoneApi.get_phone_number_details"
  end
  # resource path
  local_var_path = '/phone/numbers/{numberId}'.sub('{' + 'numberId' + '}', number_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20092')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#get_phone_number_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_account_phone_numbers(opts = {}) ⇒ InlineResponse200

List Phone Numbers A Zoom account owner or admin can purchase phone numbers and assign them to Zoom phone users. Use this API to list all Zoom Phone numbers in a Zoom account. You can filter the response based on your needs by using query parameters. Prerequisites:
* Pro or higher plan with Zoom phone license
Scope: ‘phone:read:admin`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

  • :type (String)

    Query response by number assignment. The value can be one of the following:&lt;br&gt; &#x60;assigned&#x60;: The number has been assigned to either a user, a call queue, an auto-receptionist or a common area phone in an account. &lt;br&gt;&#x60;unassigned&#x60;: The number is not assigned to anyone.&lt;br&gt; &#x60;all&#x60;: Include both assigned and unassigned numbers in the response.

  • :extension_type (String)

    The type of assignee to whom the number is assigned. The value can be one of the following:&lt;br&gt; &#x60;user&#x60;&lt;br&gt; &#x60;callQueue&#x60;&lt;br&gt; &#x60;autoReceptionist&#x60;&lt;br&gt; &#x60;commonAreaPhone&#x60;

  • :page_size (Integer)

    The number of records returned within a single API call. (default to 30)

  • :number_type (String)

    The type of phone number. The value can be either &#x60;toll&#x60; or &#x60;tollfree&#x60;.

  • :pending_numbers (BOOLEAN)

    Include or exclude pending numbers in the response. The value can be either &#x60;true&#x60; or &#x60;false&#x60;.

Returns:

  • (InlineResponse200)


315
316
317
318
# File 'lib/zoom_us/phone.rb', line 315

def (opts = {})
  data, _status_code, _headers = (opts)
  data
end

#list_account_phone_numbers_with_http_info(opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>

List Phone Numbers A Zoom account owner or admin can purchase phone numbers and assign them to Zoom phone users. Use this API to list all Zoom Phone numbers in a Zoom account. You can filter the response based on your needs by using query parameters. Prerequisites:&lt;br&gt; * Pro or higher plan with Zoom phone license&lt;br&gt; Scope: &#x60;phone:read:admin&#x60;&lt;br&gt;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

  • :type (String)

    Query response by number assignment. The value can be one of the following:&lt;br&gt; &#x60;assigned&#x60;: The number has been assigned to either a user, a call queue, an auto-receptionist or a common area phone in an account. &lt;br&gt;&#x60;unassigned&#x60;: The number is not assigned to anyone.&lt;br&gt; &#x60;all&#x60;: Include both assigned and unassigned numbers in the response.

  • :extension_type (String)

    The type of assignee to whom the number is assigned. The value can be one of the following:&lt;br&gt; &#x60;user&#x60;&lt;br&gt; &#x60;callQueue&#x60;&lt;br&gt; &#x60;autoReceptionist&#x60;&lt;br&gt; &#x60;commonAreaPhone&#x60;

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :number_type (String)

    The type of phone number. The value can be either &#x60;toll&#x60; or &#x60;tollfree&#x60;.

  • :pending_numbers (BOOLEAN)

    Include or exclude pending numbers in the response. The value can be either &#x60;true&#x60; or &#x60;false&#x60;.

Returns:

  • (Array<(InlineResponse200, Fixnum, Hash)>)

    InlineResponse200 data, response status code and response headers



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/zoom_us/phone.rb', line 330

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.list_account_phone_numbers ...'
  end
  if @api_client.config.client_side_validation && opts[:'type'] && !['assigned', 'unassigned', 'all'].include?(opts[:'type'])
    fail ArgumentError, 'invalid value for "type", must be one of assigned, unassigned, all'
  end
  if @api_client.config.client_side_validation && opts[:'extension_type'] && !['user', 'callQueue', 'autoReceptionist', 'commonAreaPhone'].include?(opts[:'extension_type'])
    fail ArgumentError, 'invalid value for "extension_type", must be one of user, callQueue, autoReceptionist, commonAreaPhone'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PhoneApi.list_account_phone_numbers, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && opts[:'number_type'] && !['toll', 'tollfree'].include?(opts[:'number_type'])
    fail ArgumentError, 'invalid value for "number_type", must be one of toll, tollfree'
  end
  # resource path
  local_var_path = '/phone/numbers'

  # query parameters
  query_params = {}
  query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'extension_type'] = opts[:'extension_type'] if !opts[:'extension_type'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'number_type'] = opts[:'number_type'] if !opts[:'number_type'].nil?
  query_params[:'pending_numbers'] = opts[:'pending_numbers'] if !opts[:'pending_numbers'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse200')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#list_account_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_calling_plans(opts = {}) ⇒ InlineResponse20093

List Calling Plans List all Zoom Phone [calling plans](marketplace.zoom.us/docs/api-reference/other-references/plans#zoom-phone-calling-plans) that are enabled for a Zoom account.
Prerequisites:
* Pro or a higher account with Zoom phone license.
Scope: ‘phone:read:admin`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (InlineResponse20093)


388
389
390
391
# File 'lib/zoom_us/phone.rb', line 388

def list_calling_plans(opts = {})
  data, _status_code, _headers = list_calling_plans_with_http_info(opts)
  data
end

#list_calling_plans_with_http_info(opts = {}) ⇒ Array<(InlineResponse20093, Fixnum, Hash)>

List Calling Plans List all Zoom Phone [calling plans](marketplace.zoom.us/docs/api-reference/other-references/plans#zoom-phone-calling-plans) that are enabled for a Zoom account.&lt;br&gt;&lt;br&gt; Prerequisites:&lt;br&gt; * Pro or a higher account with Zoom phone license. &lt;br&gt; Scope: &#x60;phone:read:admin&#x60;&lt;br&gt;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse20093, Fixnum, Hash)>)

    InlineResponse20093 data, response status code and response headers



397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/zoom_us/phone.rb', line 397

def list_calling_plans_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.list_calling_plans ...'
  end
  # resource path
  local_var_path = '/phone/calling_plans'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20093')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#list_calling_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_phone_users(opts = {}) ⇒ InlineResponse20094

List Phone Users List all the users on an account who have been assigned Zoom Phone licenses.
Prerequisites:
* Pro or higher plan with Zoom phone license
Scope: ‘phone:read:admin`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned from a single API call. (default to 30)

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

  • :site_id (String)

    Unique Identifier of the site. This can be retrieved from List Phone Sites API.

Returns:

  • (InlineResponse20094)


439
440
441
442
# File 'lib/zoom_us/phone.rb', line 439

def list_phone_users(opts = {})
  data, _status_code, _headers = list_phone_users_with_http_info(opts)
  data
end

#list_phone_users_with_http_info(opts = {}) ⇒ Array<(InlineResponse20094, Fixnum, Hash)>

List Phone Users List all the users on an account who have been assigned Zoom Phone licenses.&lt;br&gt;&lt;br&gt; Prerequisites:&lt;br&gt; * Pro or higher plan with Zoom phone license&lt;br&gt; Scope: &#x60;phone:read:admin&#x60;&lt;br&gt;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned from a single API call.

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

  • :site_id (String)

    Unique Identifier of the site. This can be retrieved from List Phone Sites API.

Returns:

  • (Array<(InlineResponse20094, Fixnum, Hash)>)

    InlineResponse20094 data, response status code and response headers



451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/zoom_us/phone.rb', line 451

def list_phone_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.list_phone_users ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PhoneApi.list_phone_users, must be smaller than or equal to 100.'
  end

  # resource path
  local_var_path = '/phone/users'

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
  query_params[:'site_id'] = opts[:'site_id'] if !opts[:'site_id'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20094')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#list_phone_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#phone_user(user_id, opts = {}) ⇒ InlineResponse20061

Get User’s Profile Retrieve a user’s [zoom phone](support.zoom.us/hc/en-us/articles/360001297663-Quickstart-Guide-for-Zoom-Phone-Administrators) profile. Scopes: ‘phone:read`, `phone:read:admin`
Prerequisites : 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (InlineResponse20061)


498
499
500
501
# File 'lib/zoom_us/phone.rb', line 498

def phone_user(user_id, opts = {})
  data, _status_code, _headers = phone_user_with_http_info(user_id, opts)
  data
end

#phone_user_call_logs(user_id, from, to, opts = {}) ⇒ InlineResponse20063

Get User’s Call Logs Retrieve a [zoom phone](support.zoom.us/hc/en-us/articles/360001297663-Quickstart-Guide-for-Zoom-Phone-Administrators) user’s call logs. Scopes: ‘phone:read`, `phone:read:admin`

Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • from

    Start date in &#39;yyyy-mm-dd&#39; format. The date range defined by the &quot;from&quot; and &quot;to&quot; parameters should only be one month as the report includes only one month worth of data at once.

  • to

    End date.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call. (default to 30)

  • :page_number (Integer)

    The current page number of returned records. (default to 1)

  • :type (String)

Returns:

  • (InlineResponse20063)


557
558
559
560
# File 'lib/zoom_us/phone.rb', line 557

def phone_user_call_logs(user_id, from, to, opts = {})
  data, _status_code, _headers = phone_user_call_logs_with_http_info(user_id, from, to, opts)
  data
end

#phone_user_call_logs_with_http_info(user_id, from, to, opts = {}) ⇒ Array<(InlineResponse20063, Fixnum, Hash)>

Get User&#39;s Call Logs Retrieve a [zoom phone](support.zoom.us/hc/en-us/articles/360001297663-Quickstart-Guide-for-Zoom-Phone-Administrators) user&#39;s call logs. Scopes: &#x60;phone:read&#x60;, &#x60;phone:read:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • from

    Start date in &#39;yyyy-mm-dd&#39; format. The date range defined by the &quot;from&quot; and &quot;to&quot; parameters should only be one month as the report includes only one month worth of data at once.

  • to

    End date.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :page_number (Integer)

    The current page number of returned records.

  • :type (String)

Returns:

  • (Array<(InlineResponse20063, Fixnum, Hash)>)

    InlineResponse20063 data, response status code and response headers



572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
# File 'lib/zoom_us/phone.rb', line 572

def phone_user_call_logs_with_http_info(user_id, from, to, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.phone_user_call_logs ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.phone_user_call_logs"
  end
  # verify the required parameter 'from' is set
  if @api_client.config.client_side_validation && from.nil?
    fail ArgumentError, "Missing the required parameter 'from' when calling PhoneApi.phone_user_call_logs"
  end
  # verify the required parameter 'to' is set
  if @api_client.config.client_side_validation && to.nil?
    fail ArgumentError, "Missing the required parameter 'to' when calling PhoneApi.phone_user_call_logs"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 300
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PhoneApi.phone_user_call_logs, must be smaller than or equal to 300.'
  end

  if @api_client.config.client_side_validation && opts[:'type'] && !['all', 'missed'].include?(opts[:'type'])
    fail ArgumentError, 'invalid value for "type", must be one of all, missed'
  end
  # resource path
  local_var_path = '/phone/users/{userId}/call_logs'.sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'from'] = from
  query_params[:'to'] = to
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20063')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#phone_user_call_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#phone_user_recordings(user_id, opts = {}) ⇒ InlineResponse20064

Get User’s Recordings Retrieve a user’s zoom [phone recordings](support.zoom.us/hc/en-us/articles/360021336671-Viewing-Call-History-and-Recordings). Scopes: ‘phone:read`, `phone:read:admin`

Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call. (default to 30)

  • :page_number (Integer)

    The current page number of returned records. (default to 1)

Returns:

  • (InlineResponse20064)


638
639
640
641
# File 'lib/zoom_us/phone.rb', line 638

def phone_user_recordings(user_id, opts = {})
  data, _status_code, _headers = phone_user_recordings_with_http_info(user_id, opts)
  data
end

#phone_user_recordings_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse20064, Fixnum, Hash)>

Get User&#39;s Recordings Retrieve a user&#39;s zoom [phone recordings](support.zoom.us/hc/en-us/articles/360021336671-Viewing-Call-History-and-Recordings). Scopes: &#x60;phone:read&#x60;, &#x60;phone:read:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :page_number (Integer)

    The current page number of returned records.

Returns:

  • (Array<(InlineResponse20064, Fixnum, Hash)>)

    InlineResponse20064 data, response status code and response headers



650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
# File 'lib/zoom_us/phone.rb', line 650

def phone_user_recordings_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.phone_user_recordings ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.phone_user_recordings"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 300
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PhoneApi.phone_user_recordings, must be smaller than or equal to 300.'
  end

  # resource path
  local_var_path = '/phone/users/{userId}/recordings'.sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20064')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#phone_user_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#phone_user_settings(user_id, opts = {}) ⇒ InlineResponse20062

Get User’s Settings Retrieve a user’s zoom phone profile [settings](support.zoom.us/hc/en-us/articles/360021325712-Configuring-Settings). Scopes: ‘phone:read`, `phone:read:admin`

Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (InlineResponse20062)


700
701
702
703
# File 'lib/zoom_us/phone.rb', line 700

def (user_id, opts = {})
  data, _status_code, _headers = (user_id, opts)
  data
end

#phone_user_settings_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse20062, Fixnum, Hash)>

Get User&#39;s Settings Retrieve a user&#39;s zoom phone profile [settings](support.zoom.us/hc/en-us/articles/360021325712-Configuring-Settings). Scopes: &#x60;phone:read&#x60;, &#x60;phone:read:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse20062, Fixnum, Hash)>)

    InlineResponse20062 data, response status code and response headers



710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'lib/zoom_us/phone.rb', line 710

def (user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.phone_user_settings ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.phone_user_settings"
  end
  # resource path
  local_var_path = '/phone/users/{userId}/settings'.sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20062')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#phone_user_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#phone_user_voice_mails(user_id, opts = {}) ⇒ InlineResponse20065

Get User’s Voicemails Retrieve a user’s Zoom Phone voicemails. Scopes: ‘phone:read`, `phone:read:admin`

Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call. (default to 30)

  • :page_number (Integer)

    The current page number of returned records. (default to 1)

  • :status (String)

    Status of the voice mail (default to all)

Returns:

  • (InlineResponse20065)


757
758
759
760
# File 'lib/zoom_us/phone.rb', line 757

def phone_user_voice_mails(user_id, opts = {})
  data, _status_code, _headers = phone_user_voice_mails_with_http_info(user_id, opts)
  data
end

#phone_user_voice_mails_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse20065, Fixnum, Hash)>

Get User&#39;s Voicemails Retrieve a user&#39;s Zoom Phone voicemails. Scopes: &#x60;phone:read&#x60;, &#x60;phone:read:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :page_number (Integer)

    The current page number of returned records.

  • :status (String)

    Status of the voice mail

Returns:

  • (Array<(InlineResponse20065, Fixnum, Hash)>)

    InlineResponse20065 data, response status code and response headers



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/zoom_us/phone.rb', line 770

def phone_user_voice_mails_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.phone_user_voice_mails ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.phone_user_voice_mails"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 300
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PhoneApi.phone_user_voice_mails, must be smaller than or equal to 300.'
  end

  if @api_client.config.client_side_validation && opts[:'status'] && !['all', 'read', 'unread'].include?(opts[:'status'])
    fail ArgumentError, 'invalid value for "status", must be one of all, read, unread'
  end
  # resource path
  local_var_path = '/phone/users/{userId}/voice_mails'.sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20065')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#phone_user_voice_mails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#phone_user_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse20061, Fixnum, Hash)>

Get User&#39;s Profile Retrieve a user&#39;s [zoom phone](support.zoom.us/hc/en-us/articles/360001297663-Quickstart-Guide-for-Zoom-Phone-Administrators) profile. Scopes: &#x60;phone:read&#x60;, &#x60;phone:read:admin&#x60;&lt;br&gt; Prerequisites : 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id

    The user ID or email address of the user. For user-level apps, pass &#x60;me&#x60; as the value for userId.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse20061, Fixnum, Hash)>)

    InlineResponse20061 data, response status code and response headers



508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
# File 'lib/zoom_us/phone.rb', line 508

def phone_user_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.phone_user ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.phone_user"
  end
  # resource path
  local_var_path = '/phone/users/{userId}'.sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20061')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#phone_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unassign_calling_plan(user_id, type, opts = {}) ⇒ Object

Unassign User’s Calling Plan Unassign a [calling plan](marketplace.zoom.us/docs/api-reference/other-references/plans#zoom-phone-calling-plans) that was previously assigned to a [Zoom Phone](support.zoom.us/hc/en-us/categories/360001370051) user. Scopes: ‘phone:write` `phone:write:admin`

Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

Returns:

  • (Object)


825
826
827
828
# File 'lib/zoom_us/phone.rb', line 825

def unassign_calling_plan(user_id, type, opts = {})
  data, _status_code, _headers = unassign_calling_plan_with_http_info(user_id, type, opts)
  data
end

#unassign_calling_plan_with_http_info(user_id, type, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Unassign User&#39;s Calling Plan Unassign a [calling plan](marketplace.zoom.us/docs/api-reference/other-references/plans#zoom-phone-calling-plans) that was previously assigned to a [Zoom Phone](support.zoom.us/hc/en-us/categories/360001370051) user. Scopes: &#x60;phone:write&#x60; &#x60;phone:write:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
# File 'lib/zoom_us/phone.rb', line 836

def unassign_calling_plan_with_http_info(user_id, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.unassign_calling_plan ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.unassign_calling_plan"
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling PhoneApi.unassign_calling_plan"
  end
  # resource path
  local_var_path = '/phone/users/{userId}/calling_plans/{type}'.sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#unassign_calling_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unassign_phone_number(user_id, phone_number_id, opts = {}) ⇒ Object

Unassign User’s Phone Number Unassign [phone number](support.zoom.us/hc/en-us/articles/360020808292-Managing-Phone-Numbers#h_38ba8b01-26e3-4b1b-a9b5-0717c00a7ca6) of a Zoom phone user.
After assigning a phone number, you can remove it if you don’t want it to be assigned to anyone. Scopes: ‘phone:write` `phone:write:admin`

Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license 3. User must have been previously assigned a Zoom Phone number.

Parameters:

  • user_id

    Provide either userId or email address of the user.

  • phone_number_id

    Provide either phone number or phoneNumberId of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


885
886
887
888
# File 'lib/zoom_us/phone.rb', line 885

def unassign_phone_number(user_id, phone_number_id, opts = {})
  data, _status_code, _headers = unassign_phone_number_with_http_info(user_id, phone_number_id, opts)
  data
end

#unassign_phone_number_with_http_info(user_id, phone_number_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Unassign User&#39;s Phone Number Unassign [phone number](support.zoom.us/hc/en-us/articles/360020808292-Managing-Phone-Numbers#h_38ba8b01-26e3-4b1b-a9b5-0717c00a7ca6) of a Zoom phone user. &lt;br&gt; After assigning a phone number, you can remove it if you don&#39;t want it to be assigned to anyone. Scopes: &#x60;phone:write&#x60; &#x60;phone:write:admin&#x60;&lt;br&gt; &lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license 3. User must have been previously assigned a Zoom Phone number.

Parameters:

  • user_id

    Provide either userId or email address of the user.

  • phone_number_id

    Provide either phone number or phoneNumberId of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
# File 'lib/zoom_us/phone.rb', line 896

def unassign_phone_number_with_http_info(user_id, phone_number_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.unassign_phone_number ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.unassign_phone_number"
  end
  # verify the required parameter 'phone_number_id' is set
  if @api_client.config.client_side_validation && phone_number_id.nil?
    fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneApi.unassign_phone_number"
  end
  # resource path
  local_var_path = '/phone/users/{userId}/phone_numbers/{phoneNumberId}'.sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'phoneNumberId' + '}', phone_number_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#unassign_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user_profile(user_id, opts = {}) ⇒ Object

Update User’s Profile Update a [Zoom Phone](support.zoom.us/hc/en-us/categories/360001370051-Zoom-Phone) user’s profile. Scopes: ‘phone:write` `phone:write:admin`
Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body45)

Returns:

  • (Object)


945
946
947
948
# File 'lib/zoom_us/phone.rb', line 945

def (user_id, opts = {})
  data, _status_code, _headers = (user_id, opts)
  data
end

#update_user_profile_with_http_info(user_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Update User&#39;s Profile Update a [Zoom Phone](support.zoom.us/hc/en-us/categories/360001370051-Zoom-Phone) user&#39;s profile. Scopes: &#x60;phone:write&#x60; &#x60;phone:write:admin&#x60; &lt;br&gt;&lt;br&gt; Prerequisite: 1. Business or Enterprise account 2. A Zoom Phone license

Parameters:

  • user_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body45)

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
# File 'lib/zoom_us/phone.rb', line 956

def (user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneApi.update_user_profile ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhoneApi.update_user_profile"
  end
  # resource path
  local_var_path = '/phone/users/{userId}'.sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneApi#update_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end