lib/purecloud/api/greetings_api.rb in purecloud-0.62.1 vs lib/purecloud/api/greetings_api.rb in purecloud-0.63.1

- old
+ new

@@ -82,10 +82,71 @@ @api_client.config.logger.debug "API called: GreetingsApi#delete_greeting_id\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(opts = {}) + data, status_code, headers = get_with_http_info(opts) + return data + end + + # Gets an Organization&#39;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_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: GreetingsApi#get ..." + 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) + _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 => 'DomainEntityListing') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GreetingsApi#get\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_defaults(opts = {}) @@ -264,71 +325,10 @@ @api_client.config.logger.debug "API called: GreetingsApi#get_greeting_id_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&#39;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) - _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 => '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 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) @@ -582,27 +582,27 @@ # 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) + def post(body, opts = {}) + data, status_code, headers = post_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 = {}) + def post_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: GreetingsApi#post_greetings ..." + @api_client.config.logger.debug "Calling API: GreetingsApi#post ..." end # verify the required parameter 'body' is set - fail "Missing the required parameter 'body' when calling post_greetings" if body.nil? + fail "Missing the required parameter 'body' when calling post" if body.nil? # resource path local_var_path = "/api/v2/greetings".sub('{format}','json') # query parameters @@ -632,10 +632,10 @@ :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}" + @api_client.config.logger.debug "API called: GreetingsApi#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Creates a Greeting for a Group