class ZoomUs::PhoneDevices
Attributes
Public Class Methods
# File lib/zoom_us/phone_devices.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Add a Device By default, all Zoom Phone
users can make and receive calls using the Zoom desktop and mobile applications. Additionally, if a desk phone is required, use this API to [add a desk phone and assign it](support.zoom.us/hc/en-us/articles/360021119092#h_5ca07504-68a8-4c3d-ad0e-c1d3594436da) to a user. Prerequisites:
* Pro or a higher account with Zoom Phone
license * Account owner or admin permissions * [Supported device](
# File lib/zoom_us/phone_devices.rb, line 27
def add_phone_device(opts = {})
data, _status_code, _headers = add_phone_device_with_http_info(opts)
data
end
Add a Device By default, all Zoom Phone
users can make and receive calls using the Zoom desktop and mobile applications. Additionally, if a desk phone is required, use this API to [add a desk phone and assign it](support.zoom.us/hc/en-us/articles/360021119092#h_5ca07504-68a8-4c3d-ad0e-c1d3594436da) to a user. Prerequisites:<br> * Pro or a higher account with Zoom Phone
license * Account owner or admin permissions * [Supported device](support.zoom.us/hc/en-us/articles/360001299063-Zoom-Voice-Supported-Devices)<br> Scopes: `phone:write:admin`<br> @param [Hash] opts the optional parameters @option opts [Body62] :body @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/zoom_us/phone_devices.rb, line 37 def add_phone_device_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneDevicesApi.add_phone_device ...' end # resource path local_var_path = '/phone/devices' # 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: PhoneDevicesApi#add_phone_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a Device Remove a [desk phone device](support.zoom.us/hc/en-us/articles/360021119092) from the Zoom Phone
System Management.
Prerequisites:
* Pro or a higher account with Zoom Phone
license * Account owner or admin permissions * Device must not have been assigned to a user.
Scopes: `phone:write:admin`
@param device_id Unique Identifier of the device. @param [Hash] opts the optional parameters @return [Object]
# File lib/zoom_us/phone_devices.rb, line 77 def delete_a_device(device_id, opts = {}) data, _status_code, _headers = delete_a_device_with_http_info(device_id, opts) data end
Delete a Device Remove a [desk phone device](support.zoom.us/hc/en-us/articles/360021119092) from the Zoom Phone
System Management.<br><br> Prerequisites:<br> * Pro or a higher account with Zoom Phone
license * Account owner or admin permissions * Device must not have been assigned to a user.<br> Scopes: `phone:write:admin`<br> @param device_id Unique Identifier of the device. @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/zoom_us/phone_devices.rb, line 87 def delete_a_device_with_http_info(device_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneDevicesApi.delete_a_device ...' end # verify the required parameter 'device_id' is set if @api_client.config.client_side_validation && device_id.nil? fail ArgumentError, "Missing the required parameter 'device_id' when calling PhoneDevicesApi.delete_a_device" end # resource path local_var_path = '/phone/devices/{deviceId}'.sub('{' + 'deviceId' + '}', device_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: PhoneDevicesApi#delete_a_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get Device Details Get detailed information about a specific [desk phone device](Phone
license * Account owner or admin permissions
Scopes: `phone:write:admin`
@param device_id Unique Identifier of the device. @param [Hash] opts the optional parameters @return [InlineResponse20089]
# File lib/zoom_us/phone_devices.rb, line 131 def get_a_device(device_id, opts = {}) data, _status_code, _headers = get_a_device_with_http_info(device_id, opts) data end
Get Device Details Get detailed information about a specific [desk phone device](support.zoom.us/hc/en-us/articles/360021119092).<br><br> Prerequisites:<br> * Pro or a higher account with Zoom Phone
license * Account owner or admin permissions<br> Scopes: `phone:write:admin`<br> @param device_id Unique Identifier of the device. @param [Hash] opts the optional parameters @return [Array<(InlineResponse20089, Fixnum, Hash)>] InlineResponse20089 data, response status code and response headers
# File lib/zoom_us/phone_devices.rb, line 141 def get_a_device_with_http_info(device_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneDevicesApi.get_a_device ...' end # verify the required parameter 'device_id' is set if @api_client.config.client_side_validation && device_id.nil? fail ArgumentError, "Missing the required parameter 'device_id' when calling PhoneDevicesApi.get_a_device" end # resource path local_var_path = '/phone/devices/{deviceId}'.sub('{' + 'deviceId' + '}', device_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 => 'InlineResponse20089') if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneDevicesApi#get_a_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List Devices
List all the [desk phone devices](support.zoom.us/hc/en-us/articles/360021119092) that are configured with Zoom Phone
on an account. To view devices that have not yet been assigned to a user, set the value of the `type` query parameter as `unassigned` and to view devices that have been assigned, set the value as `assigned`.
Scopes: `phone:read:admin`
Prerequisites:
* Pro or a higher account with Zoom Phone
license * Account owner or admin permissions
@param type State of the device. The value should be either `assigned` to list devices that have been assigned to user(s) or `unassigned` to list devices that have not yet been assigned to any user in the Zoom account. @param [Hash] opts the optional parameters @option opts [String] :next_page_token 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. @option opts [Integer] :page_size The number of records returned within a single API call. (default to 30) @return [InlineResponse20088]
# File lib/zoom_us/phone_devices.rb, line 187 def list_phone_devices(type, opts = {}) data, _status_code, _headers = list_phone_devices_with_http_info(type, opts) data end
List Devices
List all the [desk phone devices](support.zoom.us/hc/en-us/articles/360021119092) that are configured with Zoom Phone
on an account. To view devices that have not yet been assigned to a user, set the value of the `type` query parameter as `unassigned` and to view devices that have been assigned, set the value as `assigned`.<br><br> Scopes: `phone:read:admin` <br> Prerequisites:<br> * Pro or a higher account with Zoom Phone
license * Account owner or admin permissions<br> @param type State of the device. The value should be either `assigned` to list devices that have been assigned to user(s) or `unassigned` to list devices that have not yet been assigned to any user in the Zoom account. @param [Hash] opts the optional parameters @option opts [String] :next_page_token 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. @option opts [Integer] :page_size The number of records returned within a single API call. @return [Array<(InlineResponse20088, Fixnum, Hash)>] InlineResponse20088 data, response status code and response headers
# File lib/zoom_us/phone_devices.rb, line 199 def list_phone_devices_with_http_info(type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneDevicesApi.list_phone_devices ...' 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 PhoneDevicesApi.list_phone_devices" end # verify enum value if @api_client.config.client_side_validation && !['assigned', 'unassigned'].include?(type) fail ArgumentError, "invalid value for 'type', must be one of assigned, unassigned" 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 PhoneDevicesApi.list_phone_devices, must be smaller than or equal to 300.' end # resource path local_var_path = '/phone/devices' # query parameters query_params = {} query_params[:'type'] = type query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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 => 'InlineResponse20088') if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneDevicesApi#list_phone_devices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a Device Update information of a [desk phone device](Phone
license * Account owner or admin permissions
Scopes: `phone:write:admin`
@param device_id Unique Identifier of the Device. @param [Hash] opts the optional parameters @option opts [Body63] :body @return [Object]
# File lib/zoom_us/phone_devices.rb, line 255 def update_a_device(device_id, opts = {}) data, _status_code, _headers = update_a_device_with_http_info(device_id, opts) data end
Update a Device Update information of a [desk phone device](support.zoom.us/hc/en-us/articles/360021119092).<br><br> Prerequisites:<br> * Pro or a higher account with Zoom Phone
license * Account owner or admin permissions<br> Scopes: `phone:write:admin`<br> @param device_id Unique Identifier of the Device. @param [Hash] opts the optional parameters @option opts [Body63] :body @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/zoom_us/phone_devices.rb, line 266 def update_a_device_with_http_info(device_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneDevicesApi.update_a_device ...' end # verify the required parameter 'device_id' is set if @api_client.config.client_side_validation && device_id.nil? fail ArgumentError, "Missing the required parameter 'device_id' when calling PhoneDevicesApi.update_a_device" end # resource path local_var_path = '/phone/devices/{deviceId}'.sub('{' + 'deviceId' + '}', device_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: PhoneDevicesApi#update_a_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end