lib/purecloud/api/greetings_api.rb in purecloud-0.60.1 vs lib/purecloud/api/greetings_api.rb in purecloud-0.61.1
- old
+ new
@@ -325,10 +325,136 @@
@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)
+ # @option opts [Integer] :page_number Page number (default to 1)
+ # @return [GreetingListing]
+ def get_group_id_greetings(group_id, opts = {})
+ data, status_code, headers = get_group_id_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_id_greetings_with_http_info(group_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: GreetingsApi#get_group_id_greetings ..."
+ end
+
+ # verify the required parameter 'group_id' is set
+ fail "Missing the required parameter 'group_id' when calling get_group_id_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)
+ _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 => 'GreetingListing')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: GreetingsApi#get_group_id_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_id_greetings_defaults(group_id, opts = {})
+ data, status_code, headers = get_group_id_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_id_greetings_defaults_with_http_info(group_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: GreetingsApi#get_group_id_greetings_defaults ..."
+ end
+
+ # verify the required parameter 'group_id' is set
+ fail "Missing the required parameter 'group_id' when calling get_group_id_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)
+ _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 => 'DefaultGreetingList')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: GreetingsApi#get_group_id_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)
@@ -511,10 +637,75 @@
@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_id_greetings(group_id, body, opts = {})
+ data, status_code, headers = post_group_id_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_id_greetings_with_http_info(group_id, body, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: GreetingsApi#post_group_id_greetings ..."
+ end
+
+ # verify the required parameter 'group_id' is set
+ fail "Missing the required parameter 'group_id' when calling post_group_id_greetings" if group_id.nil?
+
+ # verify the required parameter 'body' is set
+ fail "Missing the required parameter 'body' when calling post_group_id_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)
+ _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(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_id_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
@@ -697,9 +888,74 @@
: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_id\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_id_greetings_defaults(group_id, body, opts = {})
+ data, status_code, headers = put_group_id_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_id_greetings_defaults_with_http_info(group_id, body, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: GreetingsApi#put_group_id_greetings_defaults ..."
+ end
+
+ # verify the required parameter 'group_id' is set
+ fail "Missing the required parameter 'group_id' when calling put_group_id_greetings_defaults" if group_id.nil?
+
+ # verify the required parameter 'body' is set
+ fail "Missing the required parameter 'body' when calling put_group_id_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)
+ _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(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_id_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