phrase 4.4.0 → 4.5.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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +7 -5
  4. data/docs/CommentRepliesApi.md +3 -5
  5. data/docs/CommentsApi.md +3 -5
  6. data/docs/KeyCreateParameters.md +1 -1
  7. data/docs/KeyUpdateParameters.md +1 -1
  8. data/docs/ProjectCreateParameters.md +1 -1
  9. data/docs/ProjectUpdateParameters.md +1 -1
  10. data/docs/ScreenshotUpdateParameters.md +1 -1
  11. data/docs/TranslationUnreviewParameters.md +17 -0
  12. data/docs/TranslationsApi.md +130 -0
  13. data/docs/TranslationsUnreviewParameters.md +19 -0
  14. data/docs/UploadSummary.md +5 -1
  15. data/docs/UploadsApi.md +2 -0
  16. data/lib/phrase/api/comment_replies_api.rb +4 -12
  17. data/lib/phrase/api/comments_api.rb +4 -12
  18. data/lib/phrase/api/translations_api.rb +154 -0
  19. data/lib/phrase/api/uploads_api.rb +3 -0
  20. data/lib/phrase/models/{comments_list_parameters.rb → translation_unreview_parameters.rb} +8 -52
  21. data/lib/phrase/models/{replies_list_parameters.rb → translations_unreview_parameters.rb} +12 -34
  22. data/lib/phrase/models/upload_summary.rb +22 -4
  23. data/lib/phrase/version.rb +1 -1
  24. data/lib/phrase.rb +2 -2
  25. data/spec/api/comment_replies_api_spec.rb +0 -1
  26. data/spec/api/comments_api_spec.rb +0 -1
  27. data/spec/api/translations_api_spec.rb +29 -0
  28. data/spec/models/translation_unreview_parameters_spec.rb +29 -0
  29. data/spec/models/translations_unreview_parameters_spec.rb +35 -0
  30. data/spec/models/upload_summary_spec.rb +12 -0
  31. metadata +235 -235
  32. data/docs/CommentsListParameters.md +0 -25
  33. data/docs/RepliesListParameters.md +0 -23
  34. data/spec/models/comments_list_parameters_spec.rb +0 -53
  35. data/spec/models/replies_list_parameters_spec.rb +0 -47
@@ -396,6 +396,86 @@ module Phrase
396
396
  return response, status_code, headers
397
397
  end
398
398
 
399
+ # Unreview a translation
400
+ # Mark a reviewed translation as translated.
401
+ # @param project_id [String] Project ID
402
+ # @param id [String] ID
403
+ # @param translation_unreview_parameters [TranslationUnreviewParameters]
404
+ # @param [Hash] opts the optional parameters
405
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
406
+ # @return [TranslationDetails]
407
+ def translation_unreview(project_id, id, translation_unreview_parameters, opts = {})
408
+ data, _status_code, _headers = translation_unreview_with_http_info(project_id, id, translation_unreview_parameters, opts)
409
+ data
410
+ end
411
+
412
+ # Unreview a translation
413
+ # Mark a reviewed translation as translated.
414
+ # @param project_id [String] Project ID
415
+ # @param id [String] ID
416
+ # @param translation_unreview_parameters [TranslationUnreviewParameters]
417
+ # @param [Hash] opts the optional parameters
418
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
419
+ # @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
420
+ def translation_unreview_with_http_info(project_id, id, translation_unreview_parameters, opts = {})
421
+ if @api_client.config.debugging
422
+ @api_client.config.logger.debug 'Calling API: TranslationsApi.translation_unreview ...'
423
+ end
424
+ # verify the required parameter 'project_id' is set
425
+ if @api_client.config.client_side_validation && project_id.nil?
426
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_unreview"
427
+ end
428
+ # verify the required parameter 'id' is set
429
+ if @api_client.config.client_side_validation && id.nil?
430
+ fail ArgumentError, "Missing the required parameter 'id' when calling TranslationsApi.translation_unreview"
431
+ end
432
+ # verify the required parameter 'translation_unreview_parameters' is set
433
+ if @api_client.config.client_side_validation && translation_unreview_parameters.nil?
434
+ fail ArgumentError, "Missing the required parameter 'translation_unreview_parameters' when calling TranslationsApi.translation_unreview"
435
+ end
436
+ # resource path
437
+ local_var_path = '/projects/{project_id}/translations/{id}/unreview'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
438
+
439
+ # query parameters
440
+ query_params = opts[:query_params] || {}
441
+
442
+ # header parameters
443
+ header_params = opts[:header_params] || {}
444
+ # HTTP header 'Accept' (if needed)
445
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
446
+ # HTTP header 'Content-Type'
447
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
448
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
449
+
450
+ # form parameters
451
+ form_params = opts[:form_params] || {}
452
+
453
+ # http body (model)
454
+ post_body = opts[:body] || @api_client.object_to_http_body(translation_unreview_parameters)
455
+
456
+ # return_type
457
+ return_type = opts[:return_type] || 'TranslationDetails'
458
+
459
+ # auth_names
460
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
461
+
462
+ new_options = opts.merge(
463
+ :header_params => header_params,
464
+ :query_params => query_params,
465
+ :form_params => form_params,
466
+ :body => post_body,
467
+ :auth_names => auth_names,
468
+ :return_type => return_type
469
+ )
470
+
471
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
472
+ if @api_client.config.debugging
473
+ @api_client.config.logger.debug "API called: TranslationsApi#translation_unreview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
474
+ end
475
+ response = ::Phrase::Response.new(data, headers)
476
+ return response, status_code, headers
477
+ end
478
+
399
479
  # Mark a translation as unverified
400
480
  # Mark an existing translation as unverified.
401
481
  # @param project_id [String] Project ID
@@ -1208,6 +1288,80 @@ module Phrase
1208
1288
  return response, status_code, headers
1209
1289
  end
1210
1290
 
1291
+ # Unreview translations selected by query
1292
+ # Unreview translations matching query.
1293
+ # @param project_id [String] Project ID
1294
+ # @param translations_unreview_parameters [TranslationsUnreviewParameters]
1295
+ # @param [Hash] opts the optional parameters
1296
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
1297
+ # @return [AffectedCount]
1298
+ def translations_unreview_collection(project_id, translations_unreview_parameters, opts = {})
1299
+ data, _status_code, _headers = translations_unreview_collection_with_http_info(project_id, translations_unreview_parameters, opts)
1300
+ data
1301
+ end
1302
+
1303
+ # Unreview translations selected by query
1304
+ # Unreview translations matching query.
1305
+ # @param project_id [String] Project ID
1306
+ # @param translations_unreview_parameters [TranslationsUnreviewParameters]
1307
+ # @param [Hash] opts the optional parameters
1308
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
1309
+ # @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
1310
+ def translations_unreview_collection_with_http_info(project_id, translations_unreview_parameters, opts = {})
1311
+ if @api_client.config.debugging
1312
+ @api_client.config.logger.debug 'Calling API: TranslationsApi.translations_unreview_collection ...'
1313
+ end
1314
+ # verify the required parameter 'project_id' is set
1315
+ if @api_client.config.client_side_validation && project_id.nil?
1316
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_unreview_collection"
1317
+ end
1318
+ # verify the required parameter 'translations_unreview_parameters' is set
1319
+ if @api_client.config.client_side_validation && translations_unreview_parameters.nil?
1320
+ fail ArgumentError, "Missing the required parameter 'translations_unreview_parameters' when calling TranslationsApi.translations_unreview_collection"
1321
+ end
1322
+ # resource path
1323
+ local_var_path = '/projects/{project_id}/translations/unreview'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
1324
+
1325
+ # query parameters
1326
+ query_params = opts[:query_params] || {}
1327
+
1328
+ # header parameters
1329
+ header_params = opts[:header_params] || {}
1330
+ # HTTP header 'Accept' (if needed)
1331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1332
+ # HTTP header 'Content-Type'
1333
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1334
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
1335
+
1336
+ # form parameters
1337
+ form_params = opts[:form_params] || {}
1338
+
1339
+ # http body (model)
1340
+ post_body = opts[:body] || @api_client.object_to_http_body(translations_unreview_parameters)
1341
+
1342
+ # return_type
1343
+ return_type = opts[:return_type] || 'AffectedCount'
1344
+
1345
+ # auth_names
1346
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
1347
+
1348
+ new_options = opts.merge(
1349
+ :header_params => header_params,
1350
+ :query_params => query_params,
1351
+ :form_params => form_params,
1352
+ :body => post_body,
1353
+ :auth_names => auth_names,
1354
+ :return_type => return_type
1355
+ )
1356
+
1357
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1358
+ if @api_client.config.debugging
1359
+ @api_client.config.logger.debug "API called: TranslationsApi#translations_unreview_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1360
+ end
1361
+ response = ::Phrase::Response.new(data, headers)
1362
+ return response, status_code, headers
1363
+ end
1364
+
1211
1365
  # Unverify translations by query
1212
1366
  # Mark translations matching query as unverified.
1213
1367
  # @param project_id [String] Project ID
@@ -28,6 +28,7 @@ module Phrase
28
28
  # @option opts [Object] :locale_mapping Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
29
29
  # @option opts [Object] :format_options Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).
30
30
  # @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically.
31
+ # @option opts [Boolean] :verify_mentioned_translations Indicates whether all translations mentioned in the upload should be verified. (default to false)
31
32
  # @option opts [Boolean] :mark_reviewed Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
32
33
  # @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60; (default to false)
33
34
  # @option opts [String] :translation_key_prefix This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.
@@ -58,6 +59,7 @@ module Phrase
58
59
  # @option opts [Object] :locale_mapping Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
59
60
  # @option opts [Object] :format_options Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).
60
61
  # @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically.
62
+ # @option opts [Boolean] :verify_mentioned_translations Indicates whether all translations mentioned in the upload should be verified.
61
63
  # @option opts [Boolean] :mark_reviewed Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
62
64
  # @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60;
63
65
  # @option opts [String] :translation_key_prefix This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.
@@ -114,6 +116,7 @@ module Phrase
114
116
  form_params['locale_mapping'] = opts[:'locale_mapping'] if !opts[:'locale_mapping'].nil?
115
117
  form_params['format_options'] = opts[:'format_options'] if !opts[:'format_options'].nil?
116
118
  form_params['autotranslate'] = opts[:'autotranslate'] if !opts[:'autotranslate'].nil?
119
+ form_params['verify_mentioned_translations'] = opts[:'verify_mentioned_translations'] if !opts[:'verify_mentioned_translations'].nil?
117
120
  form_params['mark_reviewed'] = opts[:'mark_reviewed'] if !opts[:'mark_reviewed'].nil?
118
121
  form_params['tag_only_affected_keys'] = opts[:'tag_only_affected_keys'] if !opts[:'tag_only_affected_keys'].nil?
119
122
  form_params['translation_key_prefix'] = opts[:'translation_key_prefix'] if !opts[:'translation_key_prefix'].nil?
@@ -1,41 +1,21 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class CommentsListParameters
5
- # Specify the branch to use
4
+ class TranslationUnreviewParameters
5
+ # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Search query for comment messages
9
- attr_accessor :query
10
-
11
- # Search comments by their assigned locales
12
- attr_accessor :locale_ids
13
-
14
- # Specify filters to find comments by
15
- attr_accessor :filters
16
-
17
- # Specify ordering of comments
18
- attr_accessor :order
19
-
20
8
  # Attribute mapping from ruby-style variable name to JSON key.
21
9
  def self.attribute_map
22
10
  {
23
- :'branch' => :'branch',
24
- :'query' => :'query',
25
- :'locale_ids' => :'locale_ids',
26
- :'filters' => :'filters',
27
- :'order' => :'order'
11
+ :'branch' => :'branch'
28
12
  }
29
13
  end
30
14
 
31
15
  # Attribute type mapping.
32
16
  def self.openapi_types
33
17
  {
34
- :'branch' => :'String',
35
- :'query' => :'String',
36
- :'locale_ids' => :'Array<String>',
37
- :'filters' => :'Array<String>',
38
- :'order' => :'String'
18
+ :'branch' => :'String'
39
19
  }
40
20
  end
41
21
 
@@ -49,13 +29,13 @@ module Phrase
49
29
  # @param [Hash] attributes Model attributes in the form of hash
50
30
  def initialize(attributes = {})
51
31
  if (!attributes.is_a?(Hash))
52
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CommentsListParameters` initialize method"
32
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::TranslationUnreviewParameters` initialize method"
53
33
  end
54
34
 
55
35
  # check to see if the attribute exists and convert string to symbol for hash key
56
36
  attributes = attributes.each_with_object({}) { |(k, v), h|
57
37
  if (!self.class.attribute_map.key?(k.to_sym))
58
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CommentsListParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
38
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::TranslationUnreviewParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
39
  end
60
40
  h[k.to_sym] = v
61
41
  }
@@ -63,26 +43,6 @@ module Phrase
63
43
  if attributes.key?(:'branch')
64
44
  self.branch = attributes[:'branch']
65
45
  end
66
-
67
- if attributes.key?(:'query')
68
- self.query = attributes[:'query']
69
- end
70
-
71
- if attributes.key?(:'locale_ids')
72
- if (value = attributes[:'locale_ids']).is_a?(Array)
73
- self.locale_ids = value
74
- end
75
- end
76
-
77
- if attributes.key?(:'filters')
78
- if (value = attributes[:'filters']).is_a?(Array)
79
- self.filters = value
80
- end
81
- end
82
-
83
- if attributes.key?(:'order')
84
- self.order = attributes[:'order']
85
- end
86
46
  end
87
47
 
88
48
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -103,11 +63,7 @@ module Phrase
103
63
  def ==(o)
104
64
  return true if self.equal?(o)
105
65
  self.class == o.class &&
106
- branch == o.branch &&
107
- query == o.query &&
108
- locale_ids == o.locale_ids &&
109
- filters == o.filters &&
110
- order == o.order
66
+ branch == o.branch
111
67
  end
112
68
 
113
69
  # @see the `==` method
@@ -119,7 +75,7 @@ module Phrase
119
75
  # Calculates hash code according to all attributes.
120
76
  # @return [Integer] Hash code
121
77
  def hash
122
- [branch, query, locale_ids, filters, order].hash
78
+ [branch].hash
123
79
  end
124
80
 
125
81
  # Builds the object from hash
@@ -1,26 +1,18 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class RepliesListParameters
5
- # Specify the branch to use
4
+ class TranslationsUnreviewParameters
5
+ # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Search query for comment messages
9
- attr_accessor :query
10
-
11
- # Specify filters to find comments by
12
- attr_accessor :filters
13
-
14
- # Specify ordering of comments
15
- attr_accessor :order
8
+ # Specify a query to find translations by content (including wildcards).<br><br> <i>Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).</i><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
9
+ attr_accessor :q
16
10
 
17
11
  # Attribute mapping from ruby-style variable name to JSON key.
18
12
  def self.attribute_map
19
13
  {
20
14
  :'branch' => :'branch',
21
- :'query' => :'query',
22
- :'filters' => :'filters',
23
- :'order' => :'order'
15
+ :'q' => :'q'
24
16
  }
25
17
  end
26
18
 
@@ -28,9 +20,7 @@ module Phrase
28
20
  def self.openapi_types
29
21
  {
30
22
  :'branch' => :'String',
31
- :'query' => :'String',
32
- :'filters' => :'Array<String>',
33
- :'order' => :'String'
23
+ :'q' => :'String'
34
24
  }
35
25
  end
36
26
 
@@ -44,13 +34,13 @@ module Phrase
44
34
  # @param [Hash] attributes Model attributes in the form of hash
45
35
  def initialize(attributes = {})
46
36
  if (!attributes.is_a?(Hash))
47
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::RepliesListParameters` initialize method"
37
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::TranslationsUnreviewParameters` initialize method"
48
38
  end
49
39
 
50
40
  # check to see if the attribute exists and convert string to symbol for hash key
51
41
  attributes = attributes.each_with_object({}) { |(k, v), h|
52
42
  if (!self.class.attribute_map.key?(k.to_sym))
53
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::RepliesListParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
43
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::TranslationsUnreviewParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
44
  end
55
45
  h[k.to_sym] = v
56
46
  }
@@ -59,18 +49,8 @@ module Phrase
59
49
  self.branch = attributes[:'branch']
60
50
  end
61
51
 
62
- if attributes.key?(:'query')
63
- self.query = attributes[:'query']
64
- end
65
-
66
- if attributes.key?(:'filters')
67
- if (value = attributes[:'filters']).is_a?(Array)
68
- self.filters = value
69
- end
70
- end
71
-
72
- if attributes.key?(:'order')
73
- self.order = attributes[:'order']
52
+ if attributes.key?(:'q')
53
+ self.q = attributes[:'q']
74
54
  end
75
55
  end
76
56
 
@@ -93,9 +73,7 @@ module Phrase
93
73
  return true if self.equal?(o)
94
74
  self.class == o.class &&
95
75
  branch == o.branch &&
96
- query == o.query &&
97
- filters == o.filters &&
98
- order == o.order
76
+ q == o.q
99
77
  end
100
78
 
101
79
  # @see the `==` method
@@ -107,7 +85,7 @@ module Phrase
107
85
  # Calculates hash code according to all attributes.
108
86
  # @return [Integer] Hash code
109
87
  def hash
110
- [branch, query, filters, order].hash
88
+ [branch, q].hash
111
89
  end
112
90
 
113
91
  # Builds the object from hash
@@ -18,6 +18,10 @@ module Phrase
18
18
 
19
19
  attr_accessor :translation_keys_ignored
20
20
 
21
+ attr_accessor :processed_translations
22
+
23
+ attr_accessor :upload_total_translations
24
+
21
25
  # Attribute mapping from ruby-style variable name to JSON key.
22
26
  def self.attribute_map
23
27
  {
@@ -28,7 +32,9 @@ module Phrase
28
32
  :'translations_created' => :'translations_created',
29
33
  :'translations_updated' => :'translations_updated',
30
34
  :'tags_created' => :'tags_created',
31
- :'translation_keys_ignored' => :'translation_keys_ignored'
35
+ :'translation_keys_ignored' => :'translation_keys_ignored',
36
+ :'processed_translations' => :'processed_translations',
37
+ :'upload_total_translations' => :'upload_total_translations'
32
38
  }
33
39
  end
34
40
 
@@ -42,7 +48,9 @@ module Phrase
42
48
  :'translations_created' => :'Integer',
43
49
  :'translations_updated' => :'Integer',
44
50
  :'tags_created' => :'Integer',
45
- :'translation_keys_ignored' => :'Integer'
51
+ :'translation_keys_ignored' => :'Integer',
52
+ :'processed_translations' => :'Integer',
53
+ :'upload_total_translations' => :'Integer'
46
54
  }
47
55
  end
48
56
 
@@ -98,6 +106,14 @@ module Phrase
98
106
  if attributes.key?(:'translation_keys_ignored')
99
107
  self.translation_keys_ignored = attributes[:'translation_keys_ignored']
100
108
  end
109
+
110
+ if attributes.key?(:'processed_translations')
111
+ self.processed_translations = attributes[:'processed_translations']
112
+ end
113
+
114
+ if attributes.key?(:'upload_total_translations')
115
+ self.upload_total_translations = attributes[:'upload_total_translations']
116
+ end
101
117
  end
102
118
 
103
119
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -125,7 +141,9 @@ module Phrase
125
141
  translations_created == o.translations_created &&
126
142
  translations_updated == o.translations_updated &&
127
143
  tags_created == o.tags_created &&
128
- translation_keys_ignored == o.translation_keys_ignored
144
+ translation_keys_ignored == o.translation_keys_ignored &&
145
+ processed_translations == o.processed_translations &&
146
+ upload_total_translations == o.upload_total_translations
129
147
  end
130
148
 
131
149
  # @see the `==` method
@@ -137,7 +155,7 @@ module Phrase
137
155
  # Calculates hash code according to all attributes.
138
156
  # @return [Integer] Hash code
139
157
  def hash
140
- [locales_created, translation_keys_created, translation_keys_updated, translation_keys_unmentioned, translations_created, translations_updated, tags_created, translation_keys_ignored].hash
158
+ [locales_created, translation_keys_created, translation_keys_updated, translation_keys_unmentioned, translations_created, translations_updated, tags_created, translation_keys_ignored, processed_translations, upload_total_translations].hash
141
159
  end
142
160
 
143
161
  # Builds the object from hash
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '4.4.0'
2
+ VERSION = '4.5.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -31,7 +31,6 @@ require 'phrase/models/comment_create_parameters1'
31
31
  require 'phrase/models/comment_mark_read_parameters'
32
32
  require 'phrase/models/comment_reaction'
33
33
  require 'phrase/models/comment_update_parameters'
34
- require 'phrase/models/comments_list_parameters'
35
34
  require 'phrase/models/current_user'
36
35
  require 'phrase/models/custom_metadata_data_type'
37
36
  require 'phrase/models/custom_metadata_properties_create_parameters'
@@ -155,7 +154,6 @@ require 'phrase/models/release_preview'
155
154
  require 'phrase/models/release_trigger'
156
155
  require 'phrase/models/release_update_parameters'
157
156
  require 'phrase/models/release_update_parameters1'
158
- require 'phrase/models/replies_list_parameters'
159
157
  require 'phrase/models/repo_sync'
160
158
  require 'phrase/models/repo_sync_event'
161
159
  require 'phrase/models/screenshot'
@@ -198,6 +196,7 @@ require 'phrase/models/translation_key_details'
198
196
  require 'phrase/models/translation_order'
199
197
  require 'phrase/models/translation_parent'
200
198
  require 'phrase/models/translation_review_parameters'
199
+ require 'phrase/models/translation_unreview_parameters'
201
200
  require 'phrase/models/translation_unverify_parameters'
202
201
  require 'phrase/models/translation_update_parameters'
203
202
  require 'phrase/models/translation_verify_parameters'
@@ -207,6 +206,7 @@ require 'phrase/models/translations_exclude_parameters'
207
206
  require 'phrase/models/translations_include_parameters'
208
207
  require 'phrase/models/translations_review_parameters'
209
208
  require 'phrase/models/translations_search_parameters'
209
+ require 'phrase/models/translations_unreview_parameters'
210
210
  require 'phrase/models/translations_unverify_parameters'
211
211
  require 'phrase/models/translations_verify_parameters'
212
212
  require 'phrase/models/upload'
@@ -26,7 +26,6 @@ describe 'CommentRepliesApi' do
26
26
  # @param project_id Project ID
27
27
  # @param key_id Translation Key ID
28
28
  # @param comment_id Comment ID
29
- # @param replies_list_parameters
30
29
  # @param [Hash] opts the optional parameters
31
30
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
32
31
  # @option opts [Integer] :page Page number
@@ -136,7 +136,6 @@ describe 'CommentsApi' do
136
136
  # List all comments for a key.
137
137
  # @param project_id Project ID
138
138
  # @param key_id Translation Key ID
139
- # @param comments_list_parameters
140
139
  # @param [Hash] opts the optional parameters
141
140
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
142
141
  # @option opts [Integer] :page Page number
@@ -94,6 +94,21 @@ describe 'TranslationsApi' do
94
94
  end
95
95
  end
96
96
 
97
+ # unit tests for translation_unreview
98
+ # Unreview a translation
99
+ # Mark a reviewed translation as translated.
100
+ # @param project_id Project ID
101
+ # @param id ID
102
+ # @param translation_unreview_parameters
103
+ # @param [Hash] opts the optional parameters
104
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
105
+ # @return [TranslationDetails]
106
+ describe 'translation_unreview test' do
107
+ it 'should work' do
108
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
109
+ end
110
+ end
111
+
97
112
  # unit tests for translation_unverify
98
113
  # Mark a translation as unverified
99
114
  # Mark an existing translation as unverified.
@@ -258,6 +273,20 @@ describe 'TranslationsApi' do
258
273
  end
259
274
  end
260
275
 
276
+ # unit tests for translations_unreview_collection
277
+ # Unreview translations selected by query
278
+ # Unreview translations matching query.
279
+ # @param project_id Project ID
280
+ # @param translations_unreview_parameters
281
+ # @param [Hash] opts the optional parameters
282
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
283
+ # @return [AffectedCount]
284
+ describe 'translations_unreview_collection test' do
285
+ it 'should work' do
286
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
287
+ end
288
+ end
289
+
261
290
  # unit tests for translations_unverify_collection
262
291
  # Unverify translations by query
263
292
  # Mark translations matching query as unverified.
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::TranslationUnreviewParameters
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'TranslationUnreviewParameters' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::TranslationUnreviewParameters.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of TranslationUnreviewParameters' do
19
+ it 'should create an instance of TranslationUnreviewParameters' do
20
+ expect(@instance).to be_instance_of(Phrase::TranslationUnreviewParameters)
21
+ end
22
+ end
23
+ describe 'test attribute "branch"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ end
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::TranslationsUnreviewParameters
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'TranslationsUnreviewParameters' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::TranslationsUnreviewParameters.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of TranslationsUnreviewParameters' do
19
+ it 'should create an instance of TranslationsUnreviewParameters' do
20
+ expect(@instance).to be_instance_of(Phrase::TranslationsUnreviewParameters)
21
+ end
22
+ end
23
+ describe 'test attribute "branch"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "q"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ end
@@ -68,4 +68,16 @@ describe 'UploadSummary' do
68
68
  end
69
69
  end
70
70
 
71
+ describe 'test attribute "processed_translations"' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
77
+ describe 'test attribute "upload_total_translations"' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
71
83
  end