lib/purecloud/api/languages_api.rb in purecloud-0.55.1 vs lib/purecloud/api/languages_api.rb in purecloud-0.56.1
- old
+ new
@@ -212,9 +212,246 @@
@api_client.config.logger.debug "API called: LanguagesApi#get_languages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
+ # Get all available languages for translation
+ #
+ # @param [Hash] opts the optional parameters
+ # @return [AvailableTranslations]
+ def get_translations(opts = {})
+ data, status_code, headers = get_translations_with_http_info(opts)
+ return data
+ end
+
+ # Get all available languages for translation
+ #
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(AvailableTranslations, Fixnum, Hash)>] AvailableTranslations data, response status code and response headers
+ def get_translations_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: LanguagesApi#get_translations ..."
+ end
+
+ # resource path
+ local_var_path = "/api/v2/languages/translations".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 = 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 => 'AvailableTranslations')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LanguagesApi#get_translations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get the builtin translation for a language
+ #
+ # @param language The language of the builtin translation to retrieve
+ # @param [Hash] opts the optional parameters
+ # @return [Hash<String, Object>]
+ def get_translations_builtin(language, opts = {})
+ data, status_code, headers = get_translations_builtin_with_http_info(language, opts)
+ return data
+ end
+
+ # Get the builtin translation for a language
+ #
+ # @param language The language of the builtin translation to retrieve
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(Hash<String, Object>, Fixnum, Hash)>] Hash<String, Object> data, response status code and response headers
+ def get_translations_builtin_with_http_info(language, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: LanguagesApi#get_translations_builtin ..."
+ end
+
+ # verify the required parameter 'language' is set
+ fail "Missing the required parameter 'language' when calling get_translations_builtin" if language.nil?
+
+ # resource path
+ local_var_path = "/api/v2/languages/translations/builtin".sub('{format}','json')
+
+ # query parameters
+ query_params = {}
+ query_params[:'language'] = language
+
+ # 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 => 'Hash<String, Object>')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LanguagesApi#get_translations_builtin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get effective translation for an organization by language
+ #
+ # @param language The language of the translation to retrieve for the organization
+ # @param [Hash] opts the optional parameters
+ # @return [Hash<String, Object>]
+ def get_translations_organization(language, opts = {})
+ data, status_code, headers = get_translations_organization_with_http_info(language, opts)
+ return data
+ end
+
+ # Get effective translation for an organization by language
+ #
+ # @param language The language of the translation to retrieve for the organization
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(Hash<String, Object>, Fixnum, Hash)>] Hash<String, Object> data, response status code and response headers
+ def get_translations_organization_with_http_info(language, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: LanguagesApi#get_translations_organization ..."
+ end
+
+ # verify the required parameter 'language' is set
+ fail "Missing the required parameter 'language' when calling get_translations_organization" if language.nil?
+
+ # resource path
+ local_var_path = "/api/v2/languages/translations/organization".sub('{format}','json')
+
+ # query parameters
+ query_params = {}
+ query_params[:'language'] = language
+
+ # 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 => 'Hash<String, Object>')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LanguagesApi#get_translations_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get effective language translation for a user
+ #
+ # @param user_id The user id
+ # @param [Hash] opts the optional parameters
+ # @return [Hash<String, Object>]
+ def get_translations_users_user_id(user_id, opts = {})
+ data, status_code, headers = get_translations_users_user_id_with_http_info(user_id, opts)
+ return data
+ end
+
+ # Get effective language translation for a user
+ #
+ # @param user_id The user id
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(Hash<String, Object>, Fixnum, Hash)>] Hash<String, Object> data, response status code and response headers
+ def get_translations_users_user_id_with_http_info(user_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: LanguagesApi#get_translations_users_user_id ..."
+ end
+
+ # verify the required parameter 'user_id' is set
+ fail "Missing the required parameter 'user_id' when calling get_translations_users_user_id" if user_id.nil?
+
+ # resource path
+ local_var_path = "/api/v2/languages/translations/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_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 => 'Hash<String, Object>')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LanguagesApi#get_translations_users_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
# Create Language
#
# @param body Language
# @param [Hash] opts the optional parameters
# @return [Language]