class ZoomUs::PhoneSite
Attributes
Public Class Methods
# File lib/zoom_us/phone_site.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create a Phone
Site Sites allow you to organize Zoom Phone
users in your organization. Use this API to create a [Site](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15). * Pro or a higher account with Zoom Phone
enabled. Scope: `phone:write:admin`
@param [Hash] opts the optional parameters @option opts [Body3] :body @return [InlineResponse204]
# File lib/zoom_us/phone_site.rb, line 27 def create_phone_site(opts = {}) data, _status_code, _headers = create_phone_site_with_http_info(opts) data end
Create a Phone
Site Sites allow you to organize Zoom Phone
users in your organization. Use this API to create a [Site](support.zoom.us/hc/en-us/articles/360020809672).<br> Prerequisites:<br> * Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15). * Pro or a higher account with Zoom Phone
enabled. Scope: `phone:write:admin`<br> @param [Hash] opts the optional parameters @option opts [Body3] :body @return [Array<(InlineResponse204, Fixnum, Hash)>] InlineResponse204 data, response status code and response headers
# File lib/zoom_us/phone_site.rb, line 37 def create_phone_site_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneSiteApi.create_phone_site ...' end # resource path local_var_path = '/phone/sites' # 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 => 'InlineResponse204') if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneSiteApi#create_phone_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a Phone
Site Sites allow you to organize Zoom Phone
users in your organization. Use this API to delete a specific [site](support.zoom.us/hc/en-us/articles/360020809672) in a Zoom account. To delete a site, in the query parameter, you must provide the Site ID of another site where the assets of current site (users, numbers and phones) can be transferred to. You cannot use this API to delete the main site. Prerequisites:
* Account must have a Pro or a higher plan with Zoom Phone
license. * [Multiple Sites](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites) must be enabled.
Scope: `phone:write:admin`
@param site_id Unique Identifier of the Site. @param transfer_site_id The Site ID of another site where the assets of the current site (users, numbers and phones) can be transferred to. @param [Hash] opts the optional parameters @return [Object]
# File lib/zoom_us/phone_site.rb, line 78 def delete_phone_site(site_id, transfer_site_id, opts = {}) data, _status_code, _headers = delete_phone_site_with_http_info(site_id, transfer_site_id, opts) data end
Delete a Phone
Site Sites allow you to organize Zoom Phone
users in your organization. Use this API to delete a specific [site](support.zoom.us/hc/en-us/articles/360020809672) in a Zoom account. To delete a site, in the query parameter, you must provide the Site ID of another site where the assets of current site (users, numbers and phones) can be transferred to. You cannot use this API to delete the main site. Prerequisites: <br> * Account must have a Pro or a higher plan with Zoom Phone
license. * [Multiple Sites](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites) must be enabled.<br> Scope: `phone:write:admin` <br> @param site_id Unique Identifier of the Site. @param transfer_site_id The Site ID of another site where the assets of the current site (users, numbers and phones) can be transferred to. @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/zoom_us/phone_site.rb, line 89 def delete_phone_site_with_http_info(site_id, transfer_site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneSiteApi.delete_phone_site ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling PhoneSiteApi.delete_phone_site" end # verify the required parameter 'transfer_site_id' is set if @api_client.config.client_side_validation && transfer_site_id.nil? fail ArgumentError, "Missing the required parameter 'transfer_site_id' when calling PhoneSiteApi.delete_phone_site" end # resource path local_var_path = '/phone/sites/{siteId}'.sub('{' + 'siteId' + '}', site_id.to_s) # query parameters query_params = {} query_params[:'transfer_site_id'] = transfer_site_id # 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: PhoneSiteApi#delete_phone_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get Phone
Site Details Sites allow you to organize Zoom Phone
users in your organization. Use this API to get information about a specific [site](support.zoom.us/hc/en-us/articles/360020809672). Prerequisites:
* Account must have a Pro or a higher plan with Zoom Phone
license. * Multiple Sites must be [enabled](
# File lib/zoom_us/phone_site.rb, line 138
def get_a_site(site_id, opts = {})
data, _status_code, _headers = get_a_site_with_http_info(site_id, opts)
data
end
Get Phone
Site Details Sites allow you to organize Zoom Phone
users in your organization. Use this API to get information about a specific [site](support.zoom.us/hc/en-us/articles/360020809672). Prerequisites: <br> * Account must have a Pro or a higher plan with Zoom Phone
license. * Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15).<br> Scope: `phone:read:admin`<br> @param site_id Unique Identifier of the Site. @param [Hash] opts the optional parameters @return [Array<(InlineResponse2004, Fixnum, Hash)>] InlineResponse2004 data, response status code and response headers
# File lib/zoom_us/phone_site.rb, line 148 def get_a_site_with_http_info(site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneSiteApi.get_a_site ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling PhoneSiteApi.get_a_site" end # resource path local_var_path = '/phone/sites/{siteId}'.sub('{' + 'siteId' + '}', site_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 => 'InlineResponse2004') if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneSiteApi#get_a_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List Phone
Sites Sites allow you to organize Zoom Phone
users in your organization. Use this API to list all the [sites](support.zoom.us/hc/en-us/articles/360020809672) that have been created for an account.
Prerequisites:
* Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15). * Pro or a higher account with Zoom Phone
enabled. Scope: `phone:read:admin`
@param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of records returned within a single API call. (default to 30) @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 [InlineResponse2003]
# File lib/zoom_us/phone_site.rb, line 193 def list_phone_sites(opts = {}) data, _status_code, _headers = list_phone_sites_with_http_info(opts) data end
List Phone
Sites Sites allow you to organize Zoom Phone
users in your organization. Use this API to list all the [sites](support.zoom.us/hc/en-us/articles/360020809672) that have been created for an account.<br> Prerequisites:<br> * Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15). * Pro or a higher account with Zoom Phone
enabled. Scope: `phone:read:admin`<br> @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of records returned within 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<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers
# File lib/zoom_us/phone_site.rb, line 204 def list_phone_sites_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneSiteApi.list_phone_sites ...' 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 PhoneSiteApi.list_phone_sites, must be smaller than or equal to 300.' end # resource path local_var_path = '/phone/sites' # 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 => 'InlineResponse2003') if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneSiteApi#list_phone_sites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update Phone
Site Details Sites allow you to organize Zoom Phone
users in your organization. Use this API to update information about a specific [site](support.zoom.us/hc/en-us/articles/360020809672). Prerequisites:
* Account must have a Pro or a higher plan with Zoom Phone
license. * Scope: `phone:write:admin`
@param site_id Unique Identifier of the Site. @param [Hash] opts the optional parameters @option opts [Body4] :body @return [Object]
# File lib/zoom_us/phone_site.rb, line 251 def update_site_details(site_id, opts = {}) data, _status_code, _headers = update_site_details_with_http_info(site_id, opts) data end
Update Phone
Site Details Sites allow you to organize Zoom Phone
users in your organization. Use this API to update information about a specific [site](support.zoom.us/hc/en-us/articles/360020809672). Prerequisites: <br> * Account must have a Pro or a higher plan with Zoom Phone
license. * Scope: `phone:write:admin`<br> @param site_id Unique Identifier of the Site. @param [Hash] opts the optional parameters @option opts [Body4] :body @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/zoom_us/phone_site.rb, line 262 def update_site_details_with_http_info(site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneSiteApi.update_site_details ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling PhoneSiteApi.update_site_details" end # resource path local_var_path = '/phone/sites/{siteId}'.sub('{' + 'siteId' + '}', site_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: PhoneSiteApi#update_site_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end