phrase 2.12.0 → 2.14.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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +25 -13
  4. data/docs/Comment.md +5 -1
  5. data/docs/CommentReaction.md +27 -0
  6. data/docs/CommentReactionsApi.md +289 -0
  7. data/docs/CommentRepliesApi.md +427 -0
  8. data/docs/CommentsApi.md +5 -1
  9. data/docs/DistributionCreateParameters.md +1 -1
  10. data/docs/GitlabSyncHistory.md +2 -2
  11. data/docs/GitlabSyncHistoryErrors.md +19 -0
  12. data/docs/JobLocaleUpdateParameters.md +1 -1
  13. data/docs/JobLocalesApi.md +20 -20
  14. data/docs/JobLocalesCreateParameters.md +1 -1
  15. data/docs/LocalesApi.md +2 -2
  16. data/docs/SpacesApi.md +9 -9
  17. data/docs/TeamsApi.md +6 -6
  18. data/docs/UploadCreateParameters.md +1 -1
  19. data/docs/UploadsApi.md +2 -2
  20. data/lib/phrase/api/comment_reactions_api.rb +353 -0
  21. data/lib/phrase/api/comment_replies_api.rb +523 -0
  22. data/lib/phrase/api/comments_api.rb +6 -0
  23. data/lib/phrase/api/job_locales_api.rb +20 -20
  24. data/lib/phrase/api/locales_api.rb +2 -2
  25. data/lib/phrase/api/spaces_api.rb +6 -6
  26. data/lib/phrase/api/teams_api.rb +4 -4
  27. data/lib/phrase/api/uploads_api.rb +2 -2
  28. data/lib/phrase/models/comment.rb +24 -4
  29. data/lib/phrase/models/comment_reaction.rb +239 -0
  30. data/lib/phrase/models/distribution_create_parameters.rb +1 -1
  31. data/lib/phrase/models/gitlab_sync_history.rb +2 -2
  32. data/lib/phrase/models/gitlab_sync_history_errors.rb +203 -0
  33. data/lib/phrase/models/job_locale_update_parameters.rb +1 -1
  34. data/lib/phrase/models/job_locales_create_parameters.rb +1 -1
  35. data/lib/phrase/models/upload_create_parameters.rb +1 -1
  36. data/lib/phrase/version.rb +1 -1
  37. data/lib/phrase.rb +4 -0
  38. data/spec/api/comment_reactions_api_spec.rb +92 -0
  39. data/spec/api/comment_replies_api_spec.rb +126 -0
  40. data/spec/api/comments_api_spec.rb +2 -0
  41. data/spec/api/job_locales_api_spec.rb +10 -10
  42. data/spec/api/locales_api_spec.rb +1 -1
  43. data/spec/api/spaces_api_spec.rb +3 -3
  44. data/spec/api/teams_api_spec.rb +2 -2
  45. data/spec/api/uploads_api_spec.rb +1 -1
  46. data/spec/models/comment_reaction_spec.rb +59 -0
  47. data/spec/models/comment_spec.rb +12 -0
  48. data/spec/models/gitlab_sync_history_errors_spec.rb +35 -0
  49. metadata +228 -211
@@ -0,0 +1,523 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class CommentRepliesApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # List replies
11
+ # List all replies for a comment.
12
+ # @param project_id [String] Project ID
13
+ # @param key_id [String] Translation Key ID
14
+ # @param comment_id [String] Comment ID
15
+ # @param [Hash] opts the optional parameters
16
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
17
+ # @option opts [Integer] :page Page number
18
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
19
+ # @option opts [String] :branch specify the branch to use
20
+ # @return [Array<Comment>]
21
+ def replies_list(project_id, key_id, comment_id, opts = {})
22
+ data, _status_code, _headers = replies_list_with_http_info(project_id, key_id, comment_id, opts)
23
+ data
24
+ end
25
+
26
+ # List replies
27
+ # List all replies for a comment.
28
+ # @param project_id [String] Project ID
29
+ # @param key_id [String] Translation Key ID
30
+ # @param comment_id [String] Comment ID
31
+ # @param [Hash] opts the optional parameters
32
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
33
+ # @option opts [Integer] :page Page number
34
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
35
+ # @option opts [String] :branch specify the branch to use
36
+ # @return [Array<(Response<(Array<Comment>)>, Integer, Hash)>] Response<(Array<Comment>)> data, response status code and response headers
37
+ def replies_list_with_http_info(project_id, key_id, comment_id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: CommentRepliesApi.replies_list ...'
40
+ end
41
+ # verify the required parameter 'project_id' is set
42
+ if @api_client.config.client_side_validation && project_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.replies_list"
44
+ end
45
+ # verify the required parameter 'key_id' is set
46
+ if @api_client.config.client_side_validation && key_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.replies_list"
48
+ end
49
+ # verify the required parameter 'comment_id' is set
50
+ if @api_client.config.client_side_validation && comment_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.replies_list"
52
+ end
53
+ # resource path
54
+ local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s))
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
59
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
60
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
61
+
62
+ # header parameters
63
+ header_params = opts[:header_params] || {}
64
+ # HTTP header 'Accept' (if needed)
65
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
66
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:body]
73
+
74
+ # return_type
75
+ return_type = opts[:return_type] || 'Array<Comment>'
76
+
77
+ # auth_names
78
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
79
+
80
+ new_options = opts.merge(
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: CommentRepliesApi#replies_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ response = ::Phrase::Response.new(data, headers)
94
+ return response, status_code, headers
95
+ end
96
+
97
+ # Create a reply
98
+ # Create a new reply for a comment.
99
+ # @param project_id [String] Project ID
100
+ # @param key_id [String] Translation Key ID
101
+ # @param comment_id [String] Comment ID
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
104
+ # @option opts [String] :branch specify the branch to use
105
+ # @option opts [String] :message specify the message for the comment
106
+ # @return [Comment]
107
+ def reply_create(project_id, key_id, comment_id, opts = {})
108
+ data, _status_code, _headers = reply_create_with_http_info(project_id, key_id, comment_id, opts)
109
+ data
110
+ end
111
+
112
+ # Create a reply
113
+ # Create a new reply for a comment.
114
+ # @param project_id [String] Project ID
115
+ # @param key_id [String] Translation Key ID
116
+ # @param comment_id [String] Comment ID
117
+ # @param [Hash] opts the optional parameters
118
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
119
+ # @option opts [String] :branch specify the branch to use
120
+ # @option opts [String] :message specify the message for the comment
121
+ # @return [Array<(Response<(Comment)>, Integer, Hash)>] Response<(Comment)> data, response status code and response headers
122
+ def reply_create_with_http_info(project_id, key_id, comment_id, opts = {})
123
+ if @api_client.config.debugging
124
+ @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_create ...'
125
+ end
126
+ # verify the required parameter 'project_id' is set
127
+ if @api_client.config.client_side_validation && project_id.nil?
128
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_create"
129
+ end
130
+ # verify the required parameter 'key_id' is set
131
+ if @api_client.config.client_side_validation && key_id.nil?
132
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_create"
133
+ end
134
+ # verify the required parameter 'comment_id' is set
135
+ if @api_client.config.client_side_validation && comment_id.nil?
136
+ fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_create"
137
+ end
138
+ # resource path
139
+ local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s))
140
+
141
+ # query parameters
142
+ query_params = opts[:query_params] || {}
143
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
144
+ query_params[:'message'] = opts[:'message'] if !opts[:'message'].nil?
145
+
146
+ # header parameters
147
+ header_params = opts[:header_params] || {}
148
+ # HTTP header 'Accept' (if needed)
149
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
150
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
151
+
152
+ # form parameters
153
+ form_params = opts[:form_params] || {}
154
+
155
+ # http body (model)
156
+ post_body = opts[:body]
157
+
158
+ # return_type
159
+ return_type = opts[:return_type] || 'Comment'
160
+
161
+ # auth_names
162
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
163
+
164
+ new_options = opts.merge(
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => return_type
171
+ )
172
+
173
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug "API called: CommentRepliesApi#reply_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ end
177
+ response = ::Phrase::Response.new(data, headers)
178
+ return response, status_code, headers
179
+ end
180
+
181
+ # Delete a reply
182
+ # Delete an existing reply.
183
+ # @param project_id [String] Project ID
184
+ # @param key_id [String] Translation Key ID
185
+ # @param comment_id [String] Comment ID
186
+ # @param id [String] ID
187
+ # @param [Hash] opts the optional parameters
188
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
189
+ # @option opts [String] :branch specify the branch to use
190
+ # @return [nil]
191
+ def reply_delete(project_id, key_id, comment_id, id, opts = {})
192
+ data, _status_code, _headers = reply_delete_with_http_info(project_id, key_id, comment_id, id, opts)
193
+ data
194
+ end
195
+
196
+ # Delete a reply
197
+ # Delete an existing reply.
198
+ # @param project_id [String] Project ID
199
+ # @param key_id [String] Translation Key ID
200
+ # @param comment_id [String] Comment ID
201
+ # @param id [String] ID
202
+ # @param [Hash] opts the optional parameters
203
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
204
+ # @option opts [String] :branch specify the branch to use
205
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
206
+ def reply_delete_with_http_info(project_id, key_id, comment_id, id, opts = {})
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_delete ...'
209
+ end
210
+ # verify the required parameter 'project_id' is set
211
+ if @api_client.config.client_side_validation && project_id.nil?
212
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_delete"
213
+ end
214
+ # verify the required parameter 'key_id' is set
215
+ if @api_client.config.client_side_validation && key_id.nil?
216
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_delete"
217
+ end
218
+ # verify the required parameter 'comment_id' is set
219
+ if @api_client.config.client_side_validation && comment_id.nil?
220
+ fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_delete"
221
+ end
222
+ # verify the required parameter 'id' is set
223
+ if @api_client.config.client_side_validation && id.nil?
224
+ fail ArgumentError, "Missing the required parameter 'id' when calling CommentRepliesApi.reply_delete"
225
+ end
226
+ # resource path
227
+ local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
228
+
229
+ # query parameters
230
+ query_params = opts[:query_params] || {}
231
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
232
+
233
+ # header parameters
234
+ header_params = opts[:header_params] || {}
235
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
236
+
237
+ # form parameters
238
+ form_params = opts[:form_params] || {}
239
+
240
+ # http body (model)
241
+ post_body = opts[:body]
242
+
243
+ # return_type
244
+ return_type = opts[:return_type]
245
+
246
+ # auth_names
247
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
248
+
249
+ new_options = opts.merge(
250
+ :header_params => header_params,
251
+ :query_params => query_params,
252
+ :form_params => form_params,
253
+ :body => post_body,
254
+ :auth_names => auth_names,
255
+ :return_type => return_type
256
+ )
257
+
258
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "API called: CommentRepliesApi#reply_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
261
+ end
262
+ response = ::Phrase::Response.new(data, headers)
263
+ return response, status_code, headers
264
+ end
265
+
266
+ # Mark a reply as read
267
+ # Mark a reply as read.
268
+ # @param project_id [String] Project ID
269
+ # @param key_id [String] Translation Key ID
270
+ # @param comment_id [String] Comment ID
271
+ # @param id [String] ID
272
+ # @param [Hash] opts the optional parameters
273
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
274
+ # @option opts [String] :branch specify the branch to use
275
+ # @return [nil]
276
+ def reply_mark_as_read(project_id, key_id, comment_id, id, opts = {})
277
+ data, _status_code, _headers = reply_mark_as_read_with_http_info(project_id, key_id, comment_id, id, opts)
278
+ data
279
+ end
280
+
281
+ # Mark a reply as read
282
+ # Mark a reply as read.
283
+ # @param project_id [String] Project ID
284
+ # @param key_id [String] Translation Key ID
285
+ # @param comment_id [String] Comment ID
286
+ # @param id [String] ID
287
+ # @param [Hash] opts the optional parameters
288
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
289
+ # @option opts [String] :branch specify the branch to use
290
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
291
+ def reply_mark_as_read_with_http_info(project_id, key_id, comment_id, id, opts = {})
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_mark_as_read ...'
294
+ end
295
+ # verify the required parameter 'project_id' is set
296
+ if @api_client.config.client_side_validation && project_id.nil?
297
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_mark_as_read"
298
+ end
299
+ # verify the required parameter 'key_id' is set
300
+ if @api_client.config.client_side_validation && key_id.nil?
301
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_mark_as_read"
302
+ end
303
+ # verify the required parameter 'comment_id' is set
304
+ if @api_client.config.client_side_validation && comment_id.nil?
305
+ fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_mark_as_read"
306
+ end
307
+ # verify the required parameter 'id' is set
308
+ if @api_client.config.client_side_validation && id.nil?
309
+ fail ArgumentError, "Missing the required parameter 'id' when calling CommentRepliesApi.reply_mark_as_read"
310
+ end
311
+ # resource path
312
+ local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}/mark_as_read'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
313
+
314
+ # query parameters
315
+ query_params = opts[:query_params] || {}
316
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
317
+
318
+ # header parameters
319
+ header_params = opts[:header_params] || {}
320
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
321
+
322
+ # form parameters
323
+ form_params = opts[:form_params] || {}
324
+
325
+ # http body (model)
326
+ post_body = opts[:body]
327
+
328
+ # return_type
329
+ return_type = opts[:return_type]
330
+
331
+ # auth_names
332
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
333
+
334
+ new_options = opts.merge(
335
+ :header_params => header_params,
336
+ :query_params => query_params,
337
+ :form_params => form_params,
338
+ :body => post_body,
339
+ :auth_names => auth_names,
340
+ :return_type => return_type
341
+ )
342
+
343
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
344
+ if @api_client.config.debugging
345
+ @api_client.config.logger.debug "API called: CommentRepliesApi#reply_mark_as_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
346
+ end
347
+ response = ::Phrase::Response.new(data, headers)
348
+ return response, status_code, headers
349
+ end
350
+
351
+ # Mark a reply as unread
352
+ # Mark a reply as unread.
353
+ # @param project_id [String] Project ID
354
+ # @param key_id [String] Translation Key ID
355
+ # @param comment_id [String] Comment ID
356
+ # @param id [String] ID
357
+ # @param [Hash] opts the optional parameters
358
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
359
+ # @option opts [String] :branch specify the branch to use
360
+ # @return [nil]
361
+ def reply_mark_as_unread(project_id, key_id, comment_id, id, opts = {})
362
+ data, _status_code, _headers = reply_mark_as_unread_with_http_info(project_id, key_id, comment_id, id, opts)
363
+ data
364
+ end
365
+
366
+ # Mark a reply as unread
367
+ # Mark a reply as unread.
368
+ # @param project_id [String] Project ID
369
+ # @param key_id [String] Translation Key ID
370
+ # @param comment_id [String] Comment ID
371
+ # @param id [String] ID
372
+ # @param [Hash] opts the optional parameters
373
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
374
+ # @option opts [String] :branch specify the branch to use
375
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
376
+ def reply_mark_as_unread_with_http_info(project_id, key_id, comment_id, id, opts = {})
377
+ if @api_client.config.debugging
378
+ @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_mark_as_unread ...'
379
+ end
380
+ # verify the required parameter 'project_id' is set
381
+ if @api_client.config.client_side_validation && project_id.nil?
382
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_mark_as_unread"
383
+ end
384
+ # verify the required parameter 'key_id' is set
385
+ if @api_client.config.client_side_validation && key_id.nil?
386
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_mark_as_unread"
387
+ end
388
+ # verify the required parameter 'comment_id' is set
389
+ if @api_client.config.client_side_validation && comment_id.nil?
390
+ fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_mark_as_unread"
391
+ end
392
+ # verify the required parameter 'id' is set
393
+ if @api_client.config.client_side_validation && id.nil?
394
+ fail ArgumentError, "Missing the required parameter 'id' when calling CommentRepliesApi.reply_mark_as_unread"
395
+ end
396
+ # resource path
397
+ local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}/mark_as_unread'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
398
+
399
+ # query parameters
400
+ query_params = opts[:query_params] || {}
401
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
402
+
403
+ # header parameters
404
+ header_params = opts[:header_params] || {}
405
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
406
+
407
+ # form parameters
408
+ form_params = opts[:form_params] || {}
409
+
410
+ # http body (model)
411
+ post_body = opts[:body]
412
+
413
+ # return_type
414
+ return_type = opts[:return_type]
415
+
416
+ # auth_names
417
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
418
+
419
+ new_options = opts.merge(
420
+ :header_params => header_params,
421
+ :query_params => query_params,
422
+ :form_params => form_params,
423
+ :body => post_body,
424
+ :auth_names => auth_names,
425
+ :return_type => return_type
426
+ )
427
+
428
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
429
+ if @api_client.config.debugging
430
+ @api_client.config.logger.debug "API called: CommentRepliesApi#reply_mark_as_unread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
431
+ end
432
+ response = ::Phrase::Response.new(data, headers)
433
+ return response, status_code, headers
434
+ end
435
+
436
+ # Get a single reply
437
+ # Get details on a single reply.
438
+ # @param project_id [String] Project ID
439
+ # @param key_id [String] Translation Key ID
440
+ # @param comment_id [String] Comment ID
441
+ # @param id [String] ID
442
+ # @param [Hash] opts the optional parameters
443
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
444
+ # @option opts [String] :branch specify the branch to use
445
+ # @return [Comment]
446
+ def reply_show(project_id, key_id, comment_id, id, opts = {})
447
+ data, _status_code, _headers = reply_show_with_http_info(project_id, key_id, comment_id, id, opts)
448
+ data
449
+ end
450
+
451
+ # Get a single reply
452
+ # Get details on a single reply.
453
+ # @param project_id [String] Project ID
454
+ # @param key_id [String] Translation Key ID
455
+ # @param comment_id [String] Comment ID
456
+ # @param id [String] ID
457
+ # @param [Hash] opts the optional parameters
458
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
459
+ # @option opts [String] :branch specify the branch to use
460
+ # @return [Array<(Response<(Comment)>, Integer, Hash)>] Response<(Comment)> data, response status code and response headers
461
+ def reply_show_with_http_info(project_id, key_id, comment_id, id, opts = {})
462
+ if @api_client.config.debugging
463
+ @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_show ...'
464
+ end
465
+ # verify the required parameter 'project_id' is set
466
+ if @api_client.config.client_side_validation && project_id.nil?
467
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_show"
468
+ end
469
+ # verify the required parameter 'key_id' is set
470
+ if @api_client.config.client_side_validation && key_id.nil?
471
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_show"
472
+ end
473
+ # verify the required parameter 'comment_id' is set
474
+ if @api_client.config.client_side_validation && comment_id.nil?
475
+ fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_show"
476
+ end
477
+ # verify the required parameter 'id' is set
478
+ if @api_client.config.client_side_validation && id.nil?
479
+ fail ArgumentError, "Missing the required parameter 'id' when calling CommentRepliesApi.reply_show"
480
+ end
481
+ # resource path
482
+ local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
483
+
484
+ # query parameters
485
+ query_params = opts[:query_params] || {}
486
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
487
+
488
+ # header parameters
489
+ header_params = opts[:header_params] || {}
490
+ # HTTP header 'Accept' (if needed)
491
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
492
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
493
+
494
+ # form parameters
495
+ form_params = opts[:form_params] || {}
496
+
497
+ # http body (model)
498
+ post_body = opts[:body]
499
+
500
+ # return_type
501
+ return_type = opts[:return_type] || 'Comment'
502
+
503
+ # auth_names
504
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
505
+
506
+ new_options = opts.merge(
507
+ :header_params => header_params,
508
+ :query_params => query_params,
509
+ :form_params => form_params,
510
+ :body => post_body,
511
+ :auth_names => auth_names,
512
+ :return_type => return_type
513
+ )
514
+
515
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug "API called: CommentRepliesApi#reply_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
518
+ end
519
+ response = ::Phrase::Response.new(data, headers)
520
+ return response, status_code, headers
521
+ end
522
+ end
523
+ end
@@ -14,6 +14,8 @@ module Phrase
14
14
  # @param comment_create_parameters [CommentCreateParameters]
15
15
  # @param [Hash] opts the optional parameters
16
16
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
17
+ # @option opts [String] :message specify the message for the comment
18
+ # @option opts [Array<String>] :locale_ids specify the locales for the comment
17
19
  # @return [Comment]
18
20
  def comment_create(project_id, key_id, comment_create_parameters, opts = {})
19
21
  data, _status_code, _headers = comment_create_with_http_info(project_id, key_id, comment_create_parameters, opts)
@@ -27,6 +29,8 @@ module Phrase
27
29
  # @param comment_create_parameters [CommentCreateParameters]
28
30
  # @param [Hash] opts the optional parameters
29
31
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
32
+ # @option opts [String] :message specify the message for the comment
33
+ # @option opts [Array<String>] :locale_ids specify the locales for the comment
30
34
  # @return [Array<(Response<(Comment)>, Integer, Hash)>] Response<(Comment)> data, response status code and response headers
31
35
  def comment_create_with_http_info(project_id, key_id, comment_create_parameters, opts = {})
32
36
  if @api_client.config.debugging
@@ -49,6 +53,8 @@ module Phrase
49
53
 
50
54
  # query parameters
51
55
  query_params = opts[:query_params] || {}
56
+ query_params[:'message'] = opts[:'message'] if !opts[:'message'].nil?
57
+ query_params[:'locale_ids'] = @api_client.build_collection_param(opts[:'locale_ids'], :multi) if !opts[:'locale_ids'].nil?
52
58
 
53
59
  # header parameters
54
60
  header_params = opts[:header_params] || {}
@@ -179,8 +179,8 @@ module Phrase
179
179
  return response, status_code, headers
180
180
  end
181
181
 
182
- # Delete a job locale
183
- # Delete an existing job locale.
182
+ # Remove a target locale from a job
183
+ # Removes a target locale from a job.
184
184
  # @param project_id [String] Project ID
185
185
  # @param job_id [String] Job ID
186
186
  # @param id [String] ID
@@ -193,8 +193,8 @@ module Phrase
193
193
  data
194
194
  end
195
195
 
196
- # Delete a job locale
197
- # Delete an existing job locale.
196
+ # Remove a target locale from a job
197
+ # Removes a target locale from a job.
198
198
  # @param project_id [String] Project ID
199
199
  # @param job_id [String] Job ID
200
200
  # @param id [String] ID
@@ -344,8 +344,8 @@ module Phrase
344
344
  return response, status_code, headers
345
345
  end
346
346
 
347
- # Get a single job locale
348
- # Get a single job locale for a given job.
347
+ # Show single job target locale
348
+ # Get a single target locale for a given job.
349
349
  # @param project_id [String] Project ID
350
350
  # @param job_id [String] Job ID
351
351
  # @param id [String] ID
@@ -358,8 +358,8 @@ module Phrase
358
358
  data
359
359
  end
360
360
 
361
- # Get a single job locale
362
- # Get a single job locale for a given job.
361
+ # Show single job target locale
362
+ # Get a single target locale for a given job.
363
363
  # @param project_id [String] Project ID
364
364
  # @param job_id [String] Job ID
365
365
  # @param id [String] ID
@@ -425,8 +425,8 @@ module Phrase
425
425
  return response, status_code, headers
426
426
  end
427
427
 
428
- # Update a job locale
429
- # Update an existing job locale.
428
+ # Update a job target locale
429
+ # Update an existing job target locale.
430
430
  # @param project_id [String] Project ID
431
431
  # @param job_id [String] Job ID
432
432
  # @param id [String] ID
@@ -439,8 +439,8 @@ module Phrase
439
439
  data
440
440
  end
441
441
 
442
- # Update a job locale
443
- # Update an existing job locale.
442
+ # Update a job target locale
443
+ # Update an existing job target locale.
444
444
  # @param project_id [String] Project ID
445
445
  # @param job_id [String] Job ID
446
446
  # @param id [String] ID
@@ -511,8 +511,8 @@ module Phrase
511
511
  return response, status_code, headers
512
512
  end
513
513
 
514
- # Create a job locale
515
- # Create a new job locale.
514
+ # Add a target locale to a job
515
+ # Adds a target locale to a job.
516
516
  # @param project_id [String] Project ID
517
517
  # @param job_id [String] Job ID
518
518
  # @param job_locales_create_parameters [JobLocalesCreateParameters]
@@ -524,8 +524,8 @@ module Phrase
524
524
  data
525
525
  end
526
526
 
527
- # Create a job locale
528
- # Create a new job locale.
527
+ # Add a target locale to a job
528
+ # Adds a target locale to a job.
529
529
  # @param project_id [String] Project ID
530
530
  # @param job_id [String] Job ID
531
531
  # @param job_locales_create_parameters [JobLocalesCreateParameters]
@@ -591,8 +591,8 @@ module Phrase
591
591
  return response, status_code, headers
592
592
  end
593
593
 
594
- # List job locales
595
- # List all job locales for a given job.
594
+ # List job target locales
595
+ # List all target locales for a given job.
596
596
  # @param project_id [String] Project ID
597
597
  # @param job_id [String] Job ID
598
598
  # @param [Hash] opts the optional parameters
@@ -606,8 +606,8 @@ module Phrase
606
606
  data
607
607
  end
608
608
 
609
- # List job locales
610
- # List all job locales for a given job.
609
+ # List job target locales
610
+ # List all target locales for a given job.
611
611
  # @param project_id [String] Project ID
612
612
  # @param job_id [String] Job ID
613
613
  # @param [Hash] opts the optional parameters
@@ -247,7 +247,7 @@ module Phrase
247
247
  # @option opts [String] :encoding Enforces a specific encoding on the file contents. Valid options are \&quot;UTF-8\&quot;, \&quot;UTF-16\&quot; and \&quot;ISO-8859-1\&quot;.
248
248
  # @option opts [Boolean] :skip_unverified_translations Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &lt;code&gt;include_unverified_translations&lt;/code&gt;.
249
249
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
250
- # @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.
250
+ # @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 is enabled for the project.
251
251
  # @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;.
252
252
  # @option opts [String] :source_locale_id Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a &lt;code&gt;tag&lt;/code&gt; parameter indicating a specific job.
253
253
  # @return [File]
@@ -277,7 +277,7 @@ module Phrase
277
277
  # @option opts [String] :encoding Enforces a specific encoding on the file contents. Valid options are \&quot;UTF-8\&quot;, \&quot;UTF-16\&quot; and \&quot;ISO-8859-1\&quot;.
278
278
  # @option opts [Boolean] :skip_unverified_translations Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &lt;code&gt;include_unverified_translations&lt;/code&gt;.
279
279
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
280
- # @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.
280
+ # @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 is enabled for the project.
281
281
  # @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;.
282
282
  # @option opts [String] :source_locale_id Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a &lt;code&gt;tag&lt;/code&gt; parameter indicating a specific job.
283
283
  # @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers