Class: ZoomUs::PhoneDevices
- Inherits:
-
Object
- Object
- ZoomUs::PhoneDevices
- Defined in:
- lib/zoom_us/phone_devices.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_phone_device(opts = {}) ⇒ Object
Add a Device By default, all Zoom Phone users can make and receive calls using the Zoom desktop and mobile applications.
-
#add_phone_device_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Add a Device By default, all Zoom Phone users can make and receive calls using the Zoom desktop and mobile applications.
-
#delete_a_device(device_id, opts = {}) ⇒ Object
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`
. -
#delete_a_device_with_http_info(device_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
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>.
-
#get_a_device(device_id, opts = {}) ⇒ InlineResponse20089
Get Device Details Get detailed information about a specific [desk phone device](support.zoom.us/hc/en-us/articles/360021119092).
Prerequisites:
* Pro or a higher account with Zoom Phone license * Account owner or admin permissions
Scopes: ‘phone:write:admin`
. -
#get_a_device_with_http_info(device_id, opts = {}) ⇒ Array<(InlineResponse20089, Fixnum, Hash)>
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>.
-
#initialize(api_client = ApiClient.default) ⇒ PhoneDevices
constructor
A new instance of PhoneDevices.
-
#list_phone_devices(type, opts = {}) ⇒ InlineResponse20088
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.
-
#list_phone_devices_with_http_info(type, opts = {}) ⇒ Array<(InlineResponse20088, Fixnum, Hash)>
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.
-
#update_a_device(device_id, opts = {}) ⇒ Object
Update a Device Update information of a [desk phone device](support.zoom.us/hc/en-us/articles/360021119092).
Prerequisites:
* Pro or a higher account with Zoom Phone license * Account owner or admin permissions
Scopes: ‘phone:write:admin`
. -
#update_a_device_with_http_info(device_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
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>.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PhoneDevices
Returns a new instance of PhoneDevices.
19 20 21 |
# File 'lib/zoom_us/phone_devices.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/zoom_us/phone_devices.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_phone_device(opts = {}) ⇒ Object
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](support.zoom.us/hc/en-us/articles/360001299063-Zoom-Voice-Supported-Devices)
Scopes: ‘phone:write:admin`
27 28 29 30 |
# 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_phone_device_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
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>
37 38 39 40 41 42 43 44 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 |
# 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(device_id, opts = {}) ⇒ Object
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`
77 78 79 80 |
# 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_with_http_info(device_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
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>
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# 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_a_device(device_id, opts = {}) ⇒ InlineResponse20089
Get Device Details Get detailed information about a specific [desk phone device](support.zoom.us/hc/en-us/articles/360021119092).
Prerequisites:
* Pro or a higher account with Zoom Phone license * Account owner or admin permissions
Scopes: ‘phone:write:admin`
131 132 133 134 |
# 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_a_device_with_http_info(device_id, opts = {}) ⇒ Array<(InlineResponse20089, Fixnum, Hash)>
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>
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# 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_phone_devices(type, opts = {}) ⇒ InlineResponse20088
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
187 188 189 190 |
# 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_phone_devices_with_http_info(type, opts = {}) ⇒ Array<(InlineResponse20088, Fixnum, Hash)>
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>
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 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 |
# 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(device_id, opts = {}) ⇒ Object
Update a Device Update information of a [desk phone device](support.zoom.us/hc/en-us/articles/360021119092).
Prerequisites:
* Pro or a higher account with Zoom Phone license * Account owner or admin permissions
Scopes: ‘phone:write:admin`
255 256 257 258 |
# 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_with_http_info(device_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
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>
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_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 |