phrase 3.7.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +63 -0
- data/README.md +13 -37
- data/docs/JobCommentCreateParameters.md +3 -1
- data/docs/JobCommentUpdateParameters.md +3 -1
- data/docs/JobCommentsApi.md +6 -6
- data/docs/JobDetails.md +2 -0
- data/docs/JobKeysDeleteParameters.md +19 -0
- data/docs/JobLocalesApi.md +6 -6
- data/docs/JobsApi.md +16 -14
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/KeysApi.md +4 -4
- data/docs/KeysExcludeParameters.md +1 -1
- data/docs/KeysIncludeParameters.md +1 -1
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/KeysTagParameters.md +1 -1
- data/docs/KeysUntagParameters.md +1 -1
- data/docs/LocalesApi.md +3 -1
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +4 -2
- data/docs/QualityPerformanceScoreApi.md +8 -8
- data/docs/QualityPerformanceScoreList200Response.md +21 -0
- data/docs/QualityPerformanceScoreList200ResponseAnyOf.md +19 -0
- data/docs/QualityPerformanceScoreList200ResponseAnyOfData.md +17 -0
- data/docs/{ProjectsQualityPerformanceScore200ResponseAnyOfDataTranslationsInner.md → QualityPerformanceScoreList200ResponseAnyOfDataTranslationsInner.md} +2 -2
- data/docs/{ProjectsQualityPerformanceScore200ResponseAnyOfErrorsInner.md → QualityPerformanceScoreList200ResponseAnyOfErrorsInner.md} +2 -2
- data/docs/{ProjectsQualityPerformanceScoreRequest.md → QualityPerformanceScoreListRequest.md} +2 -2
- data/docs/RepoSyncEvent.md +3 -3
- data/docs/RepoSyncEventsApi.md +138 -0
- data/docs/RepoSyncsApi.md +2 -132
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/Upload.md +3 -1
- data/lib/phrase/api/job_comments_api.rb +6 -6
- data/lib/phrase/api/job_locales_api.rb +6 -6
- data/lib/phrase/api/jobs_api.rb +24 -16
- data/lib/phrase/api/keys_api.rb +4 -4
- data/lib/phrase/api/locales_api.rb +3 -0
- data/lib/phrase/api/quality_performance_score_api.rb +15 -15
- data/lib/phrase/api/repo_sync_events_api.rb +160 -0
- data/lib/phrase/api/repo_syncs_api.rb +4 -154
- data/lib/phrase/models/job_comment_create_parameters.rb +14 -4
- data/lib/phrase/models/job_comment_update_parameters.rb +14 -4
- data/lib/phrase/models/job_details.rb +10 -1
- data/lib/phrase/models/job_keys_delete_parameters.rb +214 -0
- data/lib/phrase/models/keys_exclude_parameters.rb +1 -1
- data/lib/phrase/models/keys_include_parameters.rb +1 -1
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/keys_tag_parameters.rb +1 -1
- data/lib/phrase/models/keys_untag_parameters.rb +1 -1
- data/lib/phrase/models/project_update_parameters.rb +48 -4
- data/lib/phrase/models/{projects_quality_performance_score200_response.rb → quality_performance_score_list200_response.rb} +6 -6
- data/lib/phrase/models/{projects_quality_performance_score200_response_any_of.rb → quality_performance_score_list200_response_any_of.rb} +5 -5
- data/lib/phrase/models/{projects_quality_performance_score200_response_any_of_data.rb → quality_performance_score_list200_response_any_of_data.rb} +4 -4
- data/lib/phrase/models/{projects_quality_performance_score200_response_any_of_data_translations_inner.rb → quality_performance_score_list200_response_any_of_data_translations_inner.rb} +3 -3
- data/lib/phrase/models/{projects_quality_performance_score200_response_any_of_errors_inner.rb → quality_performance_score_list200_response_any_of_errors_inner.rb} +3 -3
- data/lib/phrase/models/{projects_quality_performance_score_request.rb → quality_performance_score_list_request.rb} +3 -3
- data/lib/phrase/models/repo_sync_event.rb +15 -15
- data/lib/phrase/models/upload.rb +14 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +8 -22
- data/spec/api/job_comments_api_spec.rb +3 -3
- data/spec/api/job_locales_api_spec.rb +3 -3
- data/spec/api/jobs_api_spec.rb +6 -5
- data/spec/api/keys_api_spec.rb +2 -2
- data/spec/api/quality_performance_score_api_spec.rb +4 -4
- data/spec/api/repo_sync_events_api_spec.rb +52 -0
- data/spec/api/repo_syncs_api_spec.rb +2 -31
- data/spec/models/job_comment_create_parameters_spec.rb +6 -0
- data/spec/models/job_comment_update_parameters_spec.rb +6 -0
- data/spec/models/job_details_spec.rb +6 -0
- data/spec/models/{gitlab_sync_export_spec.rb → job_keys_delete_parameters_spec.rb} +8 -8
- data/spec/models/project_update_parameters_spec.rb +10 -0
- data/spec/models/quality_performance_score_list200_response_any_of_data_spec.rb +29 -0
- data/spec/models/{projects_quality_performance_score200_response_any_of_data_translations_inner_spec.rb → quality_performance_score_list200_response_any_of_data_translations_inner_spec.rb} +6 -6
- data/spec/models/{projects_quality_performance_score200_response_any_of_errors_inner_spec.rb → quality_performance_score_list200_response_any_of_errors_inner_spec.rb} +6 -6
- data/spec/models/{projects_quality_performance_score200_response_any_of_spec.rb → quality_performance_score_list200_response_any_of_spec.rb} +6 -6
- data/spec/models/{projects_quality_performance_score200_response_spec.rb → quality_performance_score_list200_response_spec.rb} +6 -6
- data/spec/models/{projects_quality_performance_score_request_spec.rb → quality_performance_score_list_request_spec.rb} +6 -6
- data/spec/models/repo_sync_event_spec.rb +2 -2
- data/spec/models/upload_spec.rb +6 -0
- metadata +265 -321
- data/docs/BitbucketSync.md +0 -27
- data/docs/BitbucketSyncApi.md +0 -197
- data/docs/BitbucketSyncExportParameters.md +0 -17
- data/docs/BitbucketSyncExportResponse.md +0 -17
- data/docs/BitbucketSyncImportParameters.md +0 -17
- data/docs/GitHubSyncApi.md +0 -130
- data/docs/GitLabSyncApi.md +0 -463
- data/docs/GithubSyncExportParameters.md +0 -17
- data/docs/GithubSyncImportParameters.md +0 -17
- data/docs/GitlabSync.md +0 -37
- data/docs/GitlabSyncExport.md +0 -19
- data/docs/GitlabSyncExportParameters.md +0 -17
- data/docs/GitlabSyncHistory.md +0 -25
- data/docs/GitlabSyncHistoryErrorsInner.md +0 -19
- data/docs/GitlabSyncImportParameters.md +0 -17
- data/docs/ProjectsQualityPerformanceScore200Response.md +0 -21
- data/docs/ProjectsQualityPerformanceScore200ResponseAnyOf.md +0 -19
- data/docs/ProjectsQualityPerformanceScore200ResponseAnyOfData.md +0 -17
- data/docs/RepoSyncEventErrorsInner.md +0 -16
- data/lib/phrase/api/bitbucket_sync_api.rb +0 -219
- data/lib/phrase/api/git_hub_sync_api.rb +0 -146
- data/lib/phrase/api/git_lab_sync_api.rb +0 -510
- data/lib/phrase/models/bitbucket_sync.rb +0 -243
- data/lib/phrase/models/bitbucket_sync_export_parameters.rb +0 -197
- data/lib/phrase/models/bitbucket_sync_export_response.rb +0 -196
- data/lib/phrase/models/bitbucket_sync_import_parameters.rb +0 -197
- data/lib/phrase/models/github_sync_export_parameters.rb +0 -197
- data/lib/phrase/models/github_sync_import_parameters.rb +0 -197
- data/lib/phrase/models/gitlab_sync.rb +0 -286
- data/lib/phrase/models/gitlab_sync_export.rb +0 -205
- data/lib/phrase/models/gitlab_sync_export_parameters.rb +0 -197
- data/lib/phrase/models/gitlab_sync_history.rb +0 -234
- data/lib/phrase/models/gitlab_sync_history_errors_inner.rb +0 -205
- data/lib/phrase/models/gitlab_sync_import_parameters.rb +0 -197
- data/lib/phrase/models/repo_sync_event_errors_inner.rb +0 -207
- data/spec/api/bitbucket_sync_api_spec.rb +0 -64
- data/spec/api/git_hub_sync_api_spec.rb +0 -49
- data/spec/api/git_lab_sync_api_spec.rb +0 -125
- data/spec/models/bitbucket_sync_export_parameters_spec.rb +0 -29
- data/spec/models/bitbucket_sync_export_response_spec.rb +0 -29
- data/spec/models/bitbucket_sync_import_parameters_spec.rb +0 -29
- data/spec/models/bitbucket_sync_spec.rb +0 -59
- data/spec/models/github_sync_export_parameters_spec.rb +0 -29
- data/spec/models/github_sync_import_parameters_spec.rb +0 -29
- data/spec/models/gitlab_sync_export_parameters_spec.rb +0 -29
- data/spec/models/gitlab_sync_history_errors_inner_spec.rb +0 -35
- data/spec/models/gitlab_sync_history_spec.rb +0 -53
- data/spec/models/gitlab_sync_import_parameters_spec.rb +0 -29
- data/spec/models/gitlab_sync_spec.rb +0 -89
- data/spec/models/projects_quality_performance_score200_response_any_of_data_spec.rb +0 -29
- data/spec/models/repo_sync_event_errors_inner_spec.rb +0 -23
@@ -68,6 +68,31 @@ module Phrase
|
|
68
68
|
# (Optional) Requires autotranslate_enabled to be true
|
69
69
|
attr_accessor :autotranslate_use_translation_memory
|
70
70
|
|
71
|
+
# (Optional) Sets the default encoding for Uploads. If you leave it empty, we will try to guess it automatically for you when you Upload a file. You can still override this value by setting the <a href='#post-/projects/-project_id-/uploads'>`file_encoding`</a> parameter for Uploads.
|
72
|
+
attr_accessor :default_encoding
|
73
|
+
|
74
|
+
class EnumAttributeValidator
|
75
|
+
attr_reader :datatype
|
76
|
+
attr_reader :allowable_values
|
77
|
+
|
78
|
+
def initialize(datatype, allowable_values)
|
79
|
+
@allowable_values = allowable_values.map do |value|
|
80
|
+
case datatype.to_s
|
81
|
+
when /Integer/i
|
82
|
+
value.to_i
|
83
|
+
when /Float/i
|
84
|
+
value.to_f
|
85
|
+
else
|
86
|
+
value
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def valid?(value)
|
92
|
+
!value || allowable_values.include?(value)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
71
96
|
# Attribute mapping from ruby-style variable name to JSON key.
|
72
97
|
def self.attribute_map
|
73
98
|
{
|
@@ -92,7 +117,8 @@ module Phrase
|
|
92
117
|
:'autotranslate_check_new_locales' => :'autotranslate_check_new_locales',
|
93
118
|
:'autotranslate_mark_as_unverified' => :'autotranslate_mark_as_unverified',
|
94
119
|
:'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
|
95
|
-
:'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory'
|
120
|
+
:'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
|
121
|
+
:'default_encoding' => :'default_encoding'
|
96
122
|
}
|
97
123
|
end
|
98
124
|
|
@@ -120,7 +146,8 @@ module Phrase
|
|
120
146
|
:'autotranslate_check_new_locales' => :'Boolean',
|
121
147
|
:'autotranslate_mark_as_unverified' => :'Boolean',
|
122
148
|
:'autotranslate_use_machine_translation' => :'Boolean',
|
123
|
-
:'autotranslate_use_translation_memory' => :'Boolean'
|
149
|
+
:'autotranslate_use_translation_memory' => :'Boolean',
|
150
|
+
:'default_encoding' => :'String'
|
124
151
|
}
|
125
152
|
end
|
126
153
|
|
@@ -232,6 +259,10 @@ module Phrase
|
|
232
259
|
if attributes.key?(:'autotranslate_use_translation_memory')
|
233
260
|
self.autotranslate_use_translation_memory = attributes[:'autotranslate_use_translation_memory']
|
234
261
|
end
|
262
|
+
|
263
|
+
if attributes.key?(:'default_encoding')
|
264
|
+
self.default_encoding = attributes[:'default_encoding']
|
265
|
+
end
|
235
266
|
end
|
236
267
|
|
237
268
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -244,9 +275,21 @@ module Phrase
|
|
244
275
|
# Check to see if the all the properties in the model are valid
|
245
276
|
# @return true if the model is valid
|
246
277
|
def valid?
|
278
|
+
default_encoding_validator = EnumAttributeValidator.new('String', ["UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "ISO-8859-1"])
|
279
|
+
return false unless default_encoding_validator.valid?(@default_encoding)
|
247
280
|
true
|
248
281
|
end
|
249
282
|
|
283
|
+
# Custom attribute writer method checking allowed values (enum).
|
284
|
+
# @param [Object] default_encoding Object to be assigned
|
285
|
+
def default_encoding=(default_encoding)
|
286
|
+
validator = EnumAttributeValidator.new('String', ["UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "ISO-8859-1"])
|
287
|
+
unless validator.valid?(default_encoding)
|
288
|
+
fail ArgumentError, "invalid value for \"default_encoding\", must be one of #{validator.allowable_values}."
|
289
|
+
end
|
290
|
+
@default_encoding = default_encoding
|
291
|
+
end
|
292
|
+
|
250
293
|
# Checks equality by comparing each attribute.
|
251
294
|
# @param [Object] Object to be compared
|
252
295
|
def ==(o)
|
@@ -273,7 +316,8 @@ module Phrase
|
|
273
316
|
autotranslate_check_new_locales == o.autotranslate_check_new_locales &&
|
274
317
|
autotranslate_mark_as_unverified == o.autotranslate_mark_as_unverified &&
|
275
318
|
autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
|
276
|
-
autotranslate_use_translation_memory == o.autotranslate_use_translation_memory
|
319
|
+
autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
|
320
|
+
default_encoding == o.default_encoding
|
277
321
|
end
|
278
322
|
|
279
323
|
# @see the `==` method
|
@@ -285,7 +329,7 @@ module Phrase
|
|
285
329
|
# Calculates hash code according to all attributes.
|
286
330
|
# @return [Integer] Hash code
|
287
331
|
def hash
|
288
|
-
[account_id, name, point_of_contact, main_format, media, shares_translation_memory, project_image, remove_project_image, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory].hash
|
332
|
+
[account_id, name, point_of_contact, main_format, media, shares_translation_memory, project_image, remove_project_image, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, default_encoding].hash
|
289
333
|
end
|
290
334
|
|
291
335
|
# Builds the object from hash
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module Phrase
|
4
|
-
class
|
4
|
+
class QualityPerformanceScoreList200Response
|
5
5
|
attr_accessor :error
|
6
6
|
|
7
7
|
attr_accessor :data
|
@@ -22,8 +22,8 @@ module Phrase
|
|
22
22
|
def self.openapi_types
|
23
23
|
{
|
24
24
|
:'error' => :'ErrorError',
|
25
|
-
:'data' => :'
|
26
|
-
:'errors' => :'Array<
|
25
|
+
:'data' => :'QualityPerformanceScoreList200ResponseAnyOfData',
|
26
|
+
:'errors' => :'Array<QualityPerformanceScoreList200ResponseAnyOfErrorsInner>'
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
@@ -37,7 +37,7 @@ module Phrase
|
|
37
37
|
def self.openapi_any_of
|
38
38
|
[
|
39
39
|
:'Error',
|
40
|
-
:'
|
40
|
+
:'QualityPerformanceScoreList200ResponseAnyOf'
|
41
41
|
]
|
42
42
|
end
|
43
43
|
|
@@ -45,13 +45,13 @@ module Phrase
|
|
45
45
|
# @param [Hash] attributes Model attributes in the form of hash
|
46
46
|
def initialize(attributes = {})
|
47
47
|
if (!attributes.is_a?(Hash))
|
48
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::QualityPerformanceScoreList200Response` initialize method"
|
49
49
|
end
|
50
50
|
|
51
51
|
# check to see if the attribute exists and convert string to symbol for hash key
|
52
52
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
53
|
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::QualityPerformanceScoreList200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
55
|
end
|
56
56
|
h[k.to_sym] = v
|
57
57
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module Phrase
|
4
|
-
class
|
4
|
+
class QualityPerformanceScoreList200ResponseAnyOf
|
5
5
|
attr_accessor :data
|
6
6
|
|
7
7
|
# Array of errors for any failing translation IDs
|
@@ -18,8 +18,8 @@ module Phrase
|
|
18
18
|
# Attribute type mapping.
|
19
19
|
def self.openapi_types
|
20
20
|
{
|
21
|
-
:'data' => :'
|
22
|
-
:'errors' => :'Array<
|
21
|
+
:'data' => :'QualityPerformanceScoreList200ResponseAnyOfData',
|
22
|
+
:'errors' => :'Array<QualityPerformanceScoreList200ResponseAnyOfErrorsInner>'
|
23
23
|
}
|
24
24
|
end
|
25
25
|
|
@@ -33,13 +33,13 @@ module Phrase
|
|
33
33
|
# @param [Hash] attributes Model attributes in the form of hash
|
34
34
|
def initialize(attributes = {})
|
35
35
|
if (!attributes.is_a?(Hash))
|
36
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::
|
36
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::QualityPerformanceScoreList200ResponseAnyOf` initialize method"
|
37
37
|
end
|
38
38
|
|
39
39
|
# check to see if the attribute exists and convert string to symbol for hash key
|
40
40
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
41
41
|
if (!self.class.attribute_map.key?(k.to_sym))
|
42
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::
|
42
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::QualityPerformanceScoreList200ResponseAnyOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
43
43
|
end
|
44
44
|
h[k.to_sym] = v
|
45
45
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module Phrase
|
4
|
-
class
|
4
|
+
class QualityPerformanceScoreList200ResponseAnyOfData
|
5
5
|
attr_accessor :translations
|
6
6
|
|
7
7
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -14,7 +14,7 @@ module Phrase
|
|
14
14
|
# Attribute type mapping.
|
15
15
|
def self.openapi_types
|
16
16
|
{
|
17
|
-
:'translations' => :'Array<
|
17
|
+
:'translations' => :'Array<QualityPerformanceScoreList200ResponseAnyOfDataTranslationsInner>'
|
18
18
|
}
|
19
19
|
end
|
20
20
|
|
@@ -28,13 +28,13 @@ module Phrase
|
|
28
28
|
# @param [Hash] attributes Model attributes in the form of hash
|
29
29
|
def initialize(attributes = {})
|
30
30
|
if (!attributes.is_a?(Hash))
|
31
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::
|
31
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::QualityPerformanceScoreList200ResponseAnyOfData` initialize method"
|
32
32
|
end
|
33
33
|
|
34
34
|
# check to see if the attribute exists and convert string to symbol for hash key
|
35
35
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
36
36
|
if (!self.class.attribute_map.key?(k.to_sym))
|
37
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::
|
37
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::QualityPerformanceScoreList200ResponseAnyOfData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
38
38
|
end
|
39
39
|
h[k.to_sym] = v
|
40
40
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module Phrase
|
4
|
-
class
|
4
|
+
class QualityPerformanceScoreList200ResponseAnyOfDataTranslationsInner
|
5
5
|
# Engine used for the translation scoring
|
6
6
|
attr_accessor :engine
|
7
7
|
|
@@ -39,13 +39,13 @@ module Phrase
|
|
39
39
|
# @param [Hash] attributes Model attributes in the form of hash
|
40
40
|
def initialize(attributes = {})
|
41
41
|
if (!attributes.is_a?(Hash))
|
42
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::
|
42
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::QualityPerformanceScoreList200ResponseAnyOfDataTranslationsInner` initialize method"
|
43
43
|
end
|
44
44
|
|
45
45
|
# check to see if the attribute exists and convert string to symbol for hash key
|
46
46
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
47
47
|
if (!self.class.attribute_map.key?(k.to_sym))
|
48
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::
|
48
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::QualityPerformanceScoreList200ResponseAnyOfDataTranslationsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
49
49
|
end
|
50
50
|
h[k.to_sym] = v
|
51
51
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module Phrase
|
4
|
-
class
|
4
|
+
class QualityPerformanceScoreList200ResponseAnyOfErrorsInner
|
5
5
|
attr_accessor :message
|
6
6
|
|
7
7
|
attr_accessor :code
|
@@ -37,13 +37,13 @@ module Phrase
|
|
37
37
|
# @param [Hash] attributes Model attributes in the form of hash
|
38
38
|
def initialize(attributes = {})
|
39
39
|
if (!attributes.is_a?(Hash))
|
40
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::
|
40
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::QualityPerformanceScoreList200ResponseAnyOfErrorsInner` initialize method"
|
41
41
|
end
|
42
42
|
|
43
43
|
# check to see if the attribute exists and convert string to symbol for hash key
|
44
44
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
45
45
|
if (!self.class.attribute_map.key?(k.to_sym))
|
46
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::
|
46
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::QualityPerformanceScoreList200ResponseAnyOfErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
47
47
|
end
|
48
48
|
h[k.to_sym] = v
|
49
49
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module Phrase
|
4
|
-
class
|
4
|
+
class QualityPerformanceScoreListRequest
|
5
5
|
# Translation ids you want to get the quality performance score for
|
6
6
|
attr_accessor :translation_ids
|
7
7
|
|
@@ -29,13 +29,13 @@ module Phrase
|
|
29
29
|
# @param [Hash] attributes Model attributes in the form of hash
|
30
30
|
def initialize(attributes = {})
|
31
31
|
if (!attributes.is_a?(Hash))
|
32
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::
|
32
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::QualityPerformanceScoreListRequest` initialize method"
|
33
33
|
end
|
34
34
|
|
35
35
|
# check to see if the attribute exists and convert string to symbol for hash key
|
36
36
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
37
37
|
if (!self.class.attribute_map.key?(k.to_sym))
|
38
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::
|
38
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::QualityPerformanceScoreListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
39
39
|
end
|
40
40
|
h[k.to_sym] = v
|
41
41
|
}
|
@@ -4,7 +4,7 @@ module Phrase
|
|
4
4
|
class RepoSyncEvent
|
5
5
|
attr_accessor :id
|
6
6
|
|
7
|
-
attr_accessor :
|
7
|
+
attr_accessor :type
|
8
8
|
|
9
9
|
attr_accessor :created_at
|
10
10
|
|
@@ -45,7 +45,7 @@ module Phrase
|
|
45
45
|
def self.attribute_map
|
46
46
|
{
|
47
47
|
:'id' => :'id',
|
48
|
-
:'
|
48
|
+
:'type' => :'type',
|
49
49
|
:'created_at' => :'created_at',
|
50
50
|
:'status' => :'status',
|
51
51
|
:'pull_request_url' => :'pull_request_url',
|
@@ -58,12 +58,12 @@ module Phrase
|
|
58
58
|
def self.openapi_types
|
59
59
|
{
|
60
60
|
:'id' => :'String',
|
61
|
-
:'
|
61
|
+
:'type' => :'String',
|
62
62
|
:'created_at' => :'DateTime',
|
63
63
|
:'status' => :'String',
|
64
64
|
:'pull_request_url' => :'String',
|
65
65
|
:'auto_import' => :'Boolean',
|
66
|
-
:'errors' => :'Array<
|
66
|
+
:'errors' => :'Array<String>'
|
67
67
|
}
|
68
68
|
end
|
69
69
|
|
@@ -92,8 +92,8 @@ module Phrase
|
|
92
92
|
self.id = attributes[:'id']
|
93
93
|
end
|
94
94
|
|
95
|
-
if attributes.key?(:'
|
96
|
-
self.
|
95
|
+
if attributes.key?(:'type')
|
96
|
+
self.type = attributes[:'type']
|
97
97
|
end
|
98
98
|
|
99
99
|
if attributes.key?(:'created_at')
|
@@ -129,21 +129,21 @@ module Phrase
|
|
129
129
|
# Check to see if the all the properties in the model are valid
|
130
130
|
# @return true if the model is valid
|
131
131
|
def valid?
|
132
|
-
|
133
|
-
return false unless
|
132
|
+
type_validator = EnumAttributeValidator.new('String', ["import", "export"])
|
133
|
+
return false unless type_validator.valid?(@type)
|
134
134
|
status_validator = EnumAttributeValidator.new('String', ["running", "success", "failure"])
|
135
135
|
return false unless status_validator.valid?(@status)
|
136
136
|
true
|
137
137
|
end
|
138
138
|
|
139
139
|
# Custom attribute writer method checking allowed values (enum).
|
140
|
-
# @param [Object]
|
141
|
-
def
|
140
|
+
# @param [Object] type Object to be assigned
|
141
|
+
def type=(type)
|
142
142
|
validator = EnumAttributeValidator.new('String', ["import", "export"])
|
143
|
-
unless validator.valid?(
|
144
|
-
fail ArgumentError, "invalid value for \"
|
143
|
+
unless validator.valid?(type)
|
144
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
145
145
|
end
|
146
|
-
@
|
146
|
+
@type = type
|
147
147
|
end
|
148
148
|
|
149
149
|
# Custom attribute writer method checking allowed values (enum).
|
@@ -162,7 +162,7 @@ module Phrase
|
|
162
162
|
return true if self.equal?(o)
|
163
163
|
self.class == o.class &&
|
164
164
|
id == o.id &&
|
165
|
-
|
165
|
+
type == o.type &&
|
166
166
|
created_at == o.created_at &&
|
167
167
|
status == o.status &&
|
168
168
|
pull_request_url == o.pull_request_url &&
|
@@ -179,7 +179,7 @@ module Phrase
|
|
179
179
|
# Calculates hash code according to all attributes.
|
180
180
|
# @return [Integer] Hash code
|
181
181
|
def hash
|
182
|
-
[id,
|
182
|
+
[id, type, created_at, status, pull_request_url, auto_import, errors].hash
|
183
183
|
end
|
184
184
|
|
185
185
|
# Builds the object from hash
|
data/lib/phrase/models/upload.rb
CHANGED
@@ -10,8 +10,12 @@ module Phrase
|
|
10
10
|
|
11
11
|
attr_accessor :state
|
12
12
|
|
13
|
+
# Unique tag of the upload
|
13
14
|
attr_accessor :tag
|
14
15
|
|
16
|
+
# List of tags that were assigned to the uploaded keys
|
17
|
+
attr_accessor :tags
|
18
|
+
|
15
19
|
# The URL to the upload in Phrase Strings app.
|
16
20
|
attr_accessor :url
|
17
21
|
|
@@ -29,6 +33,7 @@ module Phrase
|
|
29
33
|
:'format' => :'format',
|
30
34
|
:'state' => :'state',
|
31
35
|
:'tag' => :'tag',
|
36
|
+
:'tags' => :'tags',
|
32
37
|
:'url' => :'url',
|
33
38
|
:'summary' => :'summary',
|
34
39
|
:'created_at' => :'created_at',
|
@@ -44,6 +49,7 @@ module Phrase
|
|
44
49
|
:'format' => :'String',
|
45
50
|
:'state' => :'String',
|
46
51
|
:'tag' => :'String',
|
52
|
+
:'tags' => :'Array<String>',
|
47
53
|
:'url' => :'String',
|
48
54
|
:'summary' => :'UploadSummary',
|
49
55
|
:'created_at' => :'DateTime',
|
@@ -92,6 +98,12 @@ module Phrase
|
|
92
98
|
self.tag = attributes[:'tag']
|
93
99
|
end
|
94
100
|
|
101
|
+
if attributes.key?(:'tags')
|
102
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
103
|
+
self.tags = value
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
95
107
|
if attributes.key?(:'url')
|
96
108
|
self.url = attributes[:'url']
|
97
109
|
end
|
@@ -132,6 +144,7 @@ module Phrase
|
|
132
144
|
format == o.format &&
|
133
145
|
state == o.state &&
|
134
146
|
tag == o.tag &&
|
147
|
+
tags == o.tags &&
|
135
148
|
url == o.url &&
|
136
149
|
summary == o.summary &&
|
137
150
|
created_at == o.created_at &&
|
@@ -147,7 +160,7 @@ module Phrase
|
|
147
160
|
# Calculates hash code according to all attributes.
|
148
161
|
# @return [Integer] Hash code
|
149
162
|
def hash
|
150
|
-
[id, filename, format, state, tag, url, summary, created_at, updated_at].hash
|
163
|
+
[id, filename, format, state, tag, tags, url, summary, created_at, updated_at].hash
|
151
164
|
end
|
152
165
|
|
153
166
|
# Builds the object from hash
|
data/lib/phrase/version.rb
CHANGED
data/lib/phrase.rb
CHANGED
@@ -17,10 +17,6 @@ require 'phrase/models/authorization'
|
|
17
17
|
require 'phrase/models/authorization_create_parameters'
|
18
18
|
require 'phrase/models/authorization_update_parameters'
|
19
19
|
require 'phrase/models/authorization_with_token'
|
20
|
-
require 'phrase/models/bitbucket_sync'
|
21
|
-
require 'phrase/models/bitbucket_sync_export_parameters'
|
22
|
-
require 'phrase/models/bitbucket_sync_export_response'
|
23
|
-
require 'phrase/models/bitbucket_sync_import_parameters'
|
24
20
|
require 'phrase/models/blacklisted_key'
|
25
21
|
require 'phrase/models/blacklisted_key_create_parameters'
|
26
22
|
require 'phrase/models/blacklisted_key_update_parameters'
|
@@ -54,14 +50,6 @@ require 'phrase/models/figma_attachment'
|
|
54
50
|
require 'phrase/models/figma_attachment_create_parameters'
|
55
51
|
require 'phrase/models/figma_attachment_update_parameters'
|
56
52
|
require 'phrase/models/format'
|
57
|
-
require 'phrase/models/github_sync_export_parameters'
|
58
|
-
require 'phrase/models/github_sync_import_parameters'
|
59
|
-
require 'phrase/models/gitlab_sync'
|
60
|
-
require 'phrase/models/gitlab_sync_export'
|
61
|
-
require 'phrase/models/gitlab_sync_export_parameters'
|
62
|
-
require 'phrase/models/gitlab_sync_history'
|
63
|
-
require 'phrase/models/gitlab_sync_history_errors_inner'
|
64
|
-
require 'phrase/models/gitlab_sync_import_parameters'
|
65
53
|
require 'phrase/models/glossary'
|
66
54
|
require 'phrase/models/glossary_create_parameters'
|
67
55
|
require 'phrase/models/glossary_term'
|
@@ -85,6 +73,7 @@ require 'phrase/models/job_complete_parameters'
|
|
85
73
|
require 'phrase/models/job_create_parameters'
|
86
74
|
require 'phrase/models/job_details'
|
87
75
|
require 'phrase/models/job_keys_create_parameters'
|
76
|
+
require 'phrase/models/job_keys_delete_parameters'
|
88
77
|
require 'phrase/models/job_locale'
|
89
78
|
require 'phrase/models/job_locale_complete_parameters'
|
90
79
|
require 'phrase/models/job_locale_complete_review_parameters'
|
@@ -153,12 +142,12 @@ require 'phrase/models/project_locales'
|
|
153
142
|
require 'phrase/models/project_report'
|
154
143
|
require 'phrase/models/project_short'
|
155
144
|
require 'phrase/models/project_update_parameters'
|
156
|
-
require 'phrase/models/
|
157
|
-
require 'phrase/models/
|
158
|
-
require 'phrase/models/
|
159
|
-
require 'phrase/models/
|
160
|
-
require 'phrase/models/
|
161
|
-
require 'phrase/models/
|
145
|
+
require 'phrase/models/quality_performance_score_list200_response'
|
146
|
+
require 'phrase/models/quality_performance_score_list200_response_any_of'
|
147
|
+
require 'phrase/models/quality_performance_score_list200_response_any_of_data'
|
148
|
+
require 'phrase/models/quality_performance_score_list200_response_any_of_data_translations_inner'
|
149
|
+
require 'phrase/models/quality_performance_score_list200_response_any_of_errors_inner'
|
150
|
+
require 'phrase/models/quality_performance_score_list_request'
|
162
151
|
require 'phrase/models/release'
|
163
152
|
require 'phrase/models/release_create_parameters'
|
164
153
|
require 'phrase/models/release_create_parameters1'
|
@@ -169,7 +158,6 @@ require 'phrase/models/release_update_parameters1'
|
|
169
158
|
require 'phrase/models/replies_list_parameters'
|
170
159
|
require 'phrase/models/repo_sync'
|
171
160
|
require 'phrase/models/repo_sync_event'
|
172
|
-
require 'phrase/models/repo_sync_event_errors_inner'
|
173
161
|
require 'phrase/models/screenshot'
|
174
162
|
require 'phrase/models/screenshot_marker'
|
175
163
|
require 'phrase/models/screenshot_marker_create_parameters'
|
@@ -236,7 +224,6 @@ require 'phrase/models/webhook_update_parameters'
|
|
236
224
|
# APIs
|
237
225
|
require 'phrase/api/accounts_api'
|
238
226
|
require 'phrase/api/authorizations_api'
|
239
|
-
require 'phrase/api/bitbucket_sync_api'
|
240
227
|
require 'phrase/api/blacklisted_keys_api'
|
241
228
|
require 'phrase/api/branches_api'
|
242
229
|
require 'phrase/api/comment_reactions_api'
|
@@ -247,8 +234,6 @@ require 'phrase/api/distributions_api'
|
|
247
234
|
require 'phrase/api/documents_api'
|
248
235
|
require 'phrase/api/figma_attachments_api'
|
249
236
|
require 'phrase/api/formats_api'
|
250
|
-
require 'phrase/api/git_hub_sync_api'
|
251
|
-
require 'phrase/api/git_lab_sync_api'
|
252
237
|
require 'phrase/api/glossaries_api'
|
253
238
|
require 'phrase/api/glossary_term_translations_api'
|
254
239
|
require 'phrase/api/glossary_terms_api'
|
@@ -274,6 +259,7 @@ require 'phrase/api/projects_api'
|
|
274
259
|
require 'phrase/api/quality_performance_score_api'
|
275
260
|
require 'phrase/api/release_triggers_api'
|
276
261
|
require 'phrase/api/releases_api'
|
262
|
+
require 'phrase/api/repo_sync_events_api'
|
277
263
|
require 'phrase/api/repo_syncs_api'
|
278
264
|
require 'phrase/api/reports_api'
|
279
265
|
require 'phrase/api/screenshot_markers_api'
|
@@ -43,7 +43,7 @@ describe 'JobCommentsApi' do
|
|
43
43
|
# @param id ID
|
44
44
|
# @param [Hash] opts the optional parameters
|
45
45
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
46
|
-
# @option opts [String] :branch
|
46
|
+
# @option opts [String] :branch Branch to use
|
47
47
|
# @return [nil]
|
48
48
|
describe 'job_comment_delete test' do
|
49
49
|
it 'should work' do
|
@@ -59,7 +59,7 @@ describe 'JobCommentsApi' do
|
|
59
59
|
# @param id ID
|
60
60
|
# @param [Hash] opts the optional parameters
|
61
61
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
62
|
-
# @option opts [String] :branch
|
62
|
+
# @option opts [String] :branch Branch to use
|
63
63
|
# @return [JobComment]
|
64
64
|
describe 'job_comment_show test' do
|
65
65
|
it 'should work' do
|
@@ -90,7 +90,7 @@ describe 'JobCommentsApi' do
|
|
90
90
|
# @param job_id Job ID
|
91
91
|
# @param [Hash] opts the optional parameters
|
92
92
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
93
|
-
# @option opts [String] :branch
|
93
|
+
# @option opts [String] :branch Branch to use
|
94
94
|
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
95
95
|
# @return [Array<JobComment>]
|
96
96
|
describe 'job_comments_list test' do
|
@@ -60,7 +60,7 @@ describe 'JobLocalesApi' do
|
|
60
60
|
# @param id ID
|
61
61
|
# @param [Hash] opts the optional parameters
|
62
62
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
63
|
-
# @option opts [String] :branch
|
63
|
+
# @option opts [String] :branch Branch to use
|
64
64
|
# @return [nil]
|
65
65
|
describe 'job_locale_delete test' do
|
66
66
|
it 'should work' do
|
@@ -92,7 +92,7 @@ describe 'JobLocalesApi' do
|
|
92
92
|
# @param id ID
|
93
93
|
# @param [Hash] opts the optional parameters
|
94
94
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
95
|
-
# @option opts [String] :branch
|
95
|
+
# @option opts [String] :branch Branch to use
|
96
96
|
# @return [JobLocale]
|
97
97
|
describe 'job_locale_show test' do
|
98
98
|
it 'should work' do
|
@@ -140,7 +140,7 @@ describe 'JobLocalesApi' do
|
|
140
140
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
141
141
|
# @option opts [Integer] :page Page number
|
142
142
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
143
|
-
# @option opts [String] :branch
|
143
|
+
# @option opts [String] :branch Branch to use
|
144
144
|
# @return [Array<JobLocale>]
|
145
145
|
describe 'job_locales_list test' do
|
146
146
|
it 'should work' do
|
data/spec/api/jobs_api_spec.rb
CHANGED
@@ -84,10 +84,9 @@ describe 'JobsApi' do
|
|
84
84
|
# Remove multiple keys from existing job.
|
85
85
|
# @param project_id Project ID
|
86
86
|
# @param id ID
|
87
|
+
# @param job_keys_delete_parameters
|
87
88
|
# @param [Hash] opts the optional parameters
|
88
89
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
89
|
-
# @option opts [String] :branch specify the branch to use
|
90
|
-
# @option opts [Array<String>] :translation_key_ids ids of keys that should be removed from the job
|
91
90
|
# @return [nil]
|
92
91
|
describe 'job_keys_delete test' do
|
93
92
|
it 'should work' do
|
@@ -195,7 +194,8 @@ describe 'JobsApi' do
|
|
195
194
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
196
195
|
# @option opts [String] :owned_by filter by user owning job
|
197
196
|
# @option opts [String] :assigned_to filter by user assigned to job
|
198
|
-
# @option opts [String] :state filter by state of job
|
197
|
+
# @option opts [String] :state filter by state of job; valid states are: <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
198
|
+
# @option opts [String] :updated_since filter by jobs updated since given date
|
199
199
|
# @return [Array<Job>]
|
200
200
|
describe 'jobs_by_account test' do
|
201
201
|
it 'should work' do
|
@@ -211,10 +211,11 @@ describe 'JobsApi' do
|
|
211
211
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
212
212
|
# @option opts [Integer] :page Page number
|
213
213
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
214
|
-
# @option opts [String] :branch
|
214
|
+
# @option opts [String] :branch Branch to use
|
215
215
|
# @option opts [String] :owned_by filter by user owning job
|
216
216
|
# @option opts [String] :assigned_to filter by user assigned to job
|
217
|
-
# @option opts [String] :state filter by state of job
|
217
|
+
# @option opts [String] :state filter by state of job; valid states are: <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
218
|
+
# @option opts [String] :updated_since filter by jobs updated since given date
|
218
219
|
# @return [Array<Job>]
|
219
220
|
describe 'jobs_list test' do
|
220
221
|
it 'should work' do
|