phrase 1.0.10 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -9
  3. data/docs/CurrentUser.md +31 -0
  4. data/docs/Invitation.md +9 -1
  5. data/docs/InvitationCreateParameters.md +4 -0
  6. data/docs/InvitationUpdateParameters.md +4 -0
  7. data/docs/InvitationUpdateSettingsParameters.md +19 -0
  8. data/docs/InvitationsApi.md +66 -0
  9. data/docs/JobLocale.md +5 -1
  10. data/docs/KeysApi.md +5 -5
  11. data/docs/LocalesApi.md +5 -4
  12. data/docs/Member.md +7 -1
  13. data/docs/MemberProjectDetail.md +35 -0
  14. data/docs/MemberProjectDetailProjectRoles.md +19 -0
  15. data/docs/MemberSpaces.md +25 -0
  16. data/docs/MemberUpdateParameters.md +4 -0
  17. data/docs/MemberUpdateSettingsParameters.md +19 -0
  18. data/docs/MembersApi.md +66 -0
  19. data/docs/ProjectUpdateParameters.md +43 -9
  20. data/docs/ScreenshotCreateParameters.md +3 -1
  21. data/docs/ScreenshotMarkerCreateParameters.md +3 -1
  22. data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
  23. data/docs/ScreenshotMarkersApi.md +9 -3
  24. data/docs/ScreenshotUpdateParameters.md +3 -1
  25. data/docs/ScreenshotsApi.md +8 -2
  26. data/docs/TranslationsApi.md +25 -25
  27. data/docs/UsersApi.md +2 -2
  28. data/docs/Variable.md +23 -0
  29. data/docs/VariableCreateParameters.md +19 -0
  30. data/docs/VariableUpdateParameters.md +19 -0
  31. data/docs/VariablesApi.md +331 -0
  32. data/lib/phrase.rb +10 -0
  33. data/lib/phrase/api/invitations_api.rb +80 -0
  34. data/lib/phrase/api/keys_api.rb +6 -6
  35. data/lib/phrase/api/locales_api.rb +5 -3
  36. data/lib/phrase/api/members_api.rb +80 -0
  37. data/lib/phrase/api/screenshot_markers_api.rb +9 -0
  38. data/lib/phrase/api/screenshots_api.rb +9 -0
  39. data/lib/phrase/api/translations_api.rb +35 -35
  40. data/lib/phrase/api/users_api.rb +3 -3
  41. data/lib/phrase/api/variables_api.rb +378 -0
  42. data/lib/phrase/models/current_user.rb +257 -0
  43. data/lib/phrase/models/invitation.rb +48 -4
  44. data/lib/phrase/models/invitation_create_parameters.rb +25 -1
  45. data/lib/phrase/models/invitation_update_parameters.rb +25 -1
  46. data/lib/phrase/models/invitation_update_settings_parameters.rb +207 -0
  47. data/lib/phrase/models/job_locale.rb +22 -4
  48. data/lib/phrase/models/member.rb +35 -4
  49. data/lib/phrase/models/member_project_detail.rb +285 -0
  50. data/lib/phrase/models/member_project_detail_project_roles.rb +203 -0
  51. data/lib/phrase/models/member_spaces.rb +230 -0
  52. data/lib/phrase/models/member_update_parameters.rb +25 -1
  53. data/lib/phrase/models/member_update_settings_parameters.rb +207 -0
  54. data/lib/phrase/models/project_update_parameters.rb +183 -13
  55. data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
  56. data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
  57. data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
  58. data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
  59. data/lib/phrase/models/variable.rb +221 -0
  60. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  61. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  62. data/lib/phrase/version.rb +1 -1
  63. data/spec/api/invitations_api_spec.rb +15 -0
  64. data/spec/api/keys_api_spec.rb +2 -2
  65. data/spec/api/locales_api_spec.rb +1 -1
  66. data/spec/api/members_api_spec.rb +15 -0
  67. data/spec/api/screenshot_markers_api_spec.rb +3 -0
  68. data/spec/api/screenshots_api_spec.rb +3 -0
  69. data/spec/api/translations_api_spec.rb +10 -10
  70. data/spec/api/users_api_spec.rb +1 -1
  71. data/spec/api/variables_api_spec.rb +95 -0
  72. data/spec/models/current_user_spec.rb +71 -0
  73. data/spec/models/invitation_create_parameters_spec.rb +12 -0
  74. data/spec/models/invitation_spec.rb +24 -0
  75. data/spec/models/invitation_update_parameters_spec.rb +12 -0
  76. data/spec/models/invitation_update_settings_parameters_spec.rb +35 -0
  77. data/spec/models/job_locale_spec.rb +12 -0
  78. data/spec/models/member_project_detail_project_roles_spec.rb +35 -0
  79. data/spec/models/member_project_detail_spec.rb +83 -0
  80. data/spec/models/member_spaces_spec.rb +53 -0
  81. data/spec/models/member_spec.rb +18 -0
  82. data/spec/models/member_update_parameters_spec.rb +12 -0
  83. data/spec/models/member_update_settings_parameters_spec.rb +35 -0
  84. data/spec/models/project_update_parameters_spec.rb +103 -1
  85. data/spec/models/screenshot_create_parameters_spec.rb +6 -0
  86. data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
  87. data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
  88. data/spec/models/screenshot_update_parameters_spec.rb +6 -0
  89. data/spec/models/variable_create_parameters_spec.rb +35 -0
  90. data/spec/models/variable_spec.rb +47 -0
  91. data/spec/models/variable_update_parameters_spec.rb +35 -0
  92. metadata +203 -163
@@ -375,6 +375,86 @@ module Phrase
375
375
  return response, status_code, headers
376
376
  end
377
377
 
378
+ # Update a member's invitation access
379
+ # Update member's settings in the invitations. Access token scope must include <code>team.manage</code>.
380
+ # @param project_id [String] Project ID
381
+ # @param id [String] ID
382
+ # @param invitation_update_settings_parameters [InvitationUpdateSettingsParameters]
383
+ # @param [Hash] opts the optional parameters
384
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
385
+ # @return [Invitation]
386
+ def invitation_update_settings(project_id, id, invitation_update_settings_parameters, opts = {})
387
+ data, _status_code, _headers = invitation_update_settings_with_http_info(project_id, id, invitation_update_settings_parameters, opts)
388
+ data
389
+ end
390
+
391
+ # Update a member&#39;s invitation access
392
+ # Update member&#39;s settings in the invitations. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
393
+ # @param project_id [String] Project ID
394
+ # @param id [String] ID
395
+ # @param invitation_update_settings_parameters [InvitationUpdateSettingsParameters]
396
+ # @param [Hash] opts the optional parameters
397
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
398
+ # @return [Array<(Response<(Invitation)>, Integer, Hash)>] Response<(Invitation)> data, response status code and response headers
399
+ def invitation_update_settings_with_http_info(project_id, id, invitation_update_settings_parameters, opts = {})
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_update_settings ...'
402
+ end
403
+ # verify the required parameter 'project_id' is set
404
+ if @api_client.config.client_side_validation && project_id.nil?
405
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling InvitationsApi.invitation_update_settings"
406
+ end
407
+ # verify the required parameter 'id' is set
408
+ if @api_client.config.client_side_validation && id.nil?
409
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvitationsApi.invitation_update_settings"
410
+ end
411
+ # verify the required parameter 'invitation_update_settings_parameters' is set
412
+ if @api_client.config.client_side_validation && invitation_update_settings_parameters.nil?
413
+ fail ArgumentError, "Missing the required parameter 'invitation_update_settings_parameters' when calling InvitationsApi.invitation_update_settings"
414
+ end
415
+ # resource path
416
+ local_var_path = '/projects/{project_id}/invitations/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
417
+
418
+ # query parameters
419
+ query_params = opts[:query_params] || {}
420
+
421
+ # header parameters
422
+ header_params = opts[:header_params] || {}
423
+ # HTTP header 'Accept' (if needed)
424
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
425
+ # HTTP header 'Content-Type'
426
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
427
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
428
+
429
+ # form parameters
430
+ form_params = opts[:form_params] || {}
431
+
432
+ # http body (model)
433
+ post_body = opts[:body] || @api_client.object_to_http_body(invitation_update_settings_parameters)
434
+
435
+ # return_type
436
+ return_type = opts[:return_type] || 'Invitation'
437
+
438
+ # auth_names
439
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
440
+
441
+ new_options = opts.merge(
442
+ :header_params => header_params,
443
+ :query_params => query_params,
444
+ :form_params => form_params,
445
+ :body => post_body,
446
+ :auth_names => auth_names,
447
+ :return_type => return_type
448
+ )
449
+
450
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug "API called: InvitationsApi#invitation_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
453
+ end
454
+ response = ::Phrase::Response.new(data, headers)
455
+ return response, status_code, headers
456
+ end
457
+
378
458
  # List invitations
379
459
  # List invitations for an account. It will also list the accessible resources like projects and locales the invited user has access to. In case nothing is shown the default access from the role is used. Access token scope must include <code>team.manage</code>.
380
460
  # @param account_id [String] Account ID
@@ -318,8 +318,8 @@ module Phrase
318
318
  # @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;.
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
 
@@ -332,13 +332,13 @@ module Phrase
332
332
  # @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;.
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,7 @@ 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
382
  end
383
383
  response = ::Phrase::Response.new(data, headers)
384
384
  return response, status_code, headers
@@ -175,7 +175,7 @@ module Phrase
175
175
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
176
176
  # @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
177
  # @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]
178
+ # @return [File]
179
179
  def locale_download(project_id, id, opts = {})
180
180
  data, _status_code, _headers = locale_download_with_http_info(project_id, id, opts)
181
181
  data
@@ -202,7 +202,7 @@ module Phrase
202
202
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
203
203
  # @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
204
  # @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
205
+ # @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers
206
206
  def locale_download_with_http_info(project_id, id, opts = {})
207
207
  if @api_client.config.debugging
208
208
  @api_client.config.logger.debug 'Calling API: LocalesApi.locale_download ...'
@@ -238,6 +238,8 @@ module Phrase
238
238
 
239
239
  # header parameters
240
240
  header_params = opts[:header_params] || {}
241
+ # HTTP header 'Accept' (if needed)
242
+ header_params['Accept'] = @api_client.select_header_accept(['*'])
241
243
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
242
244
 
243
245
  # form parameters
@@ -247,7 +249,7 @@ module Phrase
247
249
  post_body = opts[:body]
248
250
 
249
251
  # return_type
250
- return_type = opts[:return_type]
252
+ return_type = opts[:return_type] || 'File'
251
253
 
252
254
  # auth_names
253
255
  auth_names = opts[:auth_names] || ['Basic', 'Token']
@@ -229,6 +229,86 @@ module Phrase
229
229
  return response, status_code, headers
230
230
  end
231
231
 
232
+ # Update a member's project settings
233
+ # Update user settings in the project. Access token scope must include <code>team.manage</code>.
234
+ # @param project_id [String] Project ID
235
+ # @param id [String] ID
236
+ # @param member_update_settings_parameters [MemberUpdateSettingsParameters]
237
+ # @param [Hash] opts the optional parameters
238
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
239
+ # @return [MemberProjectDetail]
240
+ def member_update_settings(project_id, id, member_update_settings_parameters, opts = {})
241
+ data, _status_code, _headers = member_update_settings_with_http_info(project_id, id, member_update_settings_parameters, opts)
242
+ data
243
+ end
244
+
245
+ # Update a member&#39;s project settings
246
+ # Update user settings in the project. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
247
+ # @param project_id [String] Project ID
248
+ # @param id [String] ID
249
+ # @param member_update_settings_parameters [MemberUpdateSettingsParameters]
250
+ # @param [Hash] opts the optional parameters
251
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
252
+ # @return [Array<(Response<(MemberProjectDetail)>, Integer, Hash)>] Response<(MemberProjectDetail)> data, response status code and response headers
253
+ def member_update_settings_with_http_info(project_id, id, member_update_settings_parameters, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: MembersApi.member_update_settings ...'
256
+ end
257
+ # verify the required parameter 'project_id' is set
258
+ if @api_client.config.client_side_validation && project_id.nil?
259
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling MembersApi.member_update_settings"
260
+ end
261
+ # verify the required parameter 'id' is set
262
+ if @api_client.config.client_side_validation && id.nil?
263
+ fail ArgumentError, "Missing the required parameter 'id' when calling MembersApi.member_update_settings"
264
+ end
265
+ # verify the required parameter 'member_update_settings_parameters' is set
266
+ if @api_client.config.client_side_validation && member_update_settings_parameters.nil?
267
+ fail ArgumentError, "Missing the required parameter 'member_update_settings_parameters' when calling MembersApi.member_update_settings"
268
+ end
269
+ # resource path
270
+ local_var_path = '/projects/{project_id}/members/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
271
+
272
+ # query parameters
273
+ query_params = opts[:query_params] || {}
274
+
275
+ # header parameters
276
+ header_params = opts[:header_params] || {}
277
+ # HTTP header 'Accept' (if needed)
278
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
279
+ # HTTP header 'Content-Type'
280
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
281
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
282
+
283
+ # form parameters
284
+ form_params = opts[:form_params] || {}
285
+
286
+ # http body (model)
287
+ post_body = opts[:body] || @api_client.object_to_http_body(member_update_settings_parameters)
288
+
289
+ # return_type
290
+ return_type = opts[:return_type] || 'MemberProjectDetail'
291
+
292
+ # auth_names
293
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
294
+
295
+ new_options = opts.merge(
296
+ :header_params => header_params,
297
+ :query_params => query_params,
298
+ :form_params => form_params,
299
+ :body => post_body,
300
+ :auth_names => auth_names,
301
+ :return_type => return_type
302
+ )
303
+
304
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
305
+ if @api_client.config.debugging
306
+ @api_client.config.logger.debug "API called: MembersApi#member_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
307
+ end
308
+ response = ::Phrase::Response.new(data, headers)
309
+ return response, status_code, headers
310
+ end
311
+
232
312
  # List members
233
313
  # Get all users active in the account. It also lists resources like projects and locales the member has access to. In case nothing is shown the default access from the role is used. Access token scope must include <code>team.manage</code>.
234
314
  # @param account_id [String] Account ID
@@ -93,6 +93,7 @@ module Phrase
93
93
  # @param screenshot_id [String] Screenshot ID
94
94
  # @param [Hash] opts the optional parameters
95
95
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
96
+ # @option opts [String] :branch specify the branch to use
96
97
  # @return [nil]
97
98
  def screenshot_marker_delete(project_id, screenshot_id, opts = {})
98
99
  data, _status_code, _headers = screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts)
@@ -105,6 +106,7 @@ module Phrase
105
106
  # @param screenshot_id [String] Screenshot ID
106
107
  # @param [Hash] opts the optional parameters
107
108
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
109
+ # @option opts [String] :branch specify the branch to use
108
110
  # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
109
111
  def screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts = {})
110
112
  if @api_client.config.debugging
@@ -123,6 +125,7 @@ module Phrase
123
125
 
124
126
  # query parameters
125
127
  query_params = opts[:query_params] || {}
128
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
126
129
 
127
130
  # header parameters
128
131
  header_params = opts[:header_params] || {}
@@ -164,6 +167,7 @@ module Phrase
164
167
  # @param id [String] ID
165
168
  # @param [Hash] opts the optional parameters
166
169
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
170
+ # @option opts [String] :branch specify the branch to use
167
171
  # @return [ScreenshotMarker]
168
172
  def screenshot_marker_show(project_id, screenshot_id, id, opts = {})
169
173
  data, _status_code, _headers = screenshot_marker_show_with_http_info(project_id, screenshot_id, id, opts)
@@ -177,6 +181,7 @@ module Phrase
177
181
  # @param id [String] ID
178
182
  # @param [Hash] opts the optional parameters
179
183
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
184
+ # @option opts [String] :branch specify the branch to use
180
185
  # @return [Array<(Response<(ScreenshotMarker)>, Integer, Hash)>] Response<(ScreenshotMarker)> data, response status code and response headers
181
186
  def screenshot_marker_show_with_http_info(project_id, screenshot_id, id, opts = {})
182
187
  if @api_client.config.debugging
@@ -199,6 +204,7 @@ module Phrase
199
204
 
200
205
  # query parameters
201
206
  query_params = opts[:query_params] || {}
207
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
202
208
 
203
209
  # header parameters
204
210
  header_params = opts[:header_params] || {}
@@ -323,6 +329,7 @@ module Phrase
323
329
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
324
330
  # @option opts [Integer] :page Page number
325
331
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
332
+ # @option opts [String] :branch specify the branch to use
326
333
  # @return [Array<ScreenshotMarker>]
327
334
  def screenshot_markers_list(project_id, id, opts = {})
328
335
  data, _status_code, _headers = screenshot_markers_list_with_http_info(project_id, id, opts)
@@ -337,6 +344,7 @@ module Phrase
337
344
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
338
345
  # @option opts [Integer] :page Page number
339
346
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
347
+ # @option opts [String] :branch specify the branch to use
340
348
  # @return [Array<(Response<(Array<ScreenshotMarker>)>, Integer, Hash)>] Response<(Array<ScreenshotMarker>)> data, response status code and response headers
341
349
  def screenshot_markers_list_with_http_info(project_id, id, opts = {})
342
350
  if @api_client.config.debugging
@@ -357,6 +365,7 @@ module Phrase
357
365
  query_params = opts[:query_params] || {}
358
366
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
359
367
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
368
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
360
369
 
361
370
  # header parameters
362
371
  header_params = opts[:header_params] || {}
@@ -87,6 +87,7 @@ module Phrase
87
87
  # @param id [String] ID
88
88
  # @param [Hash] opts the optional parameters
89
89
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
90
+ # @option opts [String] :branch specify the branch to use
90
91
  # @return [nil]
91
92
  def screenshot_delete(project_id, id, opts = {})
92
93
  data, _status_code, _headers = screenshot_delete_with_http_info(project_id, id, opts)
@@ -99,6 +100,7 @@ module Phrase
99
100
  # @param id [String] ID
100
101
  # @param [Hash] opts the optional parameters
101
102
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
103
+ # @option opts [String] :branch specify the branch to use
102
104
  # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
103
105
  def screenshot_delete_with_http_info(project_id, id, opts = {})
104
106
  if @api_client.config.debugging
@@ -117,6 +119,7 @@ module Phrase
117
119
 
118
120
  # query parameters
119
121
  query_params = opts[:query_params] || {}
122
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
120
123
 
121
124
  # header parameters
122
125
  header_params = opts[:header_params] || {}
@@ -157,6 +160,7 @@ module Phrase
157
160
  # @param id [String] ID
158
161
  # @param [Hash] opts the optional parameters
159
162
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
163
+ # @option opts [String] :branch specify the branch to use
160
164
  # @return [Screenshot]
161
165
  def screenshot_show(project_id, id, opts = {})
162
166
  data, _status_code, _headers = screenshot_show_with_http_info(project_id, id, opts)
@@ -169,6 +173,7 @@ module Phrase
169
173
  # @param id [String] ID
170
174
  # @param [Hash] opts the optional parameters
171
175
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
176
+ # @option opts [String] :branch specify the branch to use
172
177
  # @return [Array<(Response<(Screenshot)>, Integer, Hash)>] Response<(Screenshot)> data, response status code and response headers
173
178
  def screenshot_show_with_http_info(project_id, id, opts = {})
174
179
  if @api_client.config.debugging
@@ -187,6 +192,7 @@ module Phrase
187
192
 
188
193
  # query parameters
189
194
  query_params = opts[:query_params] || {}
195
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
190
196
 
191
197
  # header parameters
192
198
  header_params = opts[:header_params] || {}
@@ -310,6 +316,7 @@ module Phrase
310
316
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
311
317
  # @option opts [Integer] :page Page number
312
318
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
319
+ # @option opts [String] :branch specify the branch to use
313
320
  # @option opts [String] :key_id filter by key
314
321
  # @return [Array<Screenshot>]
315
322
  def screenshots_list(project_id, opts = {})
@@ -324,6 +331,7 @@ module Phrase
324
331
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
325
332
  # @option opts [Integer] :page Page number
326
333
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
334
+ # @option opts [String] :branch specify the branch to use
327
335
  # @option opts [String] :key_id filter by key
328
336
  # @return [Array<(Response<(Array<Screenshot>)>, Integer, Hash)>] Response<(Array<Screenshot>)> data, response status code and response headers
329
337
  def screenshots_list_with_http_info(project_id, opts = {})
@@ -341,6 +349,7 @@ module Phrase
341
349
  query_params = opts[:query_params] || {}
342
350
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
343
351
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
352
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
344
353
  query_params[:'key_id'] = opts[:'key_id'] if !opts[:'key_id'].nil?
345
354
 
346
355
  # header parameters
@@ -823,8 +823,8 @@ module Phrase
823
823
  # @param [Hash] opts the optional parameters
824
824
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
825
825
  # @return [AffectedCount]
826
- def translations_exclude(project_id, translations_exclude_parameters, opts = {})
827
- data, _status_code, _headers = translations_exclude_with_http_info(project_id, translations_exclude_parameters, opts)
826
+ def translations_exclude_collection(project_id, translations_exclude_parameters, opts = {})
827
+ data, _status_code, _headers = translations_exclude_collection_with_http_info(project_id, translations_exclude_parameters, opts)
828
828
  data
829
829
  end
830
830
 
@@ -835,17 +835,17 @@ module Phrase
835
835
  # @param [Hash] opts the optional parameters
836
836
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
837
837
  # @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
838
- def translations_exclude_with_http_info(project_id, translations_exclude_parameters, opts = {})
838
+ def translations_exclude_collection_with_http_info(project_id, translations_exclude_parameters, opts = {})
839
839
  if @api_client.config.debugging
840
- @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_exclude ...'
840
+ @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_exclude_collection ...'
841
841
  end
842
842
  # verify the required parameter 'project_id' is set
843
843
  if @api_client.config.client_side_validation && project_id.nil?
844
- fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_exclude"
844
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_exclude_collection"
845
845
  end
846
846
  # verify the required parameter 'translations_exclude_parameters' is set
847
847
  if @api_client.config.client_side_validation && translations_exclude_parameters.nil?
848
- fail ArgumentError, "Missing the required parameter 'translations_exclude_parameters' when calling TranslationsApi.translations_exclude"
848
+ fail ArgumentError, "Missing the required parameter 'translations_exclude_parameters' when calling TranslationsApi.translations_exclude_collection"
849
849
  end
850
850
  # resource path
851
851
  local_var_path = '/projects/{project_id}/translations/exclude'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
@@ -884,7 +884,7 @@ module Phrase
884
884
 
885
885
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
886
886
  if @api_client.config.debugging
887
- @api_client.config.logger.debug "API called: TranslationsApi#translations_exclude\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
887
+ @api_client.config.logger.debug "API called: TranslationsApi#translations_exclude_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
888
888
  end
889
889
  response = ::Phrase::Response.new(data, headers)
890
890
  return response, status_code, headers
@@ -897,8 +897,8 @@ module Phrase
897
897
  # @param [Hash] opts the optional parameters
898
898
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
899
899
  # @return [AffectedCount]
900
- def translations_include(project_id, translations_include_parameters, opts = {})
901
- data, _status_code, _headers = translations_include_with_http_info(project_id, translations_include_parameters, opts)
900
+ def translations_include_collection(project_id, translations_include_parameters, opts = {})
901
+ data, _status_code, _headers = translations_include_collection_with_http_info(project_id, translations_include_parameters, opts)
902
902
  data
903
903
  end
904
904
 
@@ -909,17 +909,17 @@ module Phrase
909
909
  # @param [Hash] opts the optional parameters
910
910
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
911
911
  # @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
912
- def translations_include_with_http_info(project_id, translations_include_parameters, opts = {})
912
+ def translations_include_collection_with_http_info(project_id, translations_include_parameters, opts = {})
913
913
  if @api_client.config.debugging
914
- @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_include ...'
914
+ @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_include_collection ...'
915
915
  end
916
916
  # verify the required parameter 'project_id' is set
917
917
  if @api_client.config.client_side_validation && project_id.nil?
918
- fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_include"
918
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_include_collection"
919
919
  end
920
920
  # verify the required parameter 'translations_include_parameters' is set
921
921
  if @api_client.config.client_side_validation && translations_include_parameters.nil?
922
- fail ArgumentError, "Missing the required parameter 'translations_include_parameters' when calling TranslationsApi.translations_include"
922
+ fail ArgumentError, "Missing the required parameter 'translations_include_parameters' when calling TranslationsApi.translations_include_collection"
923
923
  end
924
924
  # resource path
925
925
  local_var_path = '/projects/{project_id}/translations/include'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
@@ -958,7 +958,7 @@ module Phrase
958
958
 
959
959
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
960
960
  if @api_client.config.debugging
961
- @api_client.config.logger.debug "API called: TranslationsApi#translations_include\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
961
+ @api_client.config.logger.debug "API called: TranslationsApi#translations_include_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
962
962
  end
963
963
  response = ::Phrase::Response.new(data, headers)
964
964
  return response, status_code, headers
@@ -1055,8 +1055,8 @@ module Phrase
1055
1055
  # @param [Hash] opts the optional parameters
1056
1056
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
1057
1057
  # @return [AffectedCount]
1058
- def translations_review(project_id, translations_review_parameters, opts = {})
1059
- data, _status_code, _headers = translations_review_with_http_info(project_id, translations_review_parameters, opts)
1058
+ def translations_review_collection(project_id, translations_review_parameters, opts = {})
1059
+ data, _status_code, _headers = translations_review_collection_with_http_info(project_id, translations_review_parameters, opts)
1060
1060
  data
1061
1061
  end
1062
1062
 
@@ -1067,17 +1067,17 @@ module Phrase
1067
1067
  # @param [Hash] opts the optional parameters
1068
1068
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
1069
1069
  # @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
1070
- def translations_review_with_http_info(project_id, translations_review_parameters, opts = {})
1070
+ def translations_review_collection_with_http_info(project_id, translations_review_parameters, opts = {})
1071
1071
  if @api_client.config.debugging
1072
- @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_review ...'
1072
+ @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_review_collection ...'
1073
1073
  end
1074
1074
  # verify the required parameter 'project_id' is set
1075
1075
  if @api_client.config.client_side_validation && project_id.nil?
1076
- fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_review"
1076
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_review_collection"
1077
1077
  end
1078
1078
  # verify the required parameter 'translations_review_parameters' is set
1079
1079
  if @api_client.config.client_side_validation && translations_review_parameters.nil?
1080
- fail ArgumentError, "Missing the required parameter 'translations_review_parameters' when calling TranslationsApi.translations_review"
1080
+ fail ArgumentError, "Missing the required parameter 'translations_review_parameters' when calling TranslationsApi.translations_review_collection"
1081
1081
  end
1082
1082
  # resource path
1083
1083
  local_var_path = '/projects/{project_id}/translations/review'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
@@ -1116,7 +1116,7 @@ module Phrase
1116
1116
 
1117
1117
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1118
1118
  if @api_client.config.debugging
1119
- @api_client.config.logger.debug "API called: TranslationsApi#translations_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1119
+ @api_client.config.logger.debug "API called: TranslationsApi#translations_review_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1120
1120
  end
1121
1121
  response = ::Phrase::Response.new(data, headers)
1122
1122
  return response, status_code, headers
@@ -1209,8 +1209,8 @@ module Phrase
1209
1209
  # @param [Hash] opts the optional parameters
1210
1210
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
1211
1211
  # @return [AffectedCount]
1212
- def translations_unverify(project_id, translations_unverify_parameters, opts = {})
1213
- data, _status_code, _headers = translations_unverify_with_http_info(project_id, translations_unverify_parameters, opts)
1212
+ def translations_unverify_collection(project_id, translations_unverify_parameters, opts = {})
1213
+ data, _status_code, _headers = translations_unverify_collection_with_http_info(project_id, translations_unverify_parameters, opts)
1214
1214
  data
1215
1215
  end
1216
1216
 
@@ -1221,17 +1221,17 @@ module Phrase
1221
1221
  # @param [Hash] opts the optional parameters
1222
1222
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
1223
1223
  # @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
1224
- def translations_unverify_with_http_info(project_id, translations_unverify_parameters, opts = {})
1224
+ def translations_unverify_collection_with_http_info(project_id, translations_unverify_parameters, opts = {})
1225
1225
  if @api_client.config.debugging
1226
- @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_unverify ...'
1226
+ @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_unverify_collection ...'
1227
1227
  end
1228
1228
  # verify the required parameter 'project_id' is set
1229
1229
  if @api_client.config.client_side_validation && project_id.nil?
1230
- fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_unverify"
1230
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_unverify_collection"
1231
1231
  end
1232
1232
  # verify the required parameter 'translations_unverify_parameters' is set
1233
1233
  if @api_client.config.client_side_validation && translations_unverify_parameters.nil?
1234
- fail ArgumentError, "Missing the required parameter 'translations_unverify_parameters' when calling TranslationsApi.translations_unverify"
1234
+ fail ArgumentError, "Missing the required parameter 'translations_unverify_parameters' when calling TranslationsApi.translations_unverify_collection"
1235
1235
  end
1236
1236
  # resource path
1237
1237
  local_var_path = '/projects/{project_id}/translations/unverify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
@@ -1270,7 +1270,7 @@ module Phrase
1270
1270
 
1271
1271
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1272
1272
  if @api_client.config.debugging
1273
- @api_client.config.logger.debug "API called: TranslationsApi#translations_unverify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1273
+ @api_client.config.logger.debug "API called: TranslationsApi#translations_unverify_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1274
1274
  end
1275
1275
  response = ::Phrase::Response.new(data, headers)
1276
1276
  return response, status_code, headers
@@ -1283,8 +1283,8 @@ module Phrase
1283
1283
  # @param [Hash] opts the optional parameters
1284
1284
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
1285
1285
  # @return [AffectedCount]
1286
- def translations_verify(project_id, translations_verify_parameters, opts = {})
1287
- data, _status_code, _headers = translations_verify_with_http_info(project_id, translations_verify_parameters, opts)
1286
+ def translations_verify_collection(project_id, translations_verify_parameters, opts = {})
1287
+ data, _status_code, _headers = translations_verify_collection_with_http_info(project_id, translations_verify_parameters, opts)
1288
1288
  data
1289
1289
  end
1290
1290
 
@@ -1295,17 +1295,17 @@ module Phrase
1295
1295
  # @param [Hash] opts the optional parameters
1296
1296
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
1297
1297
  # @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
1298
- def translations_verify_with_http_info(project_id, translations_verify_parameters, opts = {})
1298
+ def translations_verify_collection_with_http_info(project_id, translations_verify_parameters, opts = {})
1299
1299
  if @api_client.config.debugging
1300
- @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_verify ...'
1300
+ @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_verify_collection ...'
1301
1301
  end
1302
1302
  # verify the required parameter 'project_id' is set
1303
1303
  if @api_client.config.client_side_validation && project_id.nil?
1304
- fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_verify"
1304
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_verify_collection"
1305
1305
  end
1306
1306
  # verify the required parameter 'translations_verify_parameters' is set
1307
1307
  if @api_client.config.client_side_validation && translations_verify_parameters.nil?
1308
- fail ArgumentError, "Missing the required parameter 'translations_verify_parameters' when calling TranslationsApi.translations_verify"
1308
+ fail ArgumentError, "Missing the required parameter 'translations_verify_parameters' when calling TranslationsApi.translations_verify_collection"
1309
1309
  end
1310
1310
  # resource path
1311
1311
  local_var_path = '/projects/{project_id}/translations/verify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
@@ -1344,7 +1344,7 @@ module Phrase
1344
1344
 
1345
1345
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1346
1346
  if @api_client.config.debugging
1347
- @api_client.config.logger.debug "API called: TranslationsApi#translations_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1347
+ @api_client.config.logger.debug "API called: TranslationsApi#translations_verify_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1348
1348
  end
1349
1349
  response = ::Phrase::Response.new(data, headers)
1350
1350
  return response, status_code, headers