Class: PureCloud::LanguagesApi
- Inherits:
-
Object
- Object
- PureCloud::LanguagesApi
- Defined in:
- lib/purecloudclient_v2a/api/languages_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_language(language_id, opts = {}) ⇒ nil
Delete Language (Deprecated) This endpoint is deprecated.
-
#delete_language_with_http_info(language_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Language (Deprecated) This endpoint is deprecated.
-
#delete_routing_language(language_id, opts = {}) ⇒ nil
Delete Language.
-
#delete_routing_language_with_http_info(language_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Language.
-
#get_language(language_id, opts = {}) ⇒ Language
Get language (Deprecated) This endpoint is deprecated.
-
#get_language_with_http_info(language_id, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Get language (Deprecated) This endpoint is deprecated.
-
#get_languages(opts = {}) ⇒ LanguageEntityListing
Get the list of supported languages.
-
#get_languages_translations(opts = {}) ⇒ AvailableTranslations
Get all available languages for translation.
-
#get_languages_translations_builtin(language, opts = {}) ⇒ Hash<String, Object>
Get the builtin translation for a language.
-
#get_languages_translations_builtin_with_http_info(language, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get the builtin translation for a language.
-
#get_languages_translations_organization(language, opts = {}) ⇒ Hash<String, Object>
Get effective translation for an organization by language.
-
#get_languages_translations_organization_with_http_info(language, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get effective translation for an organization by language.
-
#get_languages_translations_user(user_id, opts = {}) ⇒ Hash<String, Object>
Get effective language translation for a user.
-
#get_languages_translations_user_with_http_info(user_id, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get effective language translation for a user.
-
#get_languages_translations_with_http_info(opts = {}) ⇒ Array<(AvailableTranslations, Fixnum, Hash)>
Get all available languages for translation.
-
#get_languages_with_http_info(opts = {}) ⇒ Array<(LanguageEntityListing, Fixnum, Hash)>
Get the list of supported languages.
-
#get_routing_language(language_id, opts = {}) ⇒ Language
Get language.
-
#get_routing_language_with_http_info(language_id, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Get language.
-
#initialize(api_client = ApiClient.default) ⇒ LanguagesApi
constructor
A new instance of LanguagesApi.
-
#post_languages(body, opts = {}) ⇒ Language
Create Language (Deprecated) This endpoint is deprecated.
-
#post_languages_with_http_info(body, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Create Language (Deprecated) This endpoint is deprecated.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LanguagesApi
Returns a new instance of LanguagesApi.
23 24 25 |
# File 'lib/purecloudclient_v2a/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/purecloudclient_v2a/api/languages_api.rb', line 21 def api_client @api_client end |
Instance Method Details
#delete_language(language_id, opts = {}) ⇒ nil
Delete Language (Deprecated) This endpoint is deprecated. It has been moved to /routing/languages/languageId
32 33 34 35 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 32 def delete_language(language_id, opts = {}) delete_language_with_http_info(language_id, opts) return nil end |
#delete_language_with_http_info(language_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Language (Deprecated) This endpoint is deprecated. It has been moved to /routing/languages/languageId
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 85 86 87 88 89 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 42 def delete_language_with_http_info(language_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi.delete_language ..." end # verify the required parameter 'language_id' is set fail ArgumentError, "Missing the required parameter 'language_id' when calling LanguagesApi.delete_language" 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) 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: LanguagesApi#delete_language\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_routing_language(language_id, opts = {}) ⇒ nil
Delete Language
96 97 98 99 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 96 def delete_routing_language(language_id, opts = {}) delete_routing_language_with_http_info(language_id, opts) return nil end |
#delete_routing_language_with_http_info(language_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Language
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 145 146 147 148 149 150 151 152 153 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 106 def delete_routing_language_with_http_info(language_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi.delete_routing_language ..." end # verify the required parameter 'language_id' is set fail ArgumentError, "Missing the required parameter 'language_id' when calling LanguagesApi.delete_routing_language" if language_id.nil? # resource path local_var_path = "/api/v2/routing/languages/{languageId}".sub('{format}','json').sub('{' + 'languageId' + '}', language_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: LanguagesApi#delete_routing_language\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_language(language_id, opts = {}) ⇒ Language
Get language (Deprecated) This endpoint is deprecated. It has been moved to /routing/languages/languageId
160 161 162 163 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 160 def get_language(language_id, opts = {}) data, _status_code, _headers = get_language_with_http_info(language_id, opts) return data end |
#get_language_with_http_info(language_id, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Get language (Deprecated) This endpoint is deprecated. It has been moved to /routing/languages/languageId
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 216 217 218 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 170 def get_language_with_http_info(language_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi.get_language ..." end # verify the required parameter 'language_id' is set fail ArgumentError, "Missing the required parameter 'language_id' when calling LanguagesApi.get_language" 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) 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 => 'Language') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#get_language\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. (Deprecated) This endpoint is deprecated. It has been moved to /routing/languages
228 229 230 231 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 228 def get_languages(opts = {}) data, _status_code, _headers = get_languages_with_http_info(opts) return data end |
#get_languages_translations(opts = {}) ⇒ AvailableTranslations
Get all available languages for translation
319 320 321 322 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 319 def get_languages_translations(opts = {}) data, _status_code, _headers = get_languages_translations_with_http_info(opts) return data end |
#get_languages_translations_builtin(language, opts = {}) ⇒ Hash<String, Object>
Get the builtin translation for a language
375 376 377 378 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 375 def get_languages_translations_builtin(language, opts = {}) data, _status_code, _headers = get_languages_translations_builtin_with_http_info(language, opts) return data end |
#get_languages_translations_builtin_with_http_info(language, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get the builtin translation for a language
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 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 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 385 def get_languages_translations_builtin_with_http_info(language, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi.get_languages_translations_builtin ..." end # verify the required parameter 'language' is set fail ArgumentError, "Missing the required parameter 'language' when calling LanguagesApi.get_languages_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) 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 => 'Hash<String, Object>') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#get_languages_translations_builtin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_languages_translations_organization(language, opts = {}) ⇒ Hash<String, Object>
Get effective translation for an organization by language
441 442 443 444 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 441 def get_languages_translations_organization(language, opts = {}) data, _status_code, _headers = get_languages_translations_organization_with_http_info(language, opts) return data end |
#get_languages_translations_organization_with_http_info(language, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get effective translation for an organization by language
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 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 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 451 def get_languages_translations_organization_with_http_info(language, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi.get_languages_translations_organization ..." end # verify the required parameter 'language' is set fail ArgumentError, "Missing the required parameter 'language' when calling LanguagesApi.get_languages_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) 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 => 'Hash<String, Object>') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#get_languages_translations_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_languages_translations_user(user_id, opts = {}) ⇒ Hash<String, Object>
Get effective language translation for a user
507 508 509 510 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 507 def get_languages_translations_user(user_id, opts = {}) data, _status_code, _headers = get_languages_translations_user_with_http_info(user_id, opts) return data end |
#get_languages_translations_user_with_http_info(user_id, opts = {}) ⇒ Array<(Hash<String, Object>, Fixnum, Hash)>
Get effective language translation for a user
517 518 519 520 521 522 523 524 525 526 527 528 529 530 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 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 517 def get_languages_translations_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi.get_languages_translations_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling LanguagesApi.get_languages_translations_user" 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) 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 => 'Hash<String, Object>') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#get_languages_translations_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_languages_translations_with_http_info(opts = {}) ⇒ Array<(AvailableTranslations, Fixnum, Hash)>
Get all available languages for translation
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 328 def get_languages_translations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi.get_languages_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) 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 => 'AvailableTranslations') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#get_languages_translations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_languages_with_http_info(opts = {}) ⇒ Array<(LanguageEntityListing, Fixnum, Hash)>
Get the list of supported languages. (Deprecated) This endpoint is deprecated. It has been moved to /routing/languages
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 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 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 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 241 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 ArgumentError, '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) 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 => '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_routing_language(language_id, opts = {}) ⇒ Language
Get language
572 573 574 575 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 572 def get_routing_language(language_id, opts = {}) data, _status_code, _headers = get_routing_language_with_http_info(language_id, opts) return data end |
#get_routing_language_with_http_info(language_id, opts = {}) ⇒ Array<(Language, Fixnum, Hash)>
Get language
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 582 def get_routing_language_with_http_info(language_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguagesApi.get_routing_language ..." end # verify the required parameter 'language_id' is set fail ArgumentError, "Missing the required parameter 'language_id' when calling LanguagesApi.get_routing_language" if language_id.nil? # resource path local_var_path = "/api/v2/routing/languages/{languageId}".sub('{format}','json').sub('{' + 'languageId' + '}', language_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 => 'Language') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguagesApi#get_routing_language\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_languages(body, opts = {}) ⇒ Language
Create Language (Deprecated) This endpoint is deprecated. It has been moved to /routing/languages
637 638 639 640 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 637 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 (Deprecated) This endpoint is deprecated. It has been moved to /routing/languages
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/purecloudclient_v2a/api/languages_api.rb', line 647 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 ArgumentError, "Missing the required parameter 'body' when calling LanguagesApi.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) 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 => '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 |