require "uri" module PureCloud class TelephonyProvidersEdgeApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Get the list of edge groups. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @return [EdgeGroupEntityListing] def get_providers_edge_edgegroups(opts = {}) data, status_code, headers = get_providers_edge_edgegroups_with_http_info(opts) return data end # Get the list of edge groups. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @return [Array<(EdgeGroupEntityListing, Fixnum, Hash)>] EdgeGroupEntityListing data, response status code and response headers def get_providers_edge_edgegroups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_edgegroups ..." end # resource path path = "/api/v2/telephony/providers/edge/edgegroups".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EdgeGroupEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_edgegroups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an edge group. # # @param [Hash] opts the optional parameters # @option opts [EdgeGroup] :body EdgeGroup # @return [EdgeGroup] def post_providers_edge_edgegroups(opts = {}) data, status_code, headers = post_providers_edge_edgegroups_with_http_info(opts) return data end # Create an edge group. # # @param [Hash] opts the optional parameters # @option opts [EdgeGroup] :body EdgeGroup # @return [Array<(EdgeGroup, Fixnum, Hash)>] EdgeGroup data, response status code and response headers def post_providers_edge_edgegroups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#post_providers_edge_edgegroups ..." end # resource path path = "/api/v2/telephony/providers/edge/edgegroups".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EdgeGroup') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#post_providers_edge_edgegroups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get edge group. # # @param edge_group_id Edge group ID # @param [Hash] opts the optional parameters # @return [EdgeGroup] def get_providers_edge_edgegroups_edgegroup_id(edge_group_id, opts = {}) data, status_code, headers = get_providers_edge_edgegroups_edgegroup_id_with_http_info(edge_group_id, opts) return data end # Get edge group. # # @param edge_group_id Edge group ID # @param [Hash] opts the optional parameters # @return [Array<(EdgeGroup, Fixnum, Hash)>] EdgeGroup data, response status code and response headers def get_providers_edge_edgegroups_edgegroup_id_with_http_info(edge_group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_edgegroups_edgegroup_id ..." end # verify the required parameter 'edge_group_id' is set fail "Missing the required parameter 'edge_group_id' when calling get_providers_edge_edgegroups_edgegroup_id" if edge_group_id.nil? # resource path path = "/api/v2/telephony/providers/edge/edgegroups/{edgeGroupId}".sub('{format}','json').sub('{' + 'edgeGroupId' + '}', edge_group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EdgeGroup') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_edgegroups_edgegroup_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an edge group. # # @param edge_group_id Edge group ID # @param [Hash] opts the optional parameters # @option opts [EdgeGroup] :body EdgeGroup # @return [EdgeGroup] def put_providers_edge_edgegroups_edgegroup_id(edge_group_id, opts = {}) data, status_code, headers = put_providers_edge_edgegroups_edgegroup_id_with_http_info(edge_group_id, opts) return data end # Update an edge group. # # @param edge_group_id Edge group ID # @param [Hash] opts the optional parameters # @option opts [EdgeGroup] :body EdgeGroup # @return [Array<(EdgeGroup, Fixnum, Hash)>] EdgeGroup data, response status code and response headers def put_providers_edge_edgegroups_edgegroup_id_with_http_info(edge_group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#put_providers_edge_edgegroups_edgegroup_id ..." end # verify the required parameter 'edge_group_id' is set fail "Missing the required parameter 'edge_group_id' when calling put_providers_edge_edgegroups_edgegroup_id" if edge_group_id.nil? # resource path path = "/api/v2/telephony/providers/edge/edgegroups/{edgeGroupId}".sub('{format}','json').sub('{' + 'edgeGroupId' + '}', edge_group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EdgeGroup') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#put_providers_edge_edgegroups_edgegroup_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete an edge group. # # @param edge_group_id Edge group ID # @param [Hash] opts the optional parameters # @return [String] def delete_providers_edge_edgegroups_edgegroup_id(edge_group_id, opts = {}) data, status_code, headers = delete_providers_edge_edgegroups_edgegroup_id_with_http_info(edge_group_id, opts) return data end # Delete an edge group. # # @param edge_group_id Edge group ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_providers_edge_edgegroups_edgegroup_id_with_http_info(edge_group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#delete_providers_edge_edgegroups_edgegroup_id ..." end # verify the required parameter 'edge_group_id' is set fail "Missing the required parameter 'edge_group_id' when calling delete_providers_edge_edgegroups_edgegroup_id" if edge_group_id.nil? # resource path path = "/api/v2/telephony/providers/edge/edgegroups/{edgeGroupId}".sub('{format}','json').sub('{' + 'edgeGroupId' + '}', edge_group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#delete_providers_edge_edgegroups_edgegroup_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a listing of line base settings objects # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :sort_by Value by which to sort # @option opts [String] :sort_order Sort order # @return [LineBaseEntityListing] def get_providers_edge_linebasesettings(opts = {}) data, status_code, headers = get_providers_edge_linebasesettings_with_http_info(opts) return data end # Get a listing of line base settings objects # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :sort_by Value by which to sort # @option opts [String] :sort_order Sort order # @return [Array<(LineBaseEntityListing, Fixnum, Hash)>] LineBaseEntityListing data, response status code and response headers def get_providers_edge_linebasesettings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_linebasesettings ..." end # resource path path = "/api/v2/telephony/providers/edge/linebasesettings".sub('{format}','json') # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LineBaseEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_linebasesettings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a line base settings object by ID # # @param line_base_id Line base ID # @param [Hash] opts the optional parameters # @return [LineBase] def get_providers_edge_linebasesettings_linebase_id(line_base_id, opts = {}) data, status_code, headers = get_providers_edge_linebasesettings_linebase_id_with_http_info(line_base_id, opts) return data end # Get a line base settings object by ID # # @param line_base_id Line base ID # @param [Hash] opts the optional parameters # @return [Array<(LineBase, Fixnum, Hash)>] LineBase data, response status code and response headers def get_providers_edge_linebasesettings_linebase_id_with_http_info(line_base_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_linebasesettings_linebase_id ..." end # verify the required parameter 'line_base_id' is set fail "Missing the required parameter 'line_base_id' when calling get_providers_edge_linebasesettings_linebase_id" if line_base_id.nil? # resource path path = "/api/v2/telephony/providers/edge/linebasesettings/{lineBaseId}".sub('{format}','json').sub('{' + 'lineBaseId' + '}', line_base_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LineBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_linebasesettings_linebase_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of Lines # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :name Name # @option opts [String] :sort_by Value by which to sort # @option opts [Array] :expand Fields to expand in the response, comma-separated # @return [LineEntityListing] def get_providers_edge_lines(opts = {}) data, status_code, headers = get_providers_edge_lines_with_http_info(opts) return data end # Get a list of Lines # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :name Name # @option opts [String] :sort_by Value by which to sort # @option opts [Array] :expand Fields to expand in the response, comma-separated # @return [Array<(LineEntityListing, Fixnum, Hash)>] LineEntityListing data, response status code and response headers def get_providers_edge_lines_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_lines ..." end # resource path path = "/api/v2/telephony/providers/edge/lines".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LineEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_lines\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Line instance template based on a Line Base Settings object. This object can then be modified and saved as a new Line instance # # @param line_base_settings_id The id of a Line Base Settings object upon which to base this Line # @param [Hash] opts the optional parameters # @return [Line] def get_providers_edge_lines_template(line_base_settings_id, opts = {}) data, status_code, headers = get_providers_edge_lines_template_with_http_info(line_base_settings_id, opts) return data end # Get a Line instance template based on a Line Base Settings object. This object can then be modified and saved as a new Line instance # # @param line_base_settings_id The id of a Line Base Settings object upon which to base this Line # @param [Hash] opts the optional parameters # @return [Array<(Line, Fixnum, Hash)>] Line data, response status code and response headers def get_providers_edge_lines_template_with_http_info(line_base_settings_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_lines_template ..." end # verify the required parameter 'line_base_settings_id' is set fail "Missing the required parameter 'line_base_settings_id' when calling get_providers_edge_lines_template" if line_base_settings_id.nil? # resource path path = "/api/v2/telephony/providers/edge/lines/template".sub('{format}','json') # query parameters query_params = {} query_params[:'lineBaseSettingsId'] = line_base_settings_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Line') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_lines_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Line by ID # # @param line_id Line ID # @param [Hash] opts the optional parameters # @return [Line] def get_providers_edge_lines_line_id(line_id, opts = {}) data, status_code, headers = get_providers_edge_lines_line_id_with_http_info(line_id, opts) return data end # Get a Line by ID # # @param line_id Line ID # @param [Hash] opts the optional parameters # @return [Array<(Line, Fixnum, Hash)>] Line data, response status code and response headers def get_providers_edge_lines_line_id_with_http_info(line_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_lines_line_id ..." end # verify the required parameter 'line_id' is set fail "Missing the required parameter 'line_id' when calling get_providers_edge_lines_line_id" if line_id.nil? # resource path path = "/api/v2/telephony/providers/edge/lines/{lineId}".sub('{format}','json').sub('{' + 'lineId' + '}', line_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Line') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_lines_line_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get outbound routes # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :name Name # @option opts [String] :site_id Filter by site.id # @option opts [String] :sort_by Sort by # @return [OutboundRouteEntityListing] def get_providers_edge_outboundroutes(opts = {}) data, status_code, headers = get_providers_edge_outboundroutes_with_http_info(opts) return data end # Get outbound routes # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :name Name # @option opts [String] :site_id Filter by site.id # @option opts [String] :sort_by Sort by # @return [Array<(OutboundRouteEntityListing, Fixnum, Hash)>] OutboundRouteEntityListing data, response status code and response headers def get_providers_edge_outboundroutes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_outboundroutes ..." end # resource path path = "/api/v2/telephony/providers/edge/outboundroutes".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'site.id'] = opts[:'site_id'] if opts[:'site_id'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutboundRouteEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_outboundroutes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create outbound rule # # @param [Hash] opts the optional parameters # @option opts [OutboundRoute] :body OutboundRoute # @return [OutboundRoute] def post_providers_edge_outboundroutes(opts = {}) data, status_code, headers = post_providers_edge_outboundroutes_with_http_info(opts) return data end # Create outbound rule # # @param [Hash] opts the optional parameters # @option opts [OutboundRoute] :body OutboundRoute # @return [Array<(OutboundRoute, Fixnum, Hash)>] OutboundRoute data, response status code and response headers def post_providers_edge_outboundroutes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#post_providers_edge_outboundroutes ..." end # resource path path = "/api/v2/telephony/providers/edge/outboundroutes".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutboundRoute') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#post_providers_edge_outboundroutes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get outbound route # # @param outbound_route_id Outbound route ID # @param [Hash] opts the optional parameters # @return [OutboundRoute] def get_providers_edge_outboundroutes_outboundroute_id(outbound_route_id, opts = {}) data, status_code, headers = get_providers_edge_outboundroutes_outboundroute_id_with_http_info(outbound_route_id, opts) return data end # Get outbound route # # @param outbound_route_id Outbound route ID # @param [Hash] opts the optional parameters # @return [Array<(OutboundRoute, Fixnum, Hash)>] OutboundRoute data, response status code and response headers def get_providers_edge_outboundroutes_outboundroute_id_with_http_info(outbound_route_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_outboundroutes_outboundroute_id ..." end # verify the required parameter 'outbound_route_id' is set fail "Missing the required parameter 'outbound_route_id' when calling get_providers_edge_outboundroutes_outboundroute_id" if outbound_route_id.nil? # resource path path = "/api/v2/telephony/providers/edge/outboundroutes/{outboundRouteId}".sub('{format}','json').sub('{' + 'outboundRouteId' + '}', outbound_route_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutboundRoute') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_outboundroutes_outboundroute_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update outbound route # # @param outbound_route_id Outbound route ID # @param [Hash] opts the optional parameters # @option opts [OutboundRoute] :body OutboundRoute # @return [OutboundRoute] def put_providers_edge_outboundroutes_outboundroute_id(outbound_route_id, opts = {}) data, status_code, headers = put_providers_edge_outboundroutes_outboundroute_id_with_http_info(outbound_route_id, opts) return data end # Update outbound route # # @param outbound_route_id Outbound route ID # @param [Hash] opts the optional parameters # @option opts [OutboundRoute] :body OutboundRoute # @return [Array<(OutboundRoute, Fixnum, Hash)>] OutboundRoute data, response status code and response headers def put_providers_edge_outboundroutes_outboundroute_id_with_http_info(outbound_route_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#put_providers_edge_outboundroutes_outboundroute_id ..." end # verify the required parameter 'outbound_route_id' is set fail "Missing the required parameter 'outbound_route_id' when calling put_providers_edge_outboundroutes_outboundroute_id" if outbound_route_id.nil? # resource path path = "/api/v2/telephony/providers/edge/outboundroutes/{outboundRouteId}".sub('{format}','json').sub('{' + 'outboundRouteId' + '}', outbound_route_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutboundRoute') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#put_providers_edge_outboundroutes_outboundroute_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete Outbound Route # # @param outbound_route_id Outbound route ID # @param [Hash] opts the optional parameters # @return [String] def delete_providers_edge_outboundroutes_outboundroute_id(outbound_route_id, opts = {}) data, status_code, headers = delete_providers_edge_outboundroutes_outboundroute_id_with_http_info(outbound_route_id, opts) return data end # Delete Outbound Route # # @param outbound_route_id Outbound route ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_providers_edge_outboundroutes_outboundroute_id_with_http_info(outbound_route_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#delete_providers_edge_outboundroutes_outboundroute_id ..." end # verify the required parameter 'outbound_route_id' is set fail "Missing the required parameter 'outbound_route_id' when calling delete_providers_edge_outboundroutes_outboundroute_id" if outbound_route_id.nil? # resource path path = "/api/v2/telephony/providers/edge/outboundroutes/{outboundRouteId}".sub('{format}','json').sub('{' + 'outboundRouteId' + '}', outbound_route_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#delete_providers_edge_outboundroutes_outboundroute_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of Phone Base Settings objects # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :sort_by Value by which to sort # @option opts [String] :sort_order Sort order # @return [PhoneBaseEntityListing] def get_providers_edge_phonebasesettings(opts = {}) data, status_code, headers = get_providers_edge_phonebasesettings_with_http_info(opts) return data end # Get a list of Phone Base Settings objects # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :sort_by Value by which to sort # @option opts [String] :sort_order Sort order # @return [Array<(PhoneBaseEntityListing, Fixnum, Hash)>] PhoneBaseEntityListing data, response status code and response headers def get_providers_edge_phonebasesettings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_phonebasesettings ..." end # resource path path = "/api/v2/telephony/providers/edge/phonebasesettings".sub('{format}','json') # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PhoneBaseEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_phonebasesettings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Phone Base Settings object # # @param [Hash] opts the optional parameters # @option opts [PhoneBase] :body # @return [PhoneBase] def post_providers_edge_phonebasesettings(opts = {}) data, status_code, headers = post_providers_edge_phonebasesettings_with_http_info(opts) return data end # Create a new Phone Base Settings object # # @param [Hash] opts the optional parameters # @option opts [PhoneBase] :body # @return [Array<(PhoneBase, Fixnum, Hash)>] PhoneBase data, response status code and response headers def post_providers_edge_phonebasesettings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#post_providers_edge_phonebasesettings ..." end # resource path path = "/api/v2/telephony/providers/edge/phonebasesettings".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PhoneBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#post_providers_edge_phonebasesettings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of available makes and models to create a new Phone Base Settings # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [PhoneMetaBaseEntityListing] def get_providers_edge_phonebasesettings_availablemetabases(opts = {}) data, status_code, headers = get_providers_edge_phonebasesettings_availablemetabases_with_http_info(opts) return data end # Get a list of available makes and models to create a new Phone Base Settings # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(PhoneMetaBaseEntityListing, Fixnum, Hash)>] PhoneMetaBaseEntityListing data, response status code and response headers def get_providers_edge_phonebasesettings_availablemetabases_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_phonebasesettings_availablemetabases ..." end # resource path path = "/api/v2/telephony/providers/edge/phonebasesettings/availablemetabases".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PhoneMetaBaseEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_phonebasesettings_availablemetabases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Phone Base Settings instance template from a given make and model. This object can then be modified and saved as a new Phone Base Settings instance # # @param phone_metabase_id The id of a metabase object upon which to base this Phone Base Settings # @param [Hash] opts the optional parameters # @return [PhoneBase] def get_providers_edge_phonebasesettings_template(phone_metabase_id, opts = {}) data, status_code, headers = get_providers_edge_phonebasesettings_template_with_http_info(phone_metabase_id, opts) return data end # Get a Phone Base Settings instance template from a given make and model. This object can then be modified and saved as a new Phone Base Settings instance # # @param phone_metabase_id The id of a metabase object upon which to base this Phone Base Settings # @param [Hash] opts the optional parameters # @return [Array<(PhoneBase, Fixnum, Hash)>] PhoneBase data, response status code and response headers def get_providers_edge_phonebasesettings_template_with_http_info(phone_metabase_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_phonebasesettings_template ..." end # verify the required parameter 'phone_metabase_id' is set fail "Missing the required parameter 'phone_metabase_id' when calling get_providers_edge_phonebasesettings_template" if phone_metabase_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phonebasesettings/template".sub('{format}','json') # query parameters query_params = {} query_params[:'phoneMetabaseId'] = phone_metabase_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PhoneBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_phonebasesettings_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Phone Base Settings object by ID # # @param phone_base_id Phone base ID # @param [Hash] opts the optional parameters # @return [PhoneBase] def get_providers_edge_phonebasesettings_phonebase_id(phone_base_id, opts = {}) data, status_code, headers = get_providers_edge_phonebasesettings_phonebase_id_with_http_info(phone_base_id, opts) return data end # Get a Phone Base Settings object by ID # # @param phone_base_id Phone base ID # @param [Hash] opts the optional parameters # @return [Array<(PhoneBase, Fixnum, Hash)>] PhoneBase data, response status code and response headers def get_providers_edge_phonebasesettings_phonebase_id_with_http_info(phone_base_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_phonebasesettings_phonebase_id ..." end # verify the required parameter 'phone_base_id' is set fail "Missing the required parameter 'phone_base_id' when calling get_providers_edge_phonebasesettings_phonebase_id" if phone_base_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phonebasesettings/{phoneBaseId}".sub('{format}','json').sub('{' + 'phoneBaseId' + '}', phone_base_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PhoneBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_phonebasesettings_phonebase_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a Phone Base Settings by ID # # @param phone_base_id Phone base ID # @param [Hash] opts the optional parameters # @option opts [PhoneBase] :body # @return [PhoneBase] def put_providers_edge_phonebasesettings_phonebase_id(phone_base_id, opts = {}) data, status_code, headers = put_providers_edge_phonebasesettings_phonebase_id_with_http_info(phone_base_id, opts) return data end # Update a Phone Base Settings by ID # # @param phone_base_id Phone base ID # @param [Hash] opts the optional parameters # @option opts [PhoneBase] :body # @return [Array<(PhoneBase, Fixnum, Hash)>] PhoneBase data, response status code and response headers def put_providers_edge_phonebasesettings_phonebase_id_with_http_info(phone_base_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#put_providers_edge_phonebasesettings_phonebase_id ..." end # verify the required parameter 'phone_base_id' is set fail "Missing the required parameter 'phone_base_id' when calling put_providers_edge_phonebasesettings_phonebase_id" if phone_base_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phonebasesettings/{phoneBaseId}".sub('{format}','json').sub('{' + 'phoneBaseId' + '}', phone_base_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PhoneBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#put_providers_edge_phonebasesettings_phonebase_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a Phone Base Settings by ID # # @param phone_base_id Phone base ID # @param [Hash] opts the optional parameters # @return [String] def delete_providers_edge_phonebasesettings_phonebase_id(phone_base_id, opts = {}) data, status_code, headers = delete_providers_edge_phonebasesettings_phonebase_id_with_http_info(phone_base_id, opts) return data end # Delete a Phone Base Settings by ID # # @param phone_base_id Phone base ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_providers_edge_phonebasesettings_phonebase_id_with_http_info(phone_base_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#delete_providers_edge_phonebasesettings_phonebase_id ..." end # verify the required parameter 'phone_base_id' is set fail "Missing the required parameter 'phone_base_id' when calling delete_providers_edge_phonebasesettings_phonebase_id" if phone_base_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phonebasesettings/{phoneBaseId}".sub('{format}','json').sub('{' + 'phoneBaseId' + '}', phone_base_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#delete_providers_edge_phonebasesettings_phonebase_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of Phone Instances # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :sort_by Value by which to sort # @option opts [String] :sort_order Sort order # @option opts [String] :site_id Filter by site.id # @option opts [String] :phone_base_settings_id Filter by phoneBaseSettings.id # @option opts [String] :phone_hardware_id Filter by phone_hardwareId # @option opts [Array] :expand Fields to expand in the response, comma-separated # @option opts [Array] :fields Fields under properties to get, comma-separated # @return [PhoneEntityListing] def get_providers_edge_phones(opts = {}) data, status_code, headers = get_providers_edge_phones_with_http_info(opts) return data end # Get a list of Phone Instances # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :sort_by Value by which to sort # @option opts [String] :sort_order Sort order # @option opts [String] :site_id Filter by site.id # @option opts [String] :phone_base_settings_id Filter by phoneBaseSettings.id # @option opts [String] :phone_hardware_id Filter by phone_hardwareId # @option opts [Array] :expand Fields to expand in the response, comma-separated # @option opts [Array] :fields Fields under properties to get, comma-separated # @return [Array<(PhoneEntityListing, Fixnum, Hash)>] PhoneEntityListing data, response status code and response headers def get_providers_edge_phones_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_phones ..." end # resource path path = "/api/v2/telephony/providers/edge/phones".sub('{format}','json') # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'site.id'] = opts[:'site_id'] if opts[:'site_id'] query_params[:'phoneBaseSettings.id'] = opts[:'phone_base_settings_id'] if opts[:'phone_base_settings_id'] query_params[:'phone_hardwareId'] = opts[:'phone_hardware_id'] if opts[:'phone_hardware_id'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if opts[:'fields'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PhoneEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_phones\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Phone # # @param [Hash] opts the optional parameters # @option opts [Phone] :body # @return [Phone] def post_providers_edge_phones(opts = {}) data, status_code, headers = post_providers_edge_phones_with_http_info(opts) return data end # Create a new Phone # # @param [Hash] opts the optional parameters # @option opts [Phone] :body # @return [Array<(Phone, Fixnum, Hash)>] Phone data, response status code and response headers def post_providers_edge_phones_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#post_providers_edge_phones ..." end # resource path path = "/api/v2/telephony/providers/edge/phones".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Phone') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#post_providers_edge_phones\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Reboot Multiple Phones # # @param [Hash] opts the optional parameters # @option opts [PhonesReboot] :body body # @return [nil] def post_providers_edge_phones_reboot(opts = {}) post_providers_edge_phones_reboot_with_http_info(opts) return nil end # Reboot Multiple Phones # # @param [Hash] opts the optional parameters # @option opts [PhonesReboot] :body body # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_providers_edge_phones_reboot_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#post_providers_edge_phones_reboot ..." end # resource path path = "/api/v2/telephony/providers/edge/phones/reboot".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#post_providers_edge_phones_reboot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Phone instance template based on a Phone Base Settings object. This object can then be modified and saved as a new Phone instance # # @param phone_base_settings_id The id of a Phone Base Settings object upon which to base this Phone # @param [Hash] opts the optional parameters # @return [Phone] def get_providers_edge_phones_template(phone_base_settings_id, opts = {}) data, status_code, headers = get_providers_edge_phones_template_with_http_info(phone_base_settings_id, opts) return data end # Get a Phone instance template based on a Phone Base Settings object. This object can then be modified and saved as a new Phone instance # # @param phone_base_settings_id The id of a Phone Base Settings object upon which to base this Phone # @param [Hash] opts the optional parameters # @return [Array<(Phone, Fixnum, Hash)>] Phone data, response status code and response headers def get_providers_edge_phones_template_with_http_info(phone_base_settings_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_phones_template ..." end # verify the required parameter 'phone_base_settings_id' is set fail "Missing the required parameter 'phone_base_settings_id' when calling get_providers_edge_phones_template" if phone_base_settings_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phones/template".sub('{format}','json') # query parameters query_params = {} query_params[:'phoneBaseSettingsId'] = phone_base_settings_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Phone') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_phones_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Phone by ID # # @param phone_id Phone ID # @param [Hash] opts the optional parameters # @return [Phone] def get_providers_edge_phones_phone_id(phone_id, opts = {}) data, status_code, headers = get_providers_edge_phones_phone_id_with_http_info(phone_id, opts) return data end # Get a Phone by ID # # @param phone_id Phone ID # @param [Hash] opts the optional parameters # @return [Array<(Phone, Fixnum, Hash)>] Phone data, response status code and response headers def get_providers_edge_phones_phone_id_with_http_info(phone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_phones_phone_id ..." end # verify the required parameter 'phone_id' is set fail "Missing the required parameter 'phone_id' when calling get_providers_edge_phones_phone_id" if phone_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phones/{phoneId}".sub('{format}','json').sub('{' + 'phoneId' + '}', phone_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Phone') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_phones_phone_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a Phone by ID # # @param phone_id Phone ID # @param [Hash] opts the optional parameters # @option opts [Phone] :body # @return [Phone] def put_providers_edge_phones_phone_id(phone_id, opts = {}) data, status_code, headers = put_providers_edge_phones_phone_id_with_http_info(phone_id, opts) return data end # Update a Phone by ID # # @param phone_id Phone ID # @param [Hash] opts the optional parameters # @option opts [Phone] :body # @return [Array<(Phone, Fixnum, Hash)>] Phone data, response status code and response headers def put_providers_edge_phones_phone_id_with_http_info(phone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#put_providers_edge_phones_phone_id ..." end # verify the required parameter 'phone_id' is set fail "Missing the required parameter 'phone_id' when calling put_providers_edge_phones_phone_id" if phone_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phones/{phoneId}".sub('{format}','json').sub('{' + 'phoneId' + '}', phone_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Phone') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#put_providers_edge_phones_phone_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a Phone by ID # # @param phone_id Phone ID # @param [Hash] opts the optional parameters # @return [String] def delete_providers_edge_phones_phone_id(phone_id, opts = {}) data, status_code, headers = delete_providers_edge_phones_phone_id_with_http_info(phone_id, opts) return data end # Delete a Phone by ID # # @param phone_id Phone ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_providers_edge_phones_phone_id_with_http_info(phone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#delete_providers_edge_phones_phone_id ..." end # verify the required parameter 'phone_id' is set fail "Missing the required parameter 'phone_id' when calling delete_providers_edge_phones_phone_id" if phone_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phones/{phoneId}".sub('{format}','json').sub('{' + 'phoneId' + '}', phone_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#delete_providers_edge_phones_phone_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Reboot a Phone # # @param phone_id Phone Id # @param [Hash] opts the optional parameters # @return [nil] def post_providers_edge_phones_phone_id_reboot(phone_id, opts = {}) post_providers_edge_phones_phone_id_reboot_with_http_info(phone_id, opts) return nil end # Reboot a Phone # # @param phone_id Phone Id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_providers_edge_phones_phone_id_reboot_with_http_info(phone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#post_providers_edge_phones_phone_id_reboot ..." end # verify the required parameter 'phone_id' is set fail "Missing the required parameter 'phone_id' when calling post_providers_edge_phones_phone_id_reboot" if phone_id.nil? # resource path path = "/api/v2/telephony/providers/edge/phones/{phoneId}/reboot".sub('{format}','json').sub('{' + 'phoneId' + '}', phone_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#post_providers_edge_phones_phone_id_reboot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of Edge-compatible time zones # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [TimeZoneEntityListing] def get_providers_edge_timezones(opts = {}) data, status_code, headers = get_providers_edge_timezones_with_http_info(opts) return data end # Get a list of Edge-compatible time zones # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(TimeZoneEntityListing, Fixnum, Hash)>] TimeZoneEntityListing data, response status code and response headers def get_providers_edge_timezones_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_timezones ..." end # resource path path = "/api/v2/telephony/providers/edge/timezones".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TimeZoneEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_timezones\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Trunk Base Settings listing # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :sort_by Value by which to sort # @option opts [String] :sort_order Sort order # @return [TrunkBase] def get_providers_edge_trunkbasesettings(opts = {}) data, status_code, headers = get_providers_edge_trunkbasesettings_with_http_info(opts) return data end # Get Trunk Base Settings listing # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :sort_by Value by which to sort # @option opts [String] :sort_order Sort order # @return [Array<(TrunkBase, Fixnum, Hash)>] TrunkBase data, response status code and response headers def get_providers_edge_trunkbasesettings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_trunkbasesettings ..." end # resource path path = "/api/v2/telephony/providers/edge/trunkbasesettings".sub('{format}','json') # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrunkBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_trunkbasesettings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a Trunk Base Settings object # # @param [Hash] opts the optional parameters # @option opts [TrunkBase] :body # @return [TrunkBase] def post_providers_edge_trunkbasesettings(opts = {}) data, status_code, headers = post_providers_edge_trunkbasesettings_with_http_info(opts) return data end # Create a Trunk Base Settings object # # @param [Hash] opts the optional parameters # @option opts [TrunkBase] :body # @return [Array<(TrunkBase, Fixnum, Hash)>] TrunkBase data, response status code and response headers def post_providers_edge_trunkbasesettings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#post_providers_edge_trunkbasesettings ..." end # resource path path = "/api/v2/telephony/providers/edge/trunkbasesettings".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrunkBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#post_providers_edge_trunkbasesettings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of available makes and models to create a new Trunk Base Settings # # @param [Hash] opts the optional parameters # @option opts [String] :type # @option opts [Integer] :page_size # @option opts [Integer] :page_number # @return [TrunkMetabaseEntityListing] def get_providers_edge_trunkbasesettings_availablemetabases(opts = {}) data, status_code, headers = get_providers_edge_trunkbasesettings_availablemetabases_with_http_info(opts) return data end # Get a list of available makes and models to create a new Trunk Base Settings # # @param [Hash] opts the optional parameters # @option opts [String] :type # @option opts [Integer] :page_size # @option opts [Integer] :page_number # @return [Array<(TrunkMetabaseEntityListing, Fixnum, Hash)>] TrunkMetabaseEntityListing data, response status code and response headers def get_providers_edge_trunkbasesettings_availablemetabases_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_trunkbasesettings_availablemetabases ..." end if opts[:'type'] && !['EXTERNAL', 'PHONE', 'EDGE'].include?(opts[:'type']) fail 'invalid value for "type", must be one of EXTERNAL, PHONE, EDGE' end # resource path path = "/api/v2/telephony/providers/edge/trunkbasesettings/availablemetabases".sub('{format}','json') # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if opts[:'type'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrunkMetabaseEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_trunkbasesettings_availablemetabases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Trunk Base Settings instance template from a given make and model. This object can then be modified and saved as a new Trunk Base Settings instance # # @param trunk_metabase_id The id of a metabase object upon which to base this Trunk Base Settings # @param [Hash] opts the optional parameters # @return [TrunkBase] def get_providers_edge_trunkbasesettings_template(trunk_metabase_id, opts = {}) data, status_code, headers = get_providers_edge_trunkbasesettings_template_with_http_info(trunk_metabase_id, opts) return data end # Get a Trunk Base Settings instance template from a given make and model. This object can then be modified and saved as a new Trunk Base Settings instance # # @param trunk_metabase_id The id of a metabase object upon which to base this Trunk Base Settings # @param [Hash] opts the optional parameters # @return [Array<(TrunkBase, Fixnum, Hash)>] TrunkBase data, response status code and response headers def get_providers_edge_trunkbasesettings_template_with_http_info(trunk_metabase_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_trunkbasesettings_template ..." end # verify the required parameter 'trunk_metabase_id' is set fail "Missing the required parameter 'trunk_metabase_id' when calling get_providers_edge_trunkbasesettings_template" if trunk_metabase_id.nil? # resource path path = "/api/v2/telephony/providers/edge/trunkbasesettings/template".sub('{format}','json') # query parameters query_params = {} query_params[:'trunkMetabaseId'] = trunk_metabase_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrunkBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_trunkbasesettings_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Trunk Base Settings object by ID # # @param trunk_base_settings_id Trunk Base ID # @param [Hash] opts the optional parameters # @return [TrunkBase] def get_providers_edge_trunkbasesettings_trunkbasesettings_id(trunk_base_settings_id, opts = {}) data, status_code, headers = get_providers_edge_trunkbasesettings_trunkbasesettings_id_with_http_info(trunk_base_settings_id, opts) return data end # Get a Trunk Base Settings object by ID # # @param trunk_base_settings_id Trunk Base ID # @param [Hash] opts the optional parameters # @return [Array<(TrunkBase, Fixnum, Hash)>] TrunkBase data, response status code and response headers def get_providers_edge_trunkbasesettings_trunkbasesettings_id_with_http_info(trunk_base_settings_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#get_providers_edge_trunkbasesettings_trunkbasesettings_id ..." end # verify the required parameter 'trunk_base_settings_id' is set fail "Missing the required parameter 'trunk_base_settings_id' when calling get_providers_edge_trunkbasesettings_trunkbasesettings_id" if trunk_base_settings_id.nil? # resource path path = "/api/v2/telephony/providers/edge/trunkbasesettings/{trunkBaseSettingsId}".sub('{format}','json').sub('{' + 'trunkBaseSettingsId' + '}', trunk_base_settings_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrunkBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#get_providers_edge_trunkbasesettings_trunkbasesettings_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a Trunk Base Settings object by ID # # @param trunk_base_settings_id Trunk Base ID # @param [Hash] opts the optional parameters # @option opts [TrunkBase] :body # @return [TrunkBase] def put_providers_edge_trunkbasesettings_trunkbasesettings_id(trunk_base_settings_id, opts = {}) data, status_code, headers = put_providers_edge_trunkbasesettings_trunkbasesettings_id_with_http_info(trunk_base_settings_id, opts) return data end # Update a Trunk Base Settings object by ID # # @param trunk_base_settings_id Trunk Base ID # @param [Hash] opts the optional parameters # @option opts [TrunkBase] :body # @return [Array<(TrunkBase, Fixnum, Hash)>] TrunkBase data, response status code and response headers def put_providers_edge_trunkbasesettings_trunkbasesettings_id_with_http_info(trunk_base_settings_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#put_providers_edge_trunkbasesettings_trunkbasesettings_id ..." end # verify the required parameter 'trunk_base_settings_id' is set fail "Missing the required parameter 'trunk_base_settings_id' when calling put_providers_edge_trunkbasesettings_trunkbasesettings_id" if trunk_base_settings_id.nil? # resource path path = "/api/v2/telephony/providers/edge/trunkbasesettings/{trunkBaseSettingsId}".sub('{format}','json').sub('{' + 'trunkBaseSettingsId' + '}', trunk_base_settings_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrunkBase') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#put_providers_edge_trunkbasesettings_trunkbasesettings_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a Trunk Base Settings object by ID # # @param trunk_base_settings_id Trunk Base ID # @param [Hash] opts the optional parameters # @return [String] def delete_providers_edge_trunkbasesettings_trunkbasesettings_id(trunk_base_settings_id, opts = {}) data, status_code, headers = delete_providers_edge_trunkbasesettings_trunkbasesettings_id_with_http_info(trunk_base_settings_id, opts) return data end # Delete a Trunk Base Settings object by ID # # @param trunk_base_settings_id Trunk Base ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_providers_edge_trunkbasesettings_trunkbasesettings_id_with_http_info(trunk_base_settings_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyProvidersEdgeApi#delete_providers_edge_trunkbasesettings_trunkbasesettings_id ..." end # verify the required parameter 'trunk_base_settings_id' is set fail "Missing the required parameter 'trunk_base_settings_id' when calling delete_providers_edge_trunkbasesettings_trunkbasesettings_id" if trunk_base_settings_id.nil? # resource path path = "/api/v2/telephony/providers/edge/trunkbasesettings/{trunkBaseSettingsId}".sub('{format}','json').sub('{' + 'trunkBaseSettingsId' + '}', trunk_base_settings_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyProvidersEdgeApi#delete_providers_edge_trunkbasesettings_trunkbasesettings_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end