class ZoomUs::CommonAreaPhones

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/zoom_us/common_area_phones.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

add_common_area_phone(opts = {}) click to toggle source

Add a Common Area Phone A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don't belong to a specific employees, you could add a common area phone so that any person can use it.
Use this API to [add a common area phone](Phone license. * Account owner or admin permissions. * [Supported device](

# File lib/zoom_us/common_area_phones.rb, line 27
def add_common_area_phone(opts = {})
  data, _status_code, _headers = add_common_area_phone_with_http_info(opts)
  data
end
add_common_area_phone_with_http_info(opts = {}) click to toggle source

Add a Common Area Phone A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don&#39;t belong to a specific employees, you could add a common area phone so that any person can use it.&lt;br&gt; Use this API to [add a common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones#h_2d0da347-c35a-4993-9771-e21aaa568deb).<br><br>; Prerequisites:&lt;br&gt; * 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>; Scope: &#x60;phone:write:admin&#x60;&lt;br&gt; @param [Hash] opts the optional parameters @option opts [Body74] :body @return [Array<(InlineResponse20124, Fixnum, Hash)>] InlineResponse20124 data, response status code and response headers

# File lib/zoom_us/common_area_phones.rb, line 37
def add_common_area_phone_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommonAreaPhonesApi.add_common_area_phone ...'
  end
  # resource path
  local_var_path = '/phone/common_area_phones'

  # 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'])

  # 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 => 'InlineResponse20124')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommonAreaPhonesApi#add_common_area_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_common_area_phone(common_area_phone_id, opts = {}) click to toggle source

Delete a Common Area Phone A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don't belong to a specific employees, you could add a common area phone so that any person can use it.
Use this API to remove the [common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones) from Zoom Phone System in an account.
Prerequisites:
* Pro or a higher account with Zoom Phone license. * Account owner or admin permissions. * [Supported device](

# File lib/zoom_us/common_area_phones.rb, line 77
def delete_common_area_phone(common_area_phone_id, opts = {})
  data, _status_code, _headers = delete_common_area_phone_with_http_info(common_area_phone_id, opts)
  data
end
delete_common_area_phone_with_http_info(common_area_phone_id, opts = {}) click to toggle source

Delete a Common Area Phone A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don&#39;t belong to a specific employees, you could add a common area phone so that any person can use it.&lt;br&gt; Use this API to remove the [common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones) from Zoom Phone System in an account.&lt;br&gt;&lt;br&gt;Prerequisites:&lt;br&gt; * 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: &#x60;phone:write:admin&#x60;&lt;br&gt; @param common_area_phone_id Unique Identifier of the common area phone. @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/zoom_us/common_area_phones.rb, line 87
def delete_common_area_phone_with_http_info(common_area_phone_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommonAreaPhonesApi.delete_common_area_phone ...'
  end
  # verify the required parameter 'common_area_phone_id' is set
  if @api_client.config.client_side_validation && common_area_phone_id.nil?
    fail ArgumentError, "Missing the required parameter 'common_area_phone_id' when calling CommonAreaPhonesApi.delete_common_area_phone"
  end
  # resource path
  local_var_path = '/phone/common_area_phone/{commonAreaPhoneId}'.sub('{' + 'commonAreaPhoneId' + '}', common_area_phone_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: CommonAreaPhonesApi#delete_common_area_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_a_common_area_phone(common_area_phone_id, opts = {}) click to toggle source

Get Common Area Phone Details A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don't belong to a specific employees, you could add a common area phone so that any person can use it.
Use this API to get details on a specific [common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones) in an account.
Prerequisites:
* Pro or a higher account with Zoom Phone license. * Account owner or admin permissions. * [Supported device](Phone. This can be retrieved from List Common Area Phones API. @param [Hash] opts the optional parameters @return [InlineResponse20096]

# File lib/zoom_us/common_area_phones.rb, line 131
def get_a_common_area_phone(common_area_phone_id, opts = {})
  data, _status_code, _headers = get_a_common_area_phone_with_http_info(common_area_phone_id, opts)
  data
end
get_a_common_area_phone_with_http_info(common_area_phone_id, opts = {}) click to toggle source

Get Common Area Phone Details A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don&#39;t belong to a specific employees, you could add a common area phone so that any person can use it.&lt;br&gt; Use this API to get details on a specific [common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones) in an account.&lt;br&gt;&lt;br&gt;Prerequisites:&lt;br&gt; * 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: &#x60;phone:read:admin&#x60;&lt;br&gt; @param common_area_phone_id Unique Identifier of the Common Area Phone. This can be retrieved from List Common Area Phones API. @param [Hash] opts the optional parameters @return [Array<(InlineResponse20096, Fixnum, Hash)>] InlineResponse20096 data, response status code and response headers

# File lib/zoom_us/common_area_phones.rb, line 141
def get_a_common_area_phone_with_http_info(common_area_phone_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommonAreaPhonesApi.get_a_common_area_phone ...'
  end
  # verify the required parameter 'common_area_phone_id' is set
  if @api_client.config.client_side_validation && common_area_phone_id.nil?
    fail ArgumentError, "Missing the required parameter 'common_area_phone_id' when calling CommonAreaPhonesApi.get_a_common_area_phone"
  end
  # resource path
  local_var_path = '/phone/common_area_phone/{commonAreaPhoneId}'.sub('{' + 'commonAreaPhoneId' + '}', common_area_phone_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 => 'InlineResponse20096')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommonAreaPhonesApi#get_a_common_area_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_common_area_phones(opts = {}) click to toggle source

List Common Area Phones A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don't belong to a specific employees, you could add a common area phone so that any person can use it.
Use this API to [list all common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones) in an account.
Prerequisites:
* Pro or a higher account with Zoom Phone license. * Account owner or admin permissions. * [Supported device](

# File lib/zoom_us/common_area_phones.rb, line 186
def list_common_area_phones(opts = {})
  data, _status_code, _headers = list_common_area_phones_with_http_info(opts)
  data
end
list_common_area_phones_with_http_info(opts = {}) click to toggle source

List Common Area Phones A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don&#39;t belong to a specific employees, you could add a common area phone so that any person can use it.&lt;br&gt; Use this API to [list all common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones) in an account.&lt;br&gt;&lt;br&gt;Prerequisites:&lt;br&gt; * 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><br>; Scope: &#x60;phone:read:admin&#x60;&lt;br&gt; @param [Hash] opts the optional parameters @option opts [Integer] :page_size The total number of records returned from a single API call. @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. @return [Array<(InlineResponse20095, Fixnum, Hash)>] InlineResponse20095 data, response status code and response headers

# File lib/zoom_us/common_area_phones.rb, line 197
def list_common_area_phones_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommonAreaPhonesApi.list_common_area_phones ...'
  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 CommonAreaPhonesApi.list_common_area_phones, must be smaller than or equal to 100.'
  end

  # resource path
  local_var_path = '/phone/common_area_phones'

  # 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?

  # 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 => 'InlineResponse20095')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommonAreaPhonesApi#list_common_area_phones\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_common_area_phone(common_area_phone_id, opts = {}) click to toggle source

Update Common Area Phone A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don't belong to a specific employees, you could add a common area phone so that any person can use it.
Use this API to update details on a specific [common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones) in an account.
Prerequisites:
* Pro or a higher account with Zoom Phone license. * Account owner or admin permissions. * [Supported device](

# File lib/zoom_us/common_area_phones.rb, line 244
def update_common_area_phone(common_area_phone_id, opts = {})
  data, _status_code, _headers = update_common_area_phone_with_http_info(common_area_phone_id, opts)
  data
end
update_common_area_phone_with_http_info(common_area_phone_id, opts = {}) click to toggle source

Update Common Area Phone A common area phone can be provisioned by a Zoom account owner or a Zoom admin so that anyone in an organization can use it. For example, if your office has shared desks that don&#39;t belong to a specific employees, you could add a common area phone so that any person can use it.&lt;br&gt; Use this API to update details on a specific [common area phone](support.zoom.us/hc/en-us/articles/360028516231-Managing-Common-Area-Phones) in an account.&lt;br&gt;&lt;br&gt;Prerequisites:&lt;br&gt; * 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: &#x60;phone:write:admin&#x60;&lt;br&gt; @param common_area_phone_id @param [Hash] opts the optional parameters @option opts [Body75] :body @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/zoom_us/common_area_phones.rb, line 255
def update_common_area_phone_with_http_info(common_area_phone_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommonAreaPhonesApi.update_common_area_phone ...'
  end
  # verify the required parameter 'common_area_phone_id' is set
  if @api_client.config.client_side_validation && common_area_phone_id.nil?
    fail ArgumentError, "Missing the required parameter 'common_area_phone_id' when calling CommonAreaPhonesApi.update_common_area_phone"
  end
  # resource path
  local_var_path = '/phone/common_area_phone/{commonAreaPhoneId}'.sub('{' + 'commonAreaPhoneId' + '}', common_area_phone_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: CommonAreaPhonesApi#update_common_area_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end