Class: PureCloud::LanguagesApi
- Inherits:
-
Object
- Object
- PureCloud::LanguagesApi
- Defined in:
- lib/purecloud/api/languages_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_language_id(language_id, opts = {}) ⇒ nil
Delete Language.
-
#delete_language_id_with_http_info(language_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Language.
-
#get_language_id(language_id, opts = {}) ⇒ Language
Get language.
-
#get_language_id_with_http_info(language_id, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Get language.
-
#get_languages(opts = {}) ⇒ LanguageEntityListing
Get the list of supported languages.
-
#get_languages_with_http_info(opts = {}) ⇒ Array<(LanguageEntityListing, Fixnum, Hash)>
Get the list of supported languages.
-
#get_translations(opts = {}) ⇒ AvailableTranslations
Get all available languages for translation.
-
#get_translations_builtin(language, opts = {}) ⇒ Hash<String, Object>
Get the builtin translation for a language.
-
#get_translations_builtin_with_http_info(language, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get the builtin translation for a language.
-
#get_translations_organization(language, opts = {}) ⇒ Hash<String, Object>
Get effective translation for an organization by language.
-
#get_translations_organization_with_http_info(language, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get effective translation for an organization by language.
-
#get_translations_users_user_id(user_id, opts = {}) ⇒ Hash<String, Object>
Get effective language translation for a user.
-
#get_translations_users_user_id_with_http_info(user_id, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get effective language translation for a user.
-
#get_translations_with_http_info(opts = {}) ⇒ Array<(AvailableTranslations, Fixnum, Hash)>
Get all available languages for translation.
-
#initialize(api_client = ApiClient.default) ⇒ LanguagesApi
constructor
A new instance of LanguagesApi.
-
#post_languages(body, opts = {}) ⇒ Language
Create Language.
-
#post_languages_with_http_info(body, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Create Language.
-
#put_language_id(language_id, body, opts = {}) ⇒ Language
Update Language.
-
#put_language_id_with_http_info(language_id, body, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Update Language.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LanguagesApi
Returns a new instance of LanguagesApi.
23 24 25 |
# File 'lib/purecloud/api/languages_api.rb', line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
21 22 23 |
# File 'lib/purecloud/api/languages_api.rb', line 21 def api_client @api_client end |
Instance Method Details
#delete_language_id(language_id, opts = {}) ⇒ nil
Delete Language
32 33 34 35 |
# File 'lib/purecloud/api/languages_api.rb', line 32 def delete_language_id(language_id, opts = {}) delete_language_id_with_http_info(language_id, opts) return nil end |
#delete_language_id_with_http_info(language_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Language
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/purecloud/api/languages_api.rb', line 42 def delete_language_id_with_http_info(language_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi#delete_language_id ..." end # verify the required parameter 'language_id' is set fail "Missing the required parameter 'language_id' when calling delete_language_id" if language_id.nil? # resource path local_var_path = "/api/v2/languages/{languageId}".sub('{format}','json').sub('{' + 'languageId' + '}', language_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(: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: LanguagesApi#delete_language_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_language_id(language_id, opts = {}) ⇒ Language
Get language
91 92 93 94 |
# File 'lib/purecloud/api/languages_api.rb', line 91 def get_language_id(language_id, opts = {}) data, status_code, headers = get_language_id_with_http_info(language_id, opts) return data end |
#get_language_id_with_http_info(language_id, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Get language
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/purecloud/api/languages_api.rb', line 101 def get_language_id_with_http_info(language_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi#get_language_id ..." end # verify the required parameter 'language_id' is set fail "Missing the required parameter 'language_id' when calling get_language_id" if language_id.nil? # resource path local_var_path = "/api/v2/languages/{languageId}".sub('{format}','json').sub('{' + 'languageId' + '}', language_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 => 'Language') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#get_language_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_languages(opts = {}) ⇒ LanguageEntityListing
Get the list of supported languages.
154 155 156 157 |
# File 'lib/purecloud/api/languages_api.rb', line 154 def get_languages(opts = {}) data, status_code, headers = get_languages_with_http_info(opts) return data end |
#get_languages_with_http_info(opts = {}) ⇒ Array<(LanguageEntityListing, Fixnum, Hash)>
Get the list of supported languages.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/purecloud/api/languages_api.rb', line 167 def get_languages_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi#get_languages ..." end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/languages".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'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'name'] = opts[:'name'] if opts[:'name'] # 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 => 'LanguageEntityListing') if @api_client.config.debugging @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_translations(opts = {}) ⇒ AvailableTranslations
Get all available languages for translation
221 222 223 224 |
# File 'lib/purecloud/api/languages_api.rb', line 221 def get_translations(opts = {}) data, status_code, headers = get_translations_with_http_info(opts) return data end |
#get_translations_builtin(language, opts = {}) ⇒ Hash<String, Object>
Get the builtin translation for a language
277 278 279 280 |
# File 'lib/purecloud/api/languages_api.rb', line 277 def get_translations_builtin(language, opts = {}) data, status_code, headers = get_translations_builtin_with_http_info(language, opts) return data end |
#get_translations_builtin_with_http_info(language, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get the builtin translation for a language
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/purecloud/api/languages_api.rb', line 287 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_translations_organization(language, opts = {}) ⇒ Hash<String, Object>
Get effective translation for an organization by language
338 339 340 341 |
# File 'lib/purecloud/api/languages_api.rb', line 338 def get_translations_organization(language, opts = {}) data, status_code, headers = get_translations_organization_with_http_info(language, opts) return data end |
#get_translations_organization_with_http_info(language, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get effective translation for an organization by language
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/purecloud/api/languages_api.rb', line 348 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_translations_users_user_id(user_id, opts = {}) ⇒ Hash<String, Object>
Get effective language translation for a user
399 400 401 402 |
# File 'lib/purecloud/api/languages_api.rb', line 399 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_translations_users_user_id_with_http_info(user_id, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get effective language translation for a user
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/purecloud/api/languages_api.rb', line 409 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 |
#get_translations_with_http_info(opts = {}) ⇒ Array<(AvailableTranslations, Fixnum, Hash)>
Get all available languages for translation
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/purecloud/api/languages_api.rb', line 230 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 |
#post_languages(body, opts = {}) ⇒ Language
Create Language
459 460 461 462 |
# File 'lib/purecloud/api/languages_api.rb', line 459 def post_languages(body, opts = {}) data, status_code, headers = post_languages_with_http_info(body, opts) return data end |
#post_languages_with_http_info(body, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Create Language
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/purecloud/api/languages_api.rb', line 469 def post_languages_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi#post_languages ..." end # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling post_languages" if body.nil? # resource path local_var_path = "/api/v2/languages".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(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 => 'Language') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#post_languages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_language_id(language_id, body, opts = {}) ⇒ Language
Update Language
520 521 522 523 |
# File 'lib/purecloud/api/languages_api.rb', line 520 def put_language_id(language_id, body, opts = {}) data, status_code, headers = put_language_id_with_http_info(language_id, body, opts) return data end |
#put_language_id_with_http_info(language_id, body, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Update Language
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/purecloud/api/languages_api.rb', line 531 def put_language_id_with_http_info(language_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi#put_language_id ..." end # verify the required parameter 'language_id' is set fail "Missing the required parameter 'language_id' when calling put_language_id" if language_id.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling put_language_id" if body.nil? # resource path local_var_path = "/api/v2/languages/{languageId}".sub('{format}','json').sub('{' + 'languageId' + '}', language_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 => 'Language') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#put_language_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |