=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@genesys.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 GreetingsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Deletes a Greeting with the given GreetingId # # @param greeting_id Greeting ID # @param [Hash] opts the optional parameters # @return [nil] def delete_greeting(greeting_id, opts = {}) delete_greeting_with_http_info(greeting_id, opts) return nil end # Deletes a Greeting with the given GreetingId # # @param greeting_id Greeting ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_greeting_with_http_info(greeting_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.delete_greeting ..." end # verify the required parameter 'greeting_id' is set fail ArgumentError, "Missing the required parameter 'greeting_id' when calling GreetingsApi.delete_greeting" if greeting_id.nil? # resource path local_var_path = "/api/v2/greetings/{greetingId}".sub('{format}','json').sub('{' + 'greetingId' + '}', greeting_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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: GreetingsApi#delete_greeting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Greeting with the given GreetingId # # @param greeting_id Greeting ID # @param [Hash] opts the optional parameters # @return [Greeting] def get_greeting(greeting_id, opts = {}) data, _status_code, _headers = get_greeting_with_http_info(greeting_id, opts) return data end # Get a Greeting with the given GreetingId # # @param greeting_id Greeting ID # @param [Hash] opts the optional parameters # @return [Array<(Greeting, Fixnum, Hash)>] Greeting data, response status code and response headers def get_greeting_with_http_info(greeting_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.get_greeting ..." end # verify the required parameter 'greeting_id' is set fail ArgumentError, "Missing the required parameter 'greeting_id' when calling GreetingsApi.get_greeting" if greeting_id.nil? # resource path local_var_path = "/api/v2/greetings/{greetingId}".sub('{format}','json').sub('{' + 'greetingId' + '}', greeting_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'Greeting') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#get_greeting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get media playback URI for this greeting # # @param greeting_id Greeting ID # @param [Hash] opts the optional parameters # @option opts [String] :format_id The desired media format. (default to WAV) # @return [GreetingMediaInfo] def get_greeting_media(greeting_id, opts = {}) data, _status_code, _headers = get_greeting_media_with_http_info(greeting_id, opts) return data end # Get media playback URI for this greeting # # @param greeting_id Greeting ID # @param [Hash] opts the optional parameters # @option opts [String] :format_id The desired media format. # @return [Array<(GreetingMediaInfo, Fixnum, Hash)>] GreetingMediaInfo data, response status code and response headers def get_greeting_media_with_http_info(greeting_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.get_greeting_media ..." end # verify the required parameter 'greeting_id' is set fail ArgumentError, "Missing the required parameter 'greeting_id' when calling GreetingsApi.get_greeting_media" if greeting_id.nil? if opts[:'format_id'] && !['WAV', 'WEBM', 'WAV_ULAW', 'OGG_VORBIS', 'OGG_OPUS', 'NONE'].include?(opts[:'format_id']) fail ArgumentError, 'invalid value for "format_id", must be one of WAV, WEBM, WAV_ULAW, OGG_VORBIS, OGG_OPUS, NONE' end # resource path local_var_path = "/api/v2/greetings/{greetingId}/media".sub('{format}','json').sub('{' + 'greetingId' + '}', greeting_id.to_s) # query parameters query_params = {} query_params[:'formatId'] = opts[:'format_id'] if opts[:'format_id'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'GreetingMediaInfo') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#get_greeting_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets an Organization's Greetings # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @return [DomainEntityListing] def get_greetings(opts = {}) data, _status_code, _headers = get_greetings_with_http_info(opts) return data end # Gets an Organization's Greetings # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(DomainEntityListing, Fixnum, Hash)>] DomainEntityListing data, response status code and response headers def get_greetings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.get_greetings ..." end # resource path local_var_path = "/api/v2/greetings".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) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'DomainEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#get_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get an Organization's DefaultGreetingList # # @param [Hash] opts the optional parameters # @return [DefaultGreetingList] def get_greetings_defaults(opts = {}) data, _status_code, _headers = get_greetings_defaults_with_http_info(opts) return data end # Get an Organization's DefaultGreetingList # # @param [Hash] opts the optional parameters # @return [Array<(DefaultGreetingList, Fixnum, Hash)>] DefaultGreetingList data, response status code and response headers def get_greetings_defaults_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.get_greetings_defaults ..." end # resource path local_var_path = "/api/v2/greetings/defaults".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'DefaultGreetingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#get_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of the Group's Greetings # # @param group_id Group ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @return [GreetingListing] def get_group_greetings(group_id, opts = {}) data, _status_code, _headers = get_group_greetings_with_http_info(group_id, opts) return data end # Get a list of the Group's Greetings # # @param group_id Group ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(GreetingListing, Fixnum, Hash)>] GreetingListing data, response status code and response headers def get_group_greetings_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.get_group_greetings ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GreetingsApi.get_group_greetings" if group_id.nil? # resource path local_var_path = "/api/v2/groups/{groupId}/greetings".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # 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) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'GreetingListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#get_group_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Grabs the list of Default Greetings given a Group's ID # # @param group_id Group ID # @param [Hash] opts the optional parameters # @return [DefaultGreetingList] def get_group_greetings_defaults(group_id, opts = {}) data, _status_code, _headers = get_group_greetings_defaults_with_http_info(group_id, opts) return data end # Grabs the list of Default Greetings given a Group's ID # # @param group_id Group ID # @param [Hash] opts the optional parameters # @return [Array<(DefaultGreetingList, Fixnum, Hash)>] DefaultGreetingList data, response status code and response headers def get_group_greetings_defaults_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.get_group_greetings_defaults ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GreetingsApi.get_group_greetings_defaults" if group_id.nil? # resource path local_var_path = "/api/v2/groups/{groupId}/greetings/defaults".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'DefaultGreetingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#get_group_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of the User's Greetings # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @return [DomainEntityListing] def get_user_greetings(user_id, opts = {}) data, _status_code, _headers = get_user_greetings_with_http_info(user_id, opts) return data end # Get a list of the User's Greetings # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(DomainEntityListing, Fixnum, Hash)>] DomainEntityListing data, response status code and response headers def get_user_greetings_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.get_user_greetings ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling GreetingsApi.get_user_greetings" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/greetings".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # 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) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'DomainEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#get_user_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Grabs the list of Default Greetings given a User's ID # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [DefaultGreetingList] def get_user_greetings_defaults(user_id, opts = {}) data, _status_code, _headers = get_user_greetings_defaults_with_http_info(user_id, opts) return data end # Grabs the list of Default Greetings given a User's ID # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(DefaultGreetingList, Fixnum, Hash)>] DefaultGreetingList data, response status code and response headers def get_user_greetings_defaults_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.get_user_greetings_defaults ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling GreetingsApi.get_user_greetings_defaults" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/greetings/defaults".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'DefaultGreetingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#get_user_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a Greeting for an Organization # # @param body The Greeting to create # @param [Hash] opts the optional parameters # @return [DefaultGreetingList] def post_greetings(body, opts = {}) data, _status_code, _headers = post_greetings_with_http_info(body, opts) return data end # Create a Greeting for an Organization # # @param body The Greeting to create # @param [Hash] opts the optional parameters # @return [Array<(DefaultGreetingList, Fixnum, Hash)>] DefaultGreetingList data, response status code and response headers def post_greetings_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.post_greetings ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.post_greetings" if body.nil? # resource path local_var_path = "/api/v2/greetings".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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 => 'DefaultGreetingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#post_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Creates a Greeting for a Group # # @param group_id Group ID # @param body The Greeting to create # @param [Hash] opts the optional parameters # @return [Greeting] def post_group_greetings(group_id, body, opts = {}) data, _status_code, _headers = post_group_greetings_with_http_info(group_id, body, opts) return data end # Creates a Greeting for a Group # # @param group_id Group ID # @param body The Greeting to create # @param [Hash] opts the optional parameters # @return [Array<(Greeting, Fixnum, Hash)>] Greeting data, response status code and response headers def post_group_greetings_with_http_info(group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.post_group_greetings ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GreetingsApi.post_group_greetings" if group_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.post_group_greetings" if body.nil? # resource path local_var_path = "/api/v2/groups/{groupId}/greetings".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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 => 'Greeting') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#post_group_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Creates a Greeting for a User # # @param user_id User ID # @param body The Greeting to create # @param [Hash] opts the optional parameters # @return [Greeting] def post_user_greetings(user_id, body, opts = {}) data, _status_code, _headers = post_user_greetings_with_http_info(user_id, body, opts) return data end # Creates a Greeting for a User # # @param user_id User ID # @param body The Greeting to create # @param [Hash] opts the optional parameters # @return [Array<(Greeting, Fixnum, Hash)>] Greeting data, response status code and response headers def post_user_greetings_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.post_user_greetings ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling GreetingsApi.post_user_greetings" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.post_user_greetings" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/greetings".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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 => 'Greeting') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#post_user_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Updates the Greeting with the given GreetingId # # @param greeting_id Greeting ID # @param body The updated Greeting # @param [Hash] opts the optional parameters # @return [Greeting] def put_greeting(greeting_id, body, opts = {}) data, _status_code, _headers = put_greeting_with_http_info(greeting_id, body, opts) return data end # Updates the Greeting with the given GreetingId # # @param greeting_id Greeting ID # @param body The updated Greeting # @param [Hash] opts the optional parameters # @return [Array<(Greeting, Fixnum, Hash)>] Greeting data, response status code and response headers def put_greeting_with_http_info(greeting_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.put_greeting ..." end # verify the required parameter 'greeting_id' is set fail ArgumentError, "Missing the required parameter 'greeting_id' when calling GreetingsApi.put_greeting" if greeting_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.put_greeting" if body.nil? # resource path local_var_path = "/api/v2/greetings/{greetingId}".sub('{format}','json').sub('{' + 'greetingId' + '}', greeting_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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 => 'Greeting') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#put_greeting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an Organization's DefaultGreetingList # # @param body The updated defaultGreetingList # @param [Hash] opts the optional parameters # @return [DefaultGreetingList] def put_greetings_defaults(body, opts = {}) data, _status_code, _headers = put_greetings_defaults_with_http_info(body, opts) return data end # Update an Organization's DefaultGreetingList # # @param body The updated defaultGreetingList # @param [Hash] opts the optional parameters # @return [Array<(DefaultGreetingList, Fixnum, Hash)>] DefaultGreetingList data, response status code and response headers def put_greetings_defaults_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.put_greetings_defaults ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.put_greetings_defaults" if body.nil? # resource path local_var_path = "/api/v2/greetings/defaults".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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 => 'DefaultGreetingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#put_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Updates the DefaultGreetingList of the specified Group # # @param group_id Group ID # @param body The updated defaultGreetingList # @param [Hash] opts the optional parameters # @return [DefaultGreetingList] def put_group_greetings_defaults(group_id, body, opts = {}) data, _status_code, _headers = put_group_greetings_defaults_with_http_info(group_id, body, opts) return data end # Updates the DefaultGreetingList of the specified Group # # @param group_id Group ID # @param body The updated defaultGreetingList # @param [Hash] opts the optional parameters # @return [Array<(DefaultGreetingList, Fixnum, Hash)>] DefaultGreetingList data, response status code and response headers def put_group_greetings_defaults_with_http_info(group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.put_group_greetings_defaults ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GreetingsApi.put_group_greetings_defaults" if group_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.put_group_greetings_defaults" if body.nil? # resource path local_var_path = "/api/v2/groups/{groupId}/greetings/defaults".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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 => 'DefaultGreetingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#put_group_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Updates the DefaultGreetingList of the specified User # # @param user_id User ID # @param body The updated defaultGreetingList # @param [Hash] opts the optional parameters # @return [DefaultGreetingList] def put_user_greetings_defaults(user_id, body, opts = {}) data, _status_code, _headers = put_user_greetings_defaults_with_http_info(user_id, body, opts) return data end # Updates the DefaultGreetingList of the specified User # # @param user_id User ID # @param body The updated defaultGreetingList # @param [Hash] opts the optional parameters # @return [Array<(DefaultGreetingList, Fixnum, Hash)>] DefaultGreetingList data, response status code and response headers def put_user_greetings_defaults_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GreetingsApi.put_user_greetings_defaults ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling GreetingsApi.put_user_greetings_defaults" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.put_user_greetings_defaults" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/greetings/defaults".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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 => 'DefaultGreetingList') if @api_client.config.debugging @api_client.config.logger.debug "API called: GreetingsApi#put_user_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end