phrase 1.0.12 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +56 -9
  3. data/docs/Account.md +3 -1
  4. data/docs/AccountDetails.md +5 -1
  5. data/docs/AccountDetails1.md +3 -1
  6. data/docs/AccountSearchResult.md +29 -0
  7. data/docs/Branch.md +5 -1
  8. data/docs/Comment.md +3 -1
  9. data/docs/CurrentUser.md +31 -0
  10. data/docs/JobLocale.md +5 -1
  11. data/docs/JobTemplate.md +29 -0
  12. data/docs/JobTemplateCreateParameters.md +21 -0
  13. data/docs/JobTemplateLocale.md +23 -0
  14. data/docs/JobTemplateLocaleUpdateParameters.md +23 -0
  15. data/docs/JobTemplateLocalesApi.md +347 -0
  16. data/docs/JobTemplateLocalesCreateParameters.md +23 -0
  17. data/docs/JobTemplatePreview.md +19 -0
  18. data/docs/JobTemplateUpdateParameters.md +21 -0
  19. data/docs/JobTemplateUserPreview.md +23 -0
  20. data/docs/JobTemplatesApi.md +337 -0
  21. data/docs/KeysApi.md +137 -9
  22. data/docs/KeysExcludeParameters.md +23 -0
  23. data/docs/KeysIncludeParameters.md +23 -0
  24. data/docs/KeysSearchParameters.md +1 -1
  25. data/docs/KeysTagParameters.md +1 -1
  26. data/docs/KeysUntagParameters.md +1 -1
  27. data/docs/LocalePreview1.md +23 -0
  28. data/docs/LocalesApi.md +73 -6
  29. data/docs/MemberSpaces.md +2 -2
  30. data/docs/MemberUpdateParameters.md +4 -2
  31. data/docs/Notification.md +41 -0
  32. data/docs/NotificationGroup.md +23 -0
  33. data/docs/NotificationGroupDetail.md +27 -0
  34. data/docs/NotificationGroupsApi.md +194 -0
  35. data/docs/NotificationsApi.md +194 -0
  36. data/docs/OrderCreateParameters.md +2 -0
  37. data/docs/Project.md +2 -0
  38. data/docs/ProjectCreateParameters.md +35 -1
  39. data/docs/ProjectDetails.md +2 -0
  40. data/docs/ProjectUpdateParameters.md +43 -9
  41. data/docs/ProjectsApi.md +7 -1
  42. data/docs/ScreenshotCreateParameters.md +3 -1
  43. data/docs/ScreenshotMarkerCreateParameters.md +3 -1
  44. data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
  45. data/docs/ScreenshotMarkersApi.md +9 -3
  46. data/docs/ScreenshotUpdateParameters.md +3 -1
  47. data/docs/ScreenshotsApi.md +8 -2
  48. data/docs/SearchApi.md +72 -0
  49. data/docs/SearchInAccountParameters.md +23 -0
  50. data/docs/Space1.md +25 -0
  51. data/docs/Subscription.md +19 -0
  52. data/docs/TranslationOrder.md +2 -0
  53. data/docs/TranslationsApi.md +25 -25
  54. data/docs/User.md +0 -2
  55. data/docs/UsersApi.md +2 -2
  56. data/docs/Variable.md +23 -0
  57. data/docs/VariableCreateParameters.md +19 -0
  58. data/docs/VariableUpdateParameters.md +19 -0
  59. data/docs/VariablesApi.md +331 -0
  60. data/lib/phrase.rb +28 -0
  61. data/lib/phrase/api/job_template_locales_api.rb +417 -0
  62. data/lib/phrase/api/job_templates_api.rb +387 -0
  63. data/lib/phrase/api/keys_api.rb +158 -10
  64. data/lib/phrase/api/locales_api.rb +76 -5
  65. data/lib/phrase/api/notification_groups_api.rb +202 -0
  66. data/lib/phrase/api/notifications_api.rb +202 -0
  67. data/lib/phrase/api/projects_api.rb +9 -0
  68. data/lib/phrase/api/screenshot_markers_api.rb +9 -0
  69. data/lib/phrase/api/screenshots_api.rb +9 -0
  70. data/lib/phrase/api/search_api.rb +84 -0
  71. data/lib/phrase/api/translations_api.rb +35 -35
  72. data/lib/phrase/api/users_api.rb +3 -3
  73. data/lib/phrase/api/variables_api.rb +378 -0
  74. data/lib/phrase/models/account.rb +13 -4
  75. data/lib/phrase/models/account_details.rb +22 -4
  76. data/lib/phrase/models/account_details1.rb +10 -1
  77. data/lib/phrase/models/account_search_result.rb +250 -0
  78. data/lib/phrase/models/branch.rb +19 -1
  79. data/lib/phrase/models/comment.rb +15 -4
  80. data/lib/phrase/models/current_user.rb +257 -0
  81. data/lib/phrase/models/job_locale.rb +22 -4
  82. data/lib/phrase/models/job_template.rb +248 -0
  83. data/lib/phrase/models/job_template_create_parameters.rb +220 -0
  84. data/lib/phrase/models/job_template_locale.rb +223 -0
  85. data/lib/phrase/models/job_template_locale_update_parameters.rb +234 -0
  86. data/lib/phrase/models/job_template_locales_create_parameters.rb +234 -0
  87. data/lib/phrase/models/job_template_preview.rb +203 -0
  88. data/lib/phrase/models/job_template_update_parameters.rb +220 -0
  89. data/lib/phrase/models/job_template_user_preview.rb +221 -0
  90. data/lib/phrase/models/keys_exclude_parameters.rb +225 -0
  91. data/lib/phrase/models/keys_include_parameters.rb +225 -0
  92. data/lib/phrase/models/keys_search_parameters.rb +1 -1
  93. data/lib/phrase/models/keys_tag_parameters.rb +1 -1
  94. data/lib/phrase/models/keys_untag_parameters.rb +1 -1
  95. data/lib/phrase/models/locale_preview1.rb +221 -0
  96. data/lib/phrase/models/member_spaces.rb +2 -2
  97. data/lib/phrase/models/member_update_parameters.rb +12 -2
  98. data/lib/phrase/models/notification.rb +302 -0
  99. data/lib/phrase/models/notification_group.rb +221 -0
  100. data/lib/phrase/models/notification_group_detail.rb +239 -0
  101. data/lib/phrase/models/order_create_parameters.rb +11 -1
  102. data/lib/phrase/models/project.rb +10 -1
  103. data/lib/phrase/models/project_create_parameters.rb +174 -4
  104. data/lib/phrase/models/project_details.rb +10 -1
  105. data/lib/phrase/models/project_update_parameters.rb +183 -13
  106. data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
  107. data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
  108. data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
  109. data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
  110. data/lib/phrase/models/search_in_account_parameters.rb +225 -0
  111. data/lib/phrase/models/space1.rb +230 -0
  112. data/lib/phrase/models/subscription.rb +203 -0
  113. data/lib/phrase/models/translation_order.rb +10 -1
  114. data/lib/phrase/models/user.rb +1 -10
  115. data/lib/phrase/models/variable.rb +221 -0
  116. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  117. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  118. data/lib/phrase/version.rb +1 -1
  119. data/spec/api/job_template_locales_api_spec.rb +103 -0
  120. data/spec/api/job_templates_api_spec.rb +98 -0
  121. data/spec/api/keys_api_spec.rb +32 -4
  122. data/spec/api/locales_api_spec.rb +17 -2
  123. data/spec/api/notification_groups_api_spec.rb +62 -0
  124. data/spec/api/notifications_api_spec.rb +62 -0
  125. data/spec/api/projects_api_spec.rb +3 -0
  126. data/spec/api/screenshot_markers_api_spec.rb +3 -0
  127. data/spec/api/screenshots_api_spec.rb +3 -0
  128. data/spec/api/search_api_spec.rb +37 -0
  129. data/spec/api/translations_api_spec.rb +10 -10
  130. data/spec/api/users_api_spec.rb +1 -1
  131. data/spec/api/variables_api_spec.rb +95 -0
  132. data/spec/models/account_details1_spec.rb +6 -0
  133. data/spec/models/account_details_spec.rb +12 -0
  134. data/spec/models/account_search_result_spec.rb +65 -0
  135. data/spec/models/account_spec.rb +6 -0
  136. data/spec/models/branch_spec.rb +12 -0
  137. data/spec/models/comment_spec.rb +6 -0
  138. data/spec/models/current_user_spec.rb +71 -0
  139. data/spec/models/job_locale_spec.rb +12 -0
  140. data/spec/models/job_template_create_parameters_spec.rb +41 -0
  141. data/spec/models/job_template_locale_spec.rb +47 -0
  142. data/spec/models/job_template_locale_update_parameters_spec.rb +47 -0
  143. data/spec/models/job_template_locales_create_parameters_spec.rb +47 -0
  144. data/spec/models/job_template_preview_spec.rb +35 -0
  145. data/spec/models/job_template_spec.rb +65 -0
  146. data/spec/models/job_template_update_parameters_spec.rb +41 -0
  147. data/spec/models/job_template_user_preview_spec.rb +47 -0
  148. data/spec/models/keys_exclude_parameters_spec.rb +47 -0
  149. data/spec/models/keys_include_parameters_spec.rb +47 -0
  150. data/spec/models/locale_preview1_spec.rb +47 -0
  151. data/spec/models/member_update_parameters_spec.rb +6 -0
  152. data/spec/models/notification_group_detail_spec.rb +59 -0
  153. data/spec/models/notification_group_spec.rb +47 -0
  154. data/spec/models/notification_spec.rb +101 -0
  155. data/spec/models/order_create_parameters_spec.rb +6 -0
  156. data/spec/models/project_create_parameters_spec.rb +102 -0
  157. data/spec/models/project_details_spec.rb +6 -0
  158. data/spec/models/project_spec.rb +6 -0
  159. data/spec/models/project_update_parameters_spec.rb +103 -1
  160. data/spec/models/screenshot_create_parameters_spec.rb +6 -0
  161. data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
  162. data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
  163. data/spec/models/screenshot_update_parameters_spec.rb +6 -0
  164. data/spec/models/search_in_account_parameters_spec.rb +47 -0
  165. data/spec/models/space1_spec.rb +53 -0
  166. data/spec/models/subscription_spec.rb +35 -0
  167. data/spec/models/translation_order_spec.rb +6 -0
  168. data/spec/models/user_spec.rb +0 -6
  169. data/spec/models/variable_create_parameters_spec.rb +35 -0
  170. data/spec/models/variable_spec.rb +47 -0
  171. data/spec/models/variable_update_parameters_spec.rb +35 -0
  172. metadata +281 -169
@@ -315,11 +315,11 @@ module Phrase
315
315
  # @param [Hash] opts the optional parameters
316
316
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
317
317
  # @option opts [String] :branch specify the branch to use
318
- # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
318
+ # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
319
319
  # @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
320
320
  # @return [AffectedResources]
321
- def keys_delete(project_id, opts = {})
322
- data, _status_code, _headers = keys_delete_with_http_info(project_id, opts)
321
+ def keys_delete_collection(project_id, opts = {})
322
+ data, _status_code, _headers = keys_delete_collection_with_http_info(project_id, opts)
323
323
  data
324
324
  end
325
325
 
@@ -329,16 +329,16 @@ module Phrase
329
329
  # @param [Hash] opts the optional parameters
330
330
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
331
331
  # @option opts [String] :branch specify the branch to use
332
- # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
332
+ # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
333
333
  # @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
334
334
  # @return [Array<(Response<(AffectedResources)>, Integer, Hash)>] Response<(AffectedResources)> data, response status code and response headers
335
- def keys_delete_with_http_info(project_id, opts = {})
335
+ def keys_delete_collection_with_http_info(project_id, opts = {})
336
336
  if @api_client.config.debugging
337
- @api_client.config.logger.debug 'Calling API: KeysApi.keys_delete ...'
337
+ @api_client.config.logger.debug 'Calling API: KeysApi.keys_delete_collection ...'
338
338
  end
339
339
  # verify the required parameter 'project_id' is set
340
340
  if @api_client.config.client_side_validation && project_id.nil?
341
- fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysApi.keys_delete"
341
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysApi.keys_delete_collection"
342
342
  end
343
343
  # resource path
344
344
  local_var_path = '/projects/{project_id}/keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
@@ -378,7 +378,155 @@ module Phrase
378
378
 
379
379
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
380
380
  if @api_client.config.debugging
381
- @api_client.config.logger.debug "API called: KeysApi#keys_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
381
+ @api_client.config.logger.debug "API called: KeysApi#keys_delete_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
382
+ end
383
+ response = ::Phrase::Response.new(data, headers)
384
+ return response, status_code, headers
385
+ end
386
+
387
+ # Exclude a locale on a collection of keys
388
+ # Exclude a locale on keys matching query. Same constraints as list.
389
+ # @param project_id [String] Project ID
390
+ # @param keys_exclude_parameters [KeysExcludeParameters]
391
+ # @param [Hash] opts the optional parameters
392
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
393
+ # @return [AffectedResources]
394
+ def keys_exclude(project_id, keys_exclude_parameters, opts = {})
395
+ data, _status_code, _headers = keys_exclude_with_http_info(project_id, keys_exclude_parameters, opts)
396
+ data
397
+ end
398
+
399
+ # Exclude a locale on a collection of keys
400
+ # Exclude a locale on keys matching query. Same constraints as list.
401
+ # @param project_id [String] Project ID
402
+ # @param keys_exclude_parameters [KeysExcludeParameters]
403
+ # @param [Hash] opts the optional parameters
404
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
405
+ # @return [Array<(Response<(AffectedResources)>, Integer, Hash)>] Response<(AffectedResources)> data, response status code and response headers
406
+ def keys_exclude_with_http_info(project_id, keys_exclude_parameters, opts = {})
407
+ if @api_client.config.debugging
408
+ @api_client.config.logger.debug 'Calling API: KeysApi.keys_exclude ...'
409
+ end
410
+ # verify the required parameter 'project_id' is set
411
+ if @api_client.config.client_side_validation && project_id.nil?
412
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysApi.keys_exclude"
413
+ end
414
+ # verify the required parameter 'keys_exclude_parameters' is set
415
+ if @api_client.config.client_side_validation && keys_exclude_parameters.nil?
416
+ fail ArgumentError, "Missing the required parameter 'keys_exclude_parameters' when calling KeysApi.keys_exclude"
417
+ end
418
+ # resource path
419
+ local_var_path = '/projects/{project_id}/keys/exclude'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
420
+
421
+ # query parameters
422
+ query_params = opts[:query_params] || {}
423
+
424
+ # header parameters
425
+ header_params = opts[:header_params] || {}
426
+ # HTTP header 'Accept' (if needed)
427
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
428
+ # HTTP header 'Content-Type'
429
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
430
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
431
+
432
+ # form parameters
433
+ form_params = opts[:form_params] || {}
434
+
435
+ # http body (model)
436
+ post_body = opts[:body] || @api_client.object_to_http_body(keys_exclude_parameters)
437
+
438
+ # return_type
439
+ return_type = opts[:return_type] || 'AffectedResources'
440
+
441
+ # auth_names
442
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
443
+
444
+ new_options = opts.merge(
445
+ :header_params => header_params,
446
+ :query_params => query_params,
447
+ :form_params => form_params,
448
+ :body => post_body,
449
+ :auth_names => auth_names,
450
+ :return_type => return_type
451
+ )
452
+
453
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
454
+ if @api_client.config.debugging
455
+ @api_client.config.logger.debug "API called: KeysApi#keys_exclude\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
456
+ end
457
+ response = ::Phrase::Response.new(data, headers)
458
+ return response, status_code, headers
459
+ end
460
+
461
+ # Include a locale on a collection of keys
462
+ # Include a locale on keys matching query. Same constraints as list.
463
+ # @param project_id [String] Project ID
464
+ # @param keys_include_parameters [KeysIncludeParameters]
465
+ # @param [Hash] opts the optional parameters
466
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
467
+ # @return [AffectedResources]
468
+ def keys_include(project_id, keys_include_parameters, opts = {})
469
+ data, _status_code, _headers = keys_include_with_http_info(project_id, keys_include_parameters, opts)
470
+ data
471
+ end
472
+
473
+ # Include a locale on a collection of keys
474
+ # Include a locale on keys matching query. Same constraints as list.
475
+ # @param project_id [String] Project ID
476
+ # @param keys_include_parameters [KeysIncludeParameters]
477
+ # @param [Hash] opts the optional parameters
478
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
479
+ # @return [Array<(Response<(AffectedResources)>, Integer, Hash)>] Response<(AffectedResources)> data, response status code and response headers
480
+ def keys_include_with_http_info(project_id, keys_include_parameters, opts = {})
481
+ if @api_client.config.debugging
482
+ @api_client.config.logger.debug 'Calling API: KeysApi.keys_include ...'
483
+ end
484
+ # verify the required parameter 'project_id' is set
485
+ if @api_client.config.client_side_validation && project_id.nil?
486
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysApi.keys_include"
487
+ end
488
+ # verify the required parameter 'keys_include_parameters' is set
489
+ if @api_client.config.client_side_validation && keys_include_parameters.nil?
490
+ fail ArgumentError, "Missing the required parameter 'keys_include_parameters' when calling KeysApi.keys_include"
491
+ end
492
+ # resource path
493
+ local_var_path = '/projects/{project_id}/keys/include'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
494
+
495
+ # query parameters
496
+ query_params = opts[:query_params] || {}
497
+
498
+ # header parameters
499
+ header_params = opts[:header_params] || {}
500
+ # HTTP header 'Accept' (if needed)
501
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
502
+ # HTTP header 'Content-Type'
503
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
504
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
505
+
506
+ # form parameters
507
+ form_params = opts[:form_params] || {}
508
+
509
+ # http body (model)
510
+ post_body = opts[:body] || @api_client.object_to_http_body(keys_include_parameters)
511
+
512
+ # return_type
513
+ return_type = opts[:return_type] || 'AffectedResources'
514
+
515
+ # auth_names
516
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
517
+
518
+ new_options = opts.merge(
519
+ :header_params => header_params,
520
+ :query_params => query_params,
521
+ :form_params => form_params,
522
+ :body => post_body,
523
+ :auth_names => auth_names,
524
+ :return_type => return_type
525
+ )
526
+
527
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
528
+ if @api_client.config.debugging
529
+ @api_client.config.logger.debug "API called: KeysApi#keys_include\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
382
530
  end
383
531
  response = ::Phrase::Response.new(data, headers)
384
532
  return response, status_code, headers
@@ -394,7 +542,7 @@ module Phrase
394
542
  # @option opts [String] :branch specify the branch to use
395
543
  # @option opts [String] :sort Sort by field. Can be one of: name, created_at, updated_at.
396
544
  # @option opts [String] :order Order direction. Can be one of: asc, desc.
397
- # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).&lt;br&gt;&lt;br&gt; The following qualifiers are also supported in the search term:&lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;code&gt;ids:key_id,...&lt;/code&gt; for queries on a comma-separated list of ids&lt;/li&gt; &lt;li&gt;&lt;code&gt;name:key_name&lt;/code&gt; for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\&quot;\\\\\\\&quot;)&lt;/li&gt; &lt;li&gt;&lt;code&gt;tags:tag_name&lt;/code&gt; to filter for keys with certain tags&lt;/li&gt; &lt;li&gt;&lt;code&gt;translated:{true|false}&lt;/code&gt; for translation status (also requires &lt;code&gt;locale_id&lt;/code&gt; to be specified)&lt;/li&gt; &lt;li&gt;&lt;code&gt;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&lt;/code&gt; for date range queries&lt;/li&gt; &lt;li&gt;&lt;code&gt;unmentioned_in_upload:upload_id&lt;/code&gt; to filter keys unmentioned within upload&lt;/li&gt; &lt;/ul&gt; Find more examples &lt;a href&#x3D;\&quot;#overview--usage-examples\&quot;&gt;here&lt;/a&gt;.
545
+ # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).&lt;br&gt;&lt;br&gt; The following qualifiers are also supported in the search term:&lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;code&gt;ids:key_id,...&lt;/code&gt; for queries on a comma-separated list of ids&lt;/li&gt; &lt;li&gt;&lt;code&gt;name:key_name&lt;/code&gt; for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes&lt;/li&gt; &lt;li&gt;&lt;code&gt;tags:tag_name&lt;/code&gt; to filter for keys with certain tags&lt;/li&gt; &lt;li&gt;&lt;code&gt;translated:{true|false}&lt;/code&gt; for translation status (also requires &lt;code&gt;locale_id&lt;/code&gt; to be specified)&lt;/li&gt; &lt;li&gt;&lt;code&gt;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&lt;/code&gt; for date range queries&lt;/li&gt; &lt;li&gt;&lt;code&gt;unmentioned_in_upload:upload_id&lt;/code&gt; to filter keys unmentioned within upload&lt;/li&gt; &lt;/ul&gt; Find more examples &lt;a href&#x3D;\&quot;#overview--usage-examples\&quot;&gt;here&lt;/a&gt;.
398
546
  # @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
399
547
  # @return [Array<TranslationKey>]
400
548
  def keys_list(project_id, opts = {})
@@ -412,7 +560,7 @@ module Phrase
412
560
  # @option opts [String] :branch specify the branch to use
413
561
  # @option opts [String] :sort Sort by field. Can be one of: name, created_at, updated_at.
414
562
  # @option opts [String] :order Order direction. Can be one of: asc, desc.
415
- # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).&lt;br&gt;&lt;br&gt; The following qualifiers are also supported in the search term:&lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;code&gt;ids:key_id,...&lt;/code&gt; for queries on a comma-separated list of ids&lt;/li&gt; &lt;li&gt;&lt;code&gt;name:key_name&lt;/code&gt; for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\&quot;\\\\\\\&quot;)&lt;/li&gt; &lt;li&gt;&lt;code&gt;tags:tag_name&lt;/code&gt; to filter for keys with certain tags&lt;/li&gt; &lt;li&gt;&lt;code&gt;translated:{true|false}&lt;/code&gt; for translation status (also requires &lt;code&gt;locale_id&lt;/code&gt; to be specified)&lt;/li&gt; &lt;li&gt;&lt;code&gt;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&lt;/code&gt; for date range queries&lt;/li&gt; &lt;li&gt;&lt;code&gt;unmentioned_in_upload:upload_id&lt;/code&gt; to filter keys unmentioned within upload&lt;/li&gt; &lt;/ul&gt; Find more examples &lt;a href&#x3D;\&quot;#overview--usage-examples\&quot;&gt;here&lt;/a&gt;.
563
+ # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).&lt;br&gt;&lt;br&gt; The following qualifiers are also supported in the search term:&lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;code&gt;ids:key_id,...&lt;/code&gt; for queries on a comma-separated list of ids&lt;/li&gt; &lt;li&gt;&lt;code&gt;name:key_name&lt;/code&gt; for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes&lt;/li&gt; &lt;li&gt;&lt;code&gt;tags:tag_name&lt;/code&gt; to filter for keys with certain tags&lt;/li&gt; &lt;li&gt;&lt;code&gt;translated:{true|false}&lt;/code&gt; for translation status (also requires &lt;code&gt;locale_id&lt;/code&gt; to be specified)&lt;/li&gt; &lt;li&gt;&lt;code&gt;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&lt;/code&gt; for date range queries&lt;/li&gt; &lt;li&gt;&lt;code&gt;unmentioned_in_upload:upload_id&lt;/code&gt; to filter keys unmentioned within upload&lt;/li&gt; &lt;/ul&gt; Find more examples &lt;a href&#x3D;\&quot;#overview--usage-examples\&quot;&gt;here&lt;/a&gt;.
416
564
  # @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
417
565
  # @return [Array<(Response<(Array<TranslationKey>)>, Integer, Hash)>] Response<(Array<TranslationKey>)> data, response status code and response headers
418
566
  def keys_list_with_http_info(project_id, opts = {})
@@ -7,6 +7,72 @@ module Phrase
7
7
  def initialize(api_client = ApiClient.default)
8
8
  @api_client = api_client
9
9
  end
10
+ # List locales used in account
11
+ # List all locales unique by locale code used across all projects within an account.
12
+ # @param [Hash] opts the optional parameters
13
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
14
+ # @option opts [Integer] :page Page number
15
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
16
+ # @return [Array<LocalePreview1>]
17
+ def account_locales(opts = {})
18
+ data, _status_code, _headers = account_locales_with_http_info(opts)
19
+ data
20
+ end
21
+
22
+ # List locales used in account
23
+ # List all locales unique by locale code used across all projects within an account.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
26
+ # @option opts [Integer] :page Page number
27
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
28
+ # @return [Array<(Response<(Array<LocalePreview1>)>, Integer, Hash)>] Response<(Array<LocalePreview1>)> data, response status code and response headers
29
+ def account_locales_with_http_info(opts = {})
30
+ if @api_client.config.debugging
31
+ @api_client.config.logger.debug 'Calling API: LocalesApi.account_locales ...'
32
+ end
33
+ # resource path
34
+ local_var_path = '/accounts/{account_id}/locales'
35
+
36
+ # query parameters
37
+ query_params = opts[:query_params] || {}
38
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
39
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
40
+
41
+ # header parameters
42
+ header_params = opts[:header_params] || {}
43
+ # HTTP header 'Accept' (if needed)
44
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
45
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
46
+
47
+ # form parameters
48
+ form_params = opts[:form_params] || {}
49
+
50
+ # http body (model)
51
+ post_body = opts[:body]
52
+
53
+ # return_type
54
+ return_type = opts[:return_type] || 'Array<LocalePreview1>'
55
+
56
+ # auth_names
57
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
58
+
59
+ new_options = opts.merge(
60
+ :header_params => header_params,
61
+ :query_params => query_params,
62
+ :form_params => form_params,
63
+ :body => post_body,
64
+ :auth_names => auth_names,
65
+ :return_type => return_type
66
+ )
67
+
68
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
69
+ if @api_client.config.debugging
70
+ @api_client.config.logger.debug "API called: LocalesApi#account_locales\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
71
+ end
72
+ response = ::Phrase::Response.new(data, headers)
73
+ return response, status_code, headers
74
+ end
75
+
10
76
  # Create a locale
11
77
  # Create a new locale.
12
78
  # @param project_id [String] Project ID
@@ -161,7 +227,7 @@ module Phrase
161
227
  # @param [Hash] opts the optional parameters
162
228
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
163
229
  # @option opts [String] :branch specify the branch to use
164
- # @option opts [String] :file_format File format name. See the format guide for all supported file formats.
230
+ # @option opts [String] :file_format File format name. See the &lt;a href&#x3D;\&quot;https://help.phrase.com/help/supported-platforms-and-formats\&quot;&gt;format guide&lt;/a&gt; for all supported file formats.
165
231
  # @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
166
232
  # @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \&quot;tags\&quot; parameter instead
167
233
  # @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
@@ -175,7 +241,7 @@ module Phrase
175
241
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
176
242
  # @option opts [Boolean] :use_last_reviewed_version If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project.
177
243
  # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;.
178
- # @return [nil]
244
+ # @return [File]
179
245
  def locale_download(project_id, id, opts = {})
180
246
  data, _status_code, _headers = locale_download_with_http_info(project_id, id, opts)
181
247
  data
@@ -188,7 +254,7 @@ module Phrase
188
254
  # @param [Hash] opts the optional parameters
189
255
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
190
256
  # @option opts [String] :branch specify the branch to use
191
- # @option opts [String] :file_format File format name. See the format guide for all supported file formats.
257
+ # @option opts [String] :file_format File format name. See the &lt;a href&#x3D;\&quot;https://help.phrase.com/help/supported-platforms-and-formats\&quot;&gt;format guide&lt;/a&gt; for all supported file formats.
192
258
  # @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
193
259
  # @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \&quot;tags\&quot; parameter instead
194
260
  # @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
@@ -202,7 +268,7 @@ module Phrase
202
268
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
203
269
  # @option opts [Boolean] :use_last_reviewed_version If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project.
204
270
  # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;.
205
- # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
271
+ # @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers
206
272
  def locale_download_with_http_info(project_id, id, opts = {})
207
273
  if @api_client.config.debugging
208
274
  @api_client.config.logger.debug 'Calling API: LocalesApi.locale_download ...'
@@ -238,6 +304,8 @@ module Phrase
238
304
 
239
305
  # header parameters
240
306
  header_params = opts[:header_params] || {}
307
+ # HTTP header 'Accept' (if needed)
308
+ header_params['Accept'] = @api_client.select_header_accept(['*'])
241
309
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
242
310
 
243
311
  # form parameters
@@ -247,7 +315,7 @@ module Phrase
247
315
  post_body = opts[:body]
248
316
 
249
317
  # return_type
250
- return_type = opts[:return_type]
318
+ return_type = opts[:return_type] || 'File'
251
319
 
252
320
  # auth_names
253
321
  auth_names = opts[:auth_names] || ['Basic', 'Token']
@@ -431,6 +499,7 @@ module Phrase
431
499
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
432
500
  # @option opts [Integer] :page Page number
433
501
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
502
+ # @option opts [String] :sort_by Sort locales. Valid options are \&quot;name_asc\&quot;, \&quot;name_desc\&quot;, \&quot;default_asc\&quot;, \&quot;default_desc\&quot;.
434
503
  # @option opts [String] :branch specify the branch to use
435
504
  # @return [Array<Locale>]
436
505
  def locales_list(project_id, opts = {})
@@ -445,6 +514,7 @@ module Phrase
445
514
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
446
515
  # @option opts [Integer] :page Page number
447
516
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
517
+ # @option opts [String] :sort_by Sort locales. Valid options are \&quot;name_asc\&quot;, \&quot;name_desc\&quot;, \&quot;default_asc\&quot;, \&quot;default_desc\&quot;.
448
518
  # @option opts [String] :branch specify the branch to use
449
519
  # @return [Array<(Response<(Array<Locale>)>, Integer, Hash)>] Response<(Array<Locale>)> data, response status code and response headers
450
520
  def locales_list_with_http_info(project_id, opts = {})
@@ -462,6 +532,7 @@ module Phrase
462
532
  query_params = opts[:query_params] || {}
463
533
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
464
534
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
535
+ query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
465
536
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
466
537
 
467
538
  # header parameters
@@ -0,0 +1,202 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class NotificationGroupsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # List notification groups
11
+ # List all notification groups from the current user
12
+ # @param [Hash] opts the optional parameters
13
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
14
+ # @option opts [Integer] :page Page number
15
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
16
+ # @return [Array<Object>]
17
+ def notification_groups_list(opts = {})
18
+ data, _status_code, _headers = notification_groups_list_with_http_info(opts)
19
+ data
20
+ end
21
+
22
+ # List notification groups
23
+ # List all notification groups from the current user
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
26
+ # @option opts [Integer] :page Page number
27
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
28
+ # @return [Array<(Response<(Array<Object>)>, Integer, Hash)>] Response<(Array<Object>)> data, response status code and response headers
29
+ def notification_groups_list_with_http_info(opts = {})
30
+ if @api_client.config.debugging
31
+ @api_client.config.logger.debug 'Calling API: NotificationGroupsApi.notification_groups_list ...'
32
+ end
33
+ # resource path
34
+ local_var_path = '/notification_groups'
35
+
36
+ # query parameters
37
+ query_params = opts[:query_params] || {}
38
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
39
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
40
+
41
+ # header parameters
42
+ header_params = opts[:header_params] || {}
43
+ # HTTP header 'Accept' (if needed)
44
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
45
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
46
+
47
+ # form parameters
48
+ form_params = opts[:form_params] || {}
49
+
50
+ # http body (model)
51
+ post_body = opts[:body]
52
+
53
+ # return_type
54
+ return_type = opts[:return_type] || 'Array<Object>'
55
+
56
+ # auth_names
57
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
58
+
59
+ new_options = opts.merge(
60
+ :header_params => header_params,
61
+ :query_params => query_params,
62
+ :form_params => form_params,
63
+ :body => post_body,
64
+ :auth_names => auth_names,
65
+ :return_type => return_type
66
+ )
67
+
68
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
69
+ if @api_client.config.debugging
70
+ @api_client.config.logger.debug "API called: NotificationGroupsApi#notification_groups_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
71
+ end
72
+ response = ::Phrase::Response.new(data, headers)
73
+ return response, status_code, headers
74
+ end
75
+
76
+ # Mark all notification groups as read
77
+ # Mark all notification groups of the current user as read
78
+ # @param [Hash] opts the optional parameters
79
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
80
+ # @return [Array<Object>]
81
+ def notification_groups_mark_all_as_read(opts = {})
82
+ data, _status_code, _headers = notification_groups_mark_all_as_read_with_http_info(opts)
83
+ data
84
+ end
85
+
86
+ # Mark all notification groups as read
87
+ # Mark all notification groups of the current user as read
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
90
+ # @return [Array<(Response<(Array<Object>)>, Integer, Hash)>] Response<(Array<Object>)> data, response status code and response headers
91
+ def notification_groups_mark_all_as_read_with_http_info(opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: NotificationGroupsApi.notification_groups_mark_all_as_read ...'
94
+ end
95
+ # resource path
96
+ local_var_path = '/notification_groups/mark_all_as_read'
97
+
98
+ # query parameters
99
+ query_params = opts[:query_params] || {}
100
+
101
+ # header parameters
102
+ header_params = opts[:header_params] || {}
103
+ # HTTP header 'Accept' (if needed)
104
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
105
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
106
+
107
+ # form parameters
108
+ form_params = opts[:form_params] || {}
109
+
110
+ # http body (model)
111
+ post_body = opts[:body]
112
+
113
+ # return_type
114
+ return_type = opts[:return_type] || 'Array<Object>'
115
+
116
+ # auth_names
117
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
118
+
119
+ new_options = opts.merge(
120
+ :header_params => header_params,
121
+ :query_params => query_params,
122
+ :form_params => form_params,
123
+ :body => post_body,
124
+ :auth_names => auth_names,
125
+ :return_type => return_type
126
+ )
127
+
128
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug "API called: NotificationGroupsApi#notification_groups_mark_all_as_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
131
+ end
132
+ response = ::Phrase::Response.new(data, headers)
133
+ return response, status_code, headers
134
+ end
135
+
136
+ # Mark a notification group as read
137
+ # Mark a notifications group of the current user as read
138
+ # @param id [String] ID
139
+ # @param [Hash] opts the optional parameters
140
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
141
+ # @return [NotificationGroupDetail]
142
+ def notification_groups_mark_as_read(id, opts = {})
143
+ data, _status_code, _headers = notification_groups_mark_as_read_with_http_info(id, opts)
144
+ data
145
+ end
146
+
147
+ # Mark a notification group as read
148
+ # Mark a notifications group of the current user as read
149
+ # @param id [String] ID
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
152
+ # @return [Array<(Response<(NotificationGroupDetail)>, Integer, Hash)>] Response<(NotificationGroupDetail)> data, response status code and response headers
153
+ def notification_groups_mark_as_read_with_http_info(id, opts = {})
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug 'Calling API: NotificationGroupsApi.notification_groups_mark_as_read ...'
156
+ end
157
+ # verify the required parameter 'id' is set
158
+ if @api_client.config.client_side_validation && id.nil?
159
+ fail ArgumentError, "Missing the required parameter 'id' when calling NotificationGroupsApi.notification_groups_mark_as_read"
160
+ end
161
+ # resource path
162
+ local_var_path = '/notification_groups/{id}/mark_as_read'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
163
+
164
+ # query parameters
165
+ query_params = opts[:query_params] || {}
166
+
167
+ # header parameters
168
+ header_params = opts[:header_params] || {}
169
+ # HTTP header 'Accept' (if needed)
170
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
171
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
172
+
173
+ # form parameters
174
+ form_params = opts[:form_params] || {}
175
+
176
+ # http body (model)
177
+ post_body = opts[:body]
178
+
179
+ # return_type
180
+ return_type = opts[:return_type] || 'NotificationGroupDetail'
181
+
182
+ # auth_names
183
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
184
+
185
+ new_options = opts.merge(
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => return_type
192
+ )
193
+
194
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: NotificationGroupsApi#notification_groups_mark_as_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ response = ::Phrase::Response.new(data, headers)
199
+ return response, status_code, headers
200
+ end
201
+ end
202
+ end