=begin PureCloud Platform API With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more. OpenAPI spec version: v2 Contact: DeveloperEvangelists@inin.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: ININ http://www.inin.com Terms of Service: https://developer.mypurecloud.com/tos =end require "uri" module PureCloud class ArchitectApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Batch-delete a list of prompts asynchronously # Multiple IDs can be specified, in which case all specified prompts will be deleted. # @param id List of Prompt IDs # @param [Hash] opts the optional parameters # @return [Operation] def delete_prompts(id, opts = {}) data, status_code, headers = delete_prompts_with_http_info(id, opts) return data end # Batch-delete a list of prompts asynchronously # Multiple IDs can be specified, in which case all specified prompts will be deleted. # @param id List of Prompt IDs # @param [Hash] opts the optional parameters # @return [Array<(Operation, Fixnum, Hash)>] Operation data, response status code and response headers def delete_prompts_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#delete_prompts ..." end # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling delete_prompts" if id.nil? # resource path local_var_path = "/api/v2/architect/prompts".sub('{format}','json') # query parameters query_params = {} query_params[:'id'] = @api_client.build_collection_param(id, :multi) # 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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Operation') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#delete_prompts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete specified user prompt # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :all_resources Whether or not to delete all the prompt resources # @return [nil] def delete_prompts_prompt_id(prompt_id, opts = {}) delete_prompts_prompt_id_with_http_info(prompt_id, opts) return nil end # Delete specified user prompt # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :all_resources Whether or not to delete all the prompt resources # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_prompts_prompt_id_with_http_info(prompt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#delete_prompts_prompt_id ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling delete_prompts_prompt_id" if prompt_id.nil? # resource path local_var_path = "/api/v2/architect/prompts/{promptId}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s) # query parameters query_params = {} query_params[:'allResources'] = opts[:'all_resources'] if opts[:'all_resources'] # 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, local_var_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: ArchitectApi#delete_prompts_prompt_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete specified user prompt resource # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @return [nil] def delete_prompts_prompt_id_resources_languagecode(prompt_id, language_code, opts = {}) delete_prompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts) return nil end # Delete specified user prompt resource # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_prompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#delete_prompts_prompt_id_resources_languagecode ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling delete_prompts_prompt_id_resources_languagecode" if prompt_id.nil? # verify the required parameter 'language_code' is set fail "Missing the required parameter 'language_code' when calling delete_prompts_prompt_id_resources_languagecode" if language_code.nil? # resource path local_var_path = "/api/v2/architect/prompts/{promptId}/resources/{languageCode}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s).sub('{' + 'languageCode' + '}', language_code.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, local_var_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: ArchitectApi#delete_prompts_prompt_id_resources_languagecode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a system prompt resource override. # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @return [String] def delete_systemprompts_prompt_id_resources_languagecode(prompt_id, language_code, opts = {}) data, status_code, headers = delete_systemprompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts) return data end # Delete a system prompt resource override. # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_systemprompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#delete_systemprompts_prompt_id_resources_languagecode ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling delete_systemprompts_prompt_id_resources_languagecode" if prompt_id.nil? # verify the required parameter 'language_code' is set fail "Missing the required parameter 'language_code' when calling delete_systemprompts_prompt_id_resources_languagecode" if language_code.nil? # resource path local_var_path = "/api/v2/architect/systemprompts/{promptId}/resources/{languageCode}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s).sub('{' + 'languageCode' + '}', language_code.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, local_var_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: ArchitectApi#delete_systemprompts_prompt_id_resources_languagecode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a pageable list of flows, filtered by query parameters # Multiple IDs can be specified, in which case all matching flows will be returned, and no other parameters will be evaluated. # @param type Type # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @option opts [String] :sort_by Sort by (default to id) # @option opts [String] :sort_order Sort order (default to asc) # @option opts [Array] :id ID # @option opts [String] :name Name # @option opts [String] :description Description # @option opts [String] :name_or_description Name or description # @option opts [String] :publish_version_id Publish version ID # @option opts [String] :editable_by Editable by # @option opts [String] :locked_by Locked by # @option opts [String] :secure Secure # @option opts [BOOLEAN] :deleted Include deleted (default to false) # @option opts [BOOLEAN] :include_schemas Include variable schemas (default to false) # @return [FlowEntityListing] def get_flows(type, opts = {}) data, status_code, headers = get_flows_with_http_info(type, opts) return data end # Get a pageable list of flows, filtered by query parameters # Multiple IDs can be specified, in which case all matching flows will be returned, and no other parameters will be evaluated. # @param type Type # @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 Sort by # @option opts [String] :sort_order Sort order # @option opts [Array] :id ID # @option opts [String] :name Name # @option opts [String] :description Description # @option opts [String] :name_or_description Name or description # @option opts [String] :publish_version_id Publish version ID # @option opts [String] :editable_by Editable by # @option opts [String] :locked_by Locked by # @option opts [String] :secure Secure # @option opts [BOOLEAN] :deleted Include deleted # @option opts [BOOLEAN] :include_schemas Include variable schemas # @return [Array<(FlowEntityListing, Fixnum, Hash)>] FlowEntityListing data, response status code and response headers def get_flows_with_http_info(type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_flows ..." end # verify the required parameter 'type' is set fail "Missing the required parameter 'type' when calling get_flows" if type.nil? if opts[:'secure'] && !['any', 'checkedin', 'published'].include?(opts[:'secure']) fail 'invalid value for "secure", must be one of any, checkedin, published' end # resource path local_var_path = "/api/v2/flows".sub('{format}','json') # query parameters query_params = {} query_params[:'type'] = type 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[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'description'] = opts[:'description'] if opts[:'description'] query_params[:'nameOrDescription'] = opts[:'name_or_description'] if opts[:'name_or_description'] query_params[:'publishVersionId'] = opts[:'publish_version_id'] if opts[:'publish_version_id'] query_params[:'editableBy'] = opts[:'editable_by'] if opts[:'editable_by'] query_params[:'lockedBy'] = opts[:'locked_by'] if opts[:'locked_by'] query_params[:'secure'] = opts[:'secure'] if opts[:'secure'] query_params[:'deleted'] = opts[:'deleted'] if opts[:'deleted'] query_params[:'includeSchemas'] = opts[:'include_schemas'] if opts[:'include_schemas'] # 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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FlowEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a pageable list of user prompts # The returned list is pageable, and query parameters can be used for filtering. Multiple names can be specified, in which case all matching prompts will be returned, and no other filters will be evaluated. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @option opts [String] :name Name # @option opts [String] :description Description # @option opts [String] :name_or_description Name or description # @return [PromptEntityListing] def get_prompts(opts = {}) data, status_code, headers = get_prompts_with_http_info(opts) return data end # Get a pageable list of user prompts # The returned list is pageable, and query parameters can be used for filtering. Multiple names can be specified, in which case all matching prompts will be returned, and no other filters will be evaluated. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [String] :name Name # @option opts [String] :description Description # @option opts [String] :name_or_description Name or description # @return [Array<(PromptEntityListing, Fixnum, Hash)>] PromptEntityListing data, response status code and response headers def get_prompts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_prompts ..." end # resource path local_var_path = "/api/v2/architect/prompts".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[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'description'] = opts[:'description'] if opts[:'description'] query_params[:'nameOrDescription'] = opts[:'name_or_description'] if opts[:'name_or_description'] # 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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PromptEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_prompts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get specified user prompt # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @return [Prompt] def get_prompts_prompt_id(prompt_id, opts = {}) data, status_code, headers = get_prompts_prompt_id_with_http_info(prompt_id, opts) return data end # Get specified user prompt # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @return [Array<(Prompt, Fixnum, Hash)>] Prompt data, response status code and response headers def get_prompts_prompt_id_with_http_info(prompt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_prompts_prompt_id ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling get_prompts_prompt_id" if prompt_id.nil? # resource path local_var_path = "/api/v2/architect/prompts/{promptId}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Prompt') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_prompts_prompt_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a pageable list of user prompt resources # The returned list is pageable, and query parameters can be used for filtering. # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @return [PromptAssetEntityListing] def get_prompts_prompt_id_resources(prompt_id, opts = {}) data, status_code, headers = get_prompts_prompt_id_resources_with_http_info(prompt_id, opts) return data end # Get a pageable list of user prompt resources # The returned list is pageable, and query parameters can be used for filtering. # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @return [Array<(PromptAssetEntityListing, Fixnum, Hash)>] PromptAssetEntityListing data, response status code and response headers def get_prompts_prompt_id_resources_with_http_info(prompt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_prompts_prompt_id_resources ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling get_prompts_prompt_id_resources" if prompt_id.nil? # resource path local_var_path = "/api/v2/architect/prompts/{promptId}/resources".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s) # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # 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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PromptAssetEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_prompts_prompt_id_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get specified user prompt resource # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @return [PromptAsset] def get_prompts_prompt_id_resources_languagecode(prompt_id, language_code, opts = {}) data, status_code, headers = get_prompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts) return data end # Get specified user prompt resource # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @return [Array<(PromptAsset, Fixnum, Hash)>] PromptAsset data, response status code and response headers def get_prompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_prompts_prompt_id_resources_languagecode ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling get_prompts_prompt_id_resources_languagecode" if prompt_id.nil? # verify the required parameter 'language_code' is set fail "Missing the required parameter 'language_code' when calling get_prompts_prompt_id_resources_languagecode" if language_code.nil? # resource path local_var_path = "/api/v2/architect/prompts/{promptId}/resources/{languageCode}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s).sub('{' + 'languageCode' + '}', language_code.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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PromptAsset') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_prompts_prompt_id_resources_languagecode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get System Prompts # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @option opts [String] :sort_by Sort by (default to id) # @option opts [String] :sort_order Sort order (default to asc) # @option opts [String] :name Name # @option opts [String] :description Description # @option opts [String] :name_or_description Name or description # @return [SystemPromptEntityListing] def get_systemprompts(opts = {}) data, status_code, headers = get_systemprompts_with_http_info(opts) return data end # Get System Prompts # # @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 Sort by # @option opts [String] :sort_order Sort order # @option opts [String] :name Name # @option opts [String] :description Description # @option opts [String] :name_or_description Name or description # @return [Array<(SystemPromptEntityListing, Fixnum, Hash)>] SystemPromptEntityListing data, response status code and response headers def get_systemprompts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_systemprompts ..." end # resource path local_var_path = "/api/v2/architect/systemprompts".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[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'description'] = opts[:'description'] if opts[:'description'] query_params[:'nameOrDescription'] = opts[:'name_or_description'] if opts[:'name_or_description'] # 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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SystemPromptEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_systemprompts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a system prompt # # @param prompt_id promptId # @param [Hash] opts the optional parameters # @return [SystemPrompt] def get_systemprompts_prompt_id(prompt_id, opts = {}) data, status_code, headers = get_systemprompts_prompt_id_with_http_info(prompt_id, opts) return data end # Get a system prompt # # @param prompt_id promptId # @param [Hash] opts the optional parameters # @return [Array<(SystemPrompt, Fixnum, Hash)>] SystemPrompt data, response status code and response headers def get_systemprompts_prompt_id_with_http_info(prompt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_systemprompts_prompt_id ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling get_systemprompts_prompt_id" if prompt_id.nil? # resource path local_var_path = "/api/v2/architect/systemprompts/{promptId}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SystemPrompt') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_systemprompts_prompt_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get IVR System Prompt resources. # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @option opts [String] :sort_by Sort by (default to id) # @option opts [String] :sort_order Sort order (default to asc) # @return [SystemPromptAssetEntityListing] def get_systemprompts_prompt_id_resources(prompt_id, opts = {}) data, status_code, headers = get_systemprompts_prompt_id_resources_with_http_info(prompt_id, opts) return data end # Get IVR System Prompt resources. # # @param prompt_id Prompt ID # @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 Sort by # @option opts [String] :sort_order Sort order # @return [Array<(SystemPromptAssetEntityListing, Fixnum, Hash)>] SystemPromptAssetEntityListing data, response status code and response headers def get_systemprompts_prompt_id_resources_with_http_info(prompt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_systemprompts_prompt_id_resources ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling get_systemprompts_prompt_id_resources" if prompt_id.nil? # resource path local_var_path = "/api/v2/architect/systemprompts/{promptId}/resources".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s) # 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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SystemPromptAssetEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_systemprompts_prompt_id_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a system prompt resource. # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @return [SystemPromptAsset] def get_systemprompts_prompt_id_resources_languagecode(prompt_id, language_code, opts = {}) data, status_code, headers = get_systemprompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts) return data end # Get a system prompt resource. # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @return [Array<(SystemPromptAsset, Fixnum, Hash)>] SystemPromptAsset data, response status code and response headers def get_systemprompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_systemprompts_prompt_id_resources_languagecode ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling get_systemprompts_prompt_id_resources_languagecode" if prompt_id.nil? # verify the required parameter 'language_code' is set fail "Missing the required parameter 'language_code' when calling get_systemprompts_prompt_id_resources_languagecode" if language_code.nil? # resource path local_var_path = "/api/v2/architect/systemprompts/{promptId}/resources/{languageCode}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s).sub('{' + 'languageCode' + '}', language_code.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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SystemPromptAsset') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_systemprompts_prompt_id_resources_languagecode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new user prompt # # @param [Hash] opts the optional parameters # @option opts [Prompt] :body # @return [Prompt] def post_prompts(opts = {}) data, status_code, headers = post_prompts_with_http_info(opts) return data end # Create a new user prompt # # @param [Hash] opts the optional parameters # @option opts [Prompt] :body # @return [Array<(Prompt, Fixnum, Hash)>] Prompt data, response status code and response headers def post_prompts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#post_prompts ..." end # resource path local_var_path = "/api/v2/architect/prompts".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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Prompt') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#post_prompts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new user prompt resource # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [PromptAssetCreate] :body # @return [PromptAsset] def post_prompts_prompt_id_resources(prompt_id, opts = {}) data, status_code, headers = post_prompts_prompt_id_resources_with_http_info(prompt_id, opts) return data end # Create a new user prompt resource # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [PromptAssetCreate] :body # @return [Array<(PromptAsset, Fixnum, Hash)>] PromptAsset data, response status code and response headers def post_prompts_prompt_id_resources_with_http_info(prompt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#post_prompts_prompt_id_resources ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling post_prompts_prompt_id_resources" if prompt_id.nil? # resource path local_var_path = "/api/v2/architect/prompts/{promptId}/resources".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_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(: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 => 'PromptAsset') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#post_prompts_prompt_id_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create system prompt resource override. # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [SystemPromptAsset] :body # @return [SystemPromptAsset] def post_systemprompts_prompt_id_resources(prompt_id, opts = {}) data, status_code, headers = post_systemprompts_prompt_id_resources_with_http_info(prompt_id, opts) return data end # Create system prompt resource override. # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [SystemPromptAsset] :body # @return [Array<(SystemPromptAsset, Fixnum, Hash)>] SystemPromptAsset data, response status code and response headers def post_systemprompts_prompt_id_resources_with_http_info(prompt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#post_systemprompts_prompt_id_resources ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling post_systemprompts_prompt_id_resources" if prompt_id.nil? # resource path local_var_path = "/api/v2/architect/systemprompts/{promptId}/resources".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_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(: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 => 'SystemPromptAsset') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#post_systemprompts_prompt_id_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update specified user prompt # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [Prompt] :body # @return [Prompt] def put_prompts_prompt_id(prompt_id, opts = {}) data, status_code, headers = put_prompts_prompt_id_with_http_info(prompt_id, opts) return data end # Update specified user prompt # # @param prompt_id Prompt ID # @param [Hash] opts the optional parameters # @option opts [Prompt] :body # @return [Array<(Prompt, Fixnum, Hash)>] Prompt data, response status code and response headers def put_prompts_prompt_id_with_http_info(prompt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#put_prompts_prompt_id ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling put_prompts_prompt_id" if prompt_id.nil? # resource path local_var_path = "/api/v2/architect/prompts/{promptId}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Prompt') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#put_prompts_prompt_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update specified user prompt resource # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @option opts [PromptAsset] :body # @return [PromptAsset] def put_prompts_prompt_id_resources_languagecode(prompt_id, language_code, opts = {}) data, status_code, headers = put_prompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts) return data end # Update specified user prompt resource # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @option opts [PromptAsset] :body # @return [Array<(PromptAsset, Fixnum, Hash)>] PromptAsset data, response status code and response headers def put_prompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#put_prompts_prompt_id_resources_languagecode ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling put_prompts_prompt_id_resources_languagecode" if prompt_id.nil? # verify the required parameter 'language_code' is set fail "Missing the required parameter 'language_code' when calling put_prompts_prompt_id_resources_languagecode" if language_code.nil? # resource path local_var_path = "/api/v2/architect/prompts/{promptId}/resources/{languageCode}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s).sub('{' + 'languageCode' + '}', language_code.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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PromptAsset') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#put_prompts_prompt_id_resources_languagecode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Updates a system prompt resource override. # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @option opts [SystemPromptAsset] :body # @return [SystemPromptAsset] def put_systemprompts_prompt_id_resources_languagecode(prompt_id, language_code, opts = {}) data, status_code, headers = put_systemprompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts) return data end # Updates a system prompt resource override. # # @param prompt_id Prompt ID # @param language_code Language # @param [Hash] opts the optional parameters # @option opts [SystemPromptAsset] :body # @return [Array<(SystemPromptAsset, Fixnum, Hash)>] SystemPromptAsset data, response status code and response headers def put_systemprompts_prompt_id_resources_languagecode_with_http_info(prompt_id, language_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#put_systemprompts_prompt_id_resources_languagecode ..." end # verify the required parameter 'prompt_id' is set fail "Missing the required parameter 'prompt_id' when calling put_systemprompts_prompt_id_resources_languagecode" if prompt_id.nil? # verify the required parameter 'language_code' is set fail "Missing the required parameter 'language_code' when calling put_systemprompts_prompt_id_resources_languagecode" if language_code.nil? # resource path local_var_path = "/api/v2/architect/systemprompts/{promptId}/resources/{languageCode}".sub('{format}','json').sub('{' + 'promptId' + '}', prompt_id.to_s).sub('{' + 'languageCode' + '}', language_code.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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SystemPromptAsset') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#put_systemprompts_prompt_id_resources_languagecode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end