phrase 3.7.0 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +63 -0
  3. data/README.md +13 -37
  4. data/docs/JobCommentCreateParameters.md +3 -1
  5. data/docs/JobCommentUpdateParameters.md +3 -1
  6. data/docs/JobCommentsApi.md +6 -6
  7. data/docs/JobDetails.md +2 -0
  8. data/docs/JobKeysDeleteParameters.md +19 -0
  9. data/docs/JobLocalesApi.md +6 -6
  10. data/docs/JobsApi.md +16 -14
  11. data/docs/KeyCreateParameters.md +1 -1
  12. data/docs/KeyUpdateParameters.md +1 -1
  13. data/docs/KeysApi.md +4 -4
  14. data/docs/KeysExcludeParameters.md +1 -1
  15. data/docs/KeysIncludeParameters.md +1 -1
  16. data/docs/KeysSearchParameters.md +1 -1
  17. data/docs/KeysTagParameters.md +1 -1
  18. data/docs/KeysUntagParameters.md +1 -1
  19. data/docs/LocalesApi.md +3 -1
  20. data/docs/ProjectCreateParameters.md +1 -1
  21. data/docs/ProjectUpdateParameters.md +4 -2
  22. data/docs/QualityPerformanceScoreApi.md +8 -8
  23. data/docs/QualityPerformanceScoreList200Response.md +21 -0
  24. data/docs/QualityPerformanceScoreList200ResponseAnyOf.md +19 -0
  25. data/docs/QualityPerformanceScoreList200ResponseAnyOfData.md +17 -0
  26. data/docs/{ProjectsQualityPerformanceScore200ResponseAnyOfDataTranslationsInner.md → QualityPerformanceScoreList200ResponseAnyOfDataTranslationsInner.md} +2 -2
  27. data/docs/{ProjectsQualityPerformanceScore200ResponseAnyOfErrorsInner.md → QualityPerformanceScoreList200ResponseAnyOfErrorsInner.md} +2 -2
  28. data/docs/{ProjectsQualityPerformanceScoreRequest.md → QualityPerformanceScoreListRequest.md} +2 -2
  29. data/docs/RepoSyncEvent.md +3 -3
  30. data/docs/RepoSyncEventsApi.md +138 -0
  31. data/docs/RepoSyncsApi.md +2 -132
  32. data/docs/ScreenshotUpdateParameters.md +1 -1
  33. data/docs/Upload.md +3 -1
  34. data/lib/phrase/api/job_comments_api.rb +6 -6
  35. data/lib/phrase/api/job_locales_api.rb +6 -6
  36. data/lib/phrase/api/jobs_api.rb +24 -16
  37. data/lib/phrase/api/keys_api.rb +4 -4
  38. data/lib/phrase/api/locales_api.rb +3 -0
  39. data/lib/phrase/api/quality_performance_score_api.rb +15 -15
  40. data/lib/phrase/api/repo_sync_events_api.rb +160 -0
  41. data/lib/phrase/api/repo_syncs_api.rb +4 -154
  42. data/lib/phrase/models/job_comment_create_parameters.rb +14 -4
  43. data/lib/phrase/models/job_comment_update_parameters.rb +14 -4
  44. data/lib/phrase/models/job_details.rb +10 -1
  45. data/lib/phrase/models/job_keys_delete_parameters.rb +214 -0
  46. data/lib/phrase/models/keys_exclude_parameters.rb +1 -1
  47. data/lib/phrase/models/keys_include_parameters.rb +1 -1
  48. data/lib/phrase/models/keys_search_parameters.rb +1 -1
  49. data/lib/phrase/models/keys_tag_parameters.rb +1 -1
  50. data/lib/phrase/models/keys_untag_parameters.rb +1 -1
  51. data/lib/phrase/models/project_update_parameters.rb +48 -4
  52. data/lib/phrase/models/{projects_quality_performance_score200_response.rb → quality_performance_score_list200_response.rb} +6 -6
  53. data/lib/phrase/models/{projects_quality_performance_score200_response_any_of.rb → quality_performance_score_list200_response_any_of.rb} +5 -5
  54. data/lib/phrase/models/{projects_quality_performance_score200_response_any_of_data.rb → quality_performance_score_list200_response_any_of_data.rb} +4 -4
  55. 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
  56. 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
  57. data/lib/phrase/models/{projects_quality_performance_score_request.rb → quality_performance_score_list_request.rb} +3 -3
  58. data/lib/phrase/models/repo_sync_event.rb +15 -15
  59. data/lib/phrase/models/upload.rb +14 -1
  60. data/lib/phrase/version.rb +1 -1
  61. data/lib/phrase.rb +8 -22
  62. data/spec/api/job_comments_api_spec.rb +3 -3
  63. data/spec/api/job_locales_api_spec.rb +3 -3
  64. data/spec/api/jobs_api_spec.rb +6 -5
  65. data/spec/api/keys_api_spec.rb +2 -2
  66. data/spec/api/quality_performance_score_api_spec.rb +4 -4
  67. data/spec/api/repo_sync_events_api_spec.rb +52 -0
  68. data/spec/api/repo_syncs_api_spec.rb +2 -31
  69. data/spec/models/job_comment_create_parameters_spec.rb +6 -0
  70. data/spec/models/job_comment_update_parameters_spec.rb +6 -0
  71. data/spec/models/job_details_spec.rb +6 -0
  72. data/spec/models/{gitlab_sync_export_spec.rb → job_keys_delete_parameters_spec.rb} +8 -8
  73. data/spec/models/project_update_parameters_spec.rb +10 -0
  74. data/spec/models/quality_performance_score_list200_response_any_of_data_spec.rb +29 -0
  75. 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
  76. 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
  77. data/spec/models/{projects_quality_performance_score200_response_any_of_spec.rb → quality_performance_score_list200_response_any_of_spec.rb} +6 -6
  78. data/spec/models/{projects_quality_performance_score200_response_spec.rb → quality_performance_score_list200_response_spec.rb} +6 -6
  79. data/spec/models/{projects_quality_performance_score_request_spec.rb → quality_performance_score_list_request_spec.rb} +6 -6
  80. data/spec/models/repo_sync_event_spec.rb +2 -2
  81. data/spec/models/upload_spec.rb +6 -0
  82. metadata +265 -321
  83. data/docs/BitbucketSync.md +0 -27
  84. data/docs/BitbucketSyncApi.md +0 -197
  85. data/docs/BitbucketSyncExportParameters.md +0 -17
  86. data/docs/BitbucketSyncExportResponse.md +0 -17
  87. data/docs/BitbucketSyncImportParameters.md +0 -17
  88. data/docs/GitHubSyncApi.md +0 -130
  89. data/docs/GitLabSyncApi.md +0 -463
  90. data/docs/GithubSyncExportParameters.md +0 -17
  91. data/docs/GithubSyncImportParameters.md +0 -17
  92. data/docs/GitlabSync.md +0 -37
  93. data/docs/GitlabSyncExport.md +0 -19
  94. data/docs/GitlabSyncExportParameters.md +0 -17
  95. data/docs/GitlabSyncHistory.md +0 -25
  96. data/docs/GitlabSyncHistoryErrorsInner.md +0 -19
  97. data/docs/GitlabSyncImportParameters.md +0 -17
  98. data/docs/ProjectsQualityPerformanceScore200Response.md +0 -21
  99. data/docs/ProjectsQualityPerformanceScore200ResponseAnyOf.md +0 -19
  100. data/docs/ProjectsQualityPerformanceScore200ResponseAnyOfData.md +0 -17
  101. data/docs/RepoSyncEventErrorsInner.md +0 -16
  102. data/lib/phrase/api/bitbucket_sync_api.rb +0 -219
  103. data/lib/phrase/api/git_hub_sync_api.rb +0 -146
  104. data/lib/phrase/api/git_lab_sync_api.rb +0 -510
  105. data/lib/phrase/models/bitbucket_sync.rb +0 -243
  106. data/lib/phrase/models/bitbucket_sync_export_parameters.rb +0 -197
  107. data/lib/phrase/models/bitbucket_sync_export_response.rb +0 -196
  108. data/lib/phrase/models/bitbucket_sync_import_parameters.rb +0 -197
  109. data/lib/phrase/models/github_sync_export_parameters.rb +0 -197
  110. data/lib/phrase/models/github_sync_import_parameters.rb +0 -197
  111. data/lib/phrase/models/gitlab_sync.rb +0 -286
  112. data/lib/phrase/models/gitlab_sync_export.rb +0 -205
  113. data/lib/phrase/models/gitlab_sync_export_parameters.rb +0 -197
  114. data/lib/phrase/models/gitlab_sync_history.rb +0 -234
  115. data/lib/phrase/models/gitlab_sync_history_errors_inner.rb +0 -205
  116. data/lib/phrase/models/gitlab_sync_import_parameters.rb +0 -197
  117. data/lib/phrase/models/repo_sync_event_errors_inner.rb +0 -207
  118. data/spec/api/bitbucket_sync_api_spec.rb +0 -64
  119. data/spec/api/git_hub_sync_api_spec.rb +0 -49
  120. data/spec/api/git_lab_sync_api_spec.rb +0 -125
  121. data/spec/models/bitbucket_sync_export_parameters_spec.rb +0 -29
  122. data/spec/models/bitbucket_sync_export_response_spec.rb +0 -29
  123. data/spec/models/bitbucket_sync_import_parameters_spec.rb +0 -29
  124. data/spec/models/bitbucket_sync_spec.rb +0 -59
  125. data/spec/models/github_sync_export_parameters_spec.rb +0 -29
  126. data/spec/models/github_sync_import_parameters_spec.rb +0 -29
  127. data/spec/models/gitlab_sync_export_parameters_spec.rb +0 -29
  128. data/spec/models/gitlab_sync_history_errors_inner_spec.rb +0 -35
  129. data/spec/models/gitlab_sync_history_spec.rb +0 -53
  130. data/spec/models/gitlab_sync_import_parameters_spec.rb +0 -29
  131. data/spec/models/gitlab_sync_spec.rb +0 -89
  132. data/spec/models/projects_quality_performance_score200_response_any_of_data_spec.rb +0 -29
  133. data/spec/models/repo_sync_event_errors_inner_spec.rb +0 -23
@@ -151,158 +151,8 @@ module Phrase
151
151
  return response, status_code, headers
152
152
  end
153
153
 
154
- # Get a single Repo Sync Event
155
- # Shows a single Repo Sync event.
156
- # @param account_id [String] Account ID
157
- # @param repo_sync_id [String] Repo Sync ID
158
- # @param id [String] ID
159
- # @param [Hash] opts the optional parameters
160
- # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
161
- # @return [RepoSyncEvent]
162
- def repo_sync_event_show(account_id, repo_sync_id, id, opts = {})
163
- data, _status_code, _headers = repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts)
164
- data
165
- end
166
-
167
- # Get a single Repo Sync Event
168
- # Shows a single Repo Sync event.
169
- # @param account_id [String] Account ID
170
- # @param repo_sync_id [String] Repo Sync ID
171
- # @param id [String] ID
172
- # @param [Hash] opts the optional parameters
173
- # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
174
- # @return [Array<(Response<(RepoSyncEvent)>, Integer, Hash)>] Response<(RepoSyncEvent)> data, response status code and response headers
175
- def repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts = {})
176
- if @api_client.config.debugging
177
- @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_event_show ...'
178
- end
179
- # verify the required parameter 'account_id' is set
180
- if @api_client.config.client_side_validation && account_id.nil?
181
- fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_event_show"
182
- end
183
- # verify the required parameter 'repo_sync_id' is set
184
- if @api_client.config.client_side_validation && repo_sync_id.nil?
185
- fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncsApi.repo_sync_event_show"
186
- end
187
- # verify the required parameter 'id' is set
188
- if @api_client.config.client_side_validation && id.nil?
189
- fail ArgumentError, "Missing the required parameter 'id' when calling RepoSyncsApi.repo_sync_event_show"
190
- end
191
- # resource path
192
- local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/events/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
193
-
194
- # query parameters
195
- query_params = opts[:query_params] || {}
196
-
197
- # header parameters
198
- header_params = opts[:header_params] || {}
199
- # HTTP header 'Accept' (if needed)
200
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
201
- header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
202
-
203
- # form parameters
204
- form_params = opts[:form_params] || {}
205
-
206
- # http body (model)
207
- post_body = opts[:body]
208
-
209
- # return_type
210
- return_type = opts[:return_type] || 'RepoSyncEvent'
211
-
212
- # auth_names
213
- auth_names = opts[:auth_names] || ['Basic', 'Token']
214
-
215
- new_options = opts.merge(
216
- :header_params => header_params,
217
- :query_params => query_params,
218
- :form_params => form_params,
219
- :body => post_body,
220
- :auth_names => auth_names,
221
- :return_type => return_type
222
- )
223
-
224
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
225
- if @api_client.config.debugging
226
- @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_event_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
227
- end
228
- response = ::Phrase::Response.new(data, headers)
229
- return response, status_code, headers
230
- end
231
-
232
- # Repository Syncs History
233
- # Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
234
- # @param account_id [String] Account ID
235
- # @param id [String] ID
236
- # @param [Hash] opts the optional parameters
237
- # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
238
- # @return [Array<RepoSyncEvent>]
239
- def repo_sync_events(account_id, id, opts = {})
240
- data, _status_code, _headers = repo_sync_events_with_http_info(account_id, id, opts)
241
- data
242
- end
243
-
244
- # Repository Syncs History
245
- # Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
246
- # @param account_id [String] Account ID
247
- # @param id [String] ID
248
- # @param [Hash] opts the optional parameters
249
- # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
250
- # @return [Array<(Response<(Array<RepoSyncEvent>)>, Integer, Hash)>] Response<(Array<RepoSyncEvent>)> data, response status code and response headers
251
- def repo_sync_events_with_http_info(account_id, id, opts = {})
252
- if @api_client.config.debugging
253
- @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_events ...'
254
- end
255
- # verify the required parameter 'account_id' is set
256
- if @api_client.config.client_side_validation && account_id.nil?
257
- fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_events"
258
- end
259
- # verify the required parameter 'id' is set
260
- if @api_client.config.client_side_validation && id.nil?
261
- fail ArgumentError, "Missing the required parameter 'id' when calling RepoSyncsApi.repo_sync_events"
262
- end
263
- # resource path
264
- local_var_path = '/accounts/{account_id}/repo_syncs/{id}/events'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
265
-
266
- # query parameters
267
- query_params = opts[:query_params] || {}
268
-
269
- # header parameters
270
- header_params = opts[:header_params] || {}
271
- # HTTP header 'Accept' (if needed)
272
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
273
- header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
274
-
275
- # form parameters
276
- form_params = opts[:form_params] || {}
277
-
278
- # http body (model)
279
- post_body = opts[:body]
280
-
281
- # return_type
282
- return_type = opts[:return_type] || 'Array<RepoSyncEvent>'
283
-
284
- # auth_names
285
- auth_names = opts[:auth_names] || ['Basic', 'Token']
286
-
287
- new_options = opts.merge(
288
- :header_params => header_params,
289
- :query_params => query_params,
290
- :form_params => form_params,
291
- :body => post_body,
292
- :auth_names => auth_names,
293
- :return_type => return_type
294
- )
295
-
296
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
297
- if @api_client.config.debugging
298
- @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
299
- end
300
- response = ::Phrase::Response.new(data, headers)
301
- return response, status_code, headers
302
- end
303
-
304
154
  # Export to code repository
305
- # > Beta: this feature will change in the future. Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
155
+ # Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
306
156
  # @param account_id [String] Account ID
307
157
  # @param id [String] ID
308
158
  # @param [Hash] opts the optional parameters
@@ -314,7 +164,7 @@ module Phrase
314
164
  end
315
165
 
316
166
  # Export to code repository
317
- # &gt; Beta: this feature will change in the future. Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
167
+ # Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
318
168
  # @param account_id [String] Account ID
319
169
  # @param id [String] ID
320
170
  # @param [Hash] opts the optional parameters
@@ -374,7 +224,7 @@ module Phrase
374
224
  end
375
225
 
376
226
  # Import from code repository
377
- # > Beta: this feature will change in the future. Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
227
+ # Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
378
228
  # @param account_id [String] Account ID
379
229
  # @param id [String] ID
380
230
  # @param [Hash] opts the optional parameters
@@ -386,7 +236,7 @@ module Phrase
386
236
  end
387
237
 
388
238
  # Import from code repository
389
- # &gt; Beta: this feature will change in the future. Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
239
+ # Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
390
240
  # @param account_id [String] Account ID
391
241
  # @param id [String] ID
392
242
  # @param [Hash] opts the optional parameters
@@ -5,17 +5,22 @@ module Phrase
5
5
  # Job comment message
6
6
  attr_accessor :message
7
7
 
8
+ # Branch name for the job
9
+ attr_accessor :branch
10
+
8
11
  # Attribute mapping from ruby-style variable name to JSON key.
9
12
  def self.attribute_map
10
13
  {
11
- :'message' => :'message'
14
+ :'message' => :'message',
15
+ :'branch' => :'branch'
12
16
  }
13
17
  end
14
18
 
15
19
  # Attribute type mapping.
16
20
  def self.openapi_types
17
21
  {
18
- :'message' => :'String'
22
+ :'message' => :'String',
23
+ :'branch' => :'String'
19
24
  }
20
25
  end
21
26
 
@@ -43,6 +48,10 @@ module Phrase
43
48
  if attributes.key?(:'message')
44
49
  self.message = attributes[:'message']
45
50
  end
51
+
52
+ if attributes.key?(:'branch')
53
+ self.branch = attributes[:'branch']
54
+ end
46
55
  end
47
56
 
48
57
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -63,7 +72,8 @@ module Phrase
63
72
  def ==(o)
64
73
  return true if self.equal?(o)
65
74
  self.class == o.class &&
66
- message == o.message
75
+ message == o.message &&
76
+ branch == o.branch
67
77
  end
68
78
 
69
79
  # @see the `==` method
@@ -75,7 +85,7 @@ module Phrase
75
85
  # Calculates hash code according to all attributes.
76
86
  # @return [Integer] Hash code
77
87
  def hash
78
- [message].hash
88
+ [message, branch].hash
79
89
  end
80
90
 
81
91
  # Builds the object from hash
@@ -5,17 +5,22 @@ module Phrase
5
5
  # Comment message
6
6
  attr_accessor :message
7
7
 
8
+ # Branch name for the job
9
+ attr_accessor :branch
10
+
8
11
  # Attribute mapping from ruby-style variable name to JSON key.
9
12
  def self.attribute_map
10
13
  {
11
- :'message' => :'message'
14
+ :'message' => :'message',
15
+ :'branch' => :'branch'
12
16
  }
13
17
  end
14
18
 
15
19
  # Attribute type mapping.
16
20
  def self.openapi_types
17
21
  {
18
- :'message' => :'String'
22
+ :'message' => :'String',
23
+ :'branch' => :'String'
19
24
  }
20
25
  end
21
26
 
@@ -43,6 +48,10 @@ module Phrase
43
48
  if attributes.key?(:'message')
44
49
  self.message = attributes[:'message']
45
50
  end
51
+
52
+ if attributes.key?(:'branch')
53
+ self.branch = attributes[:'branch']
54
+ end
46
55
  end
47
56
 
48
57
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -63,7 +72,8 @@ module Phrase
63
72
  def ==(o)
64
73
  return true if self.equal?(o)
65
74
  self.class == o.class &&
66
- message == o.message
75
+ message == o.message &&
76
+ branch == o.branch
67
77
  end
68
78
 
69
79
  # @see the `==` method
@@ -75,7 +85,7 @@ module Phrase
75
85
  # Calculates hash code according to all attributes.
76
86
  # @return [Integer] Hash code
77
87
  def hash
78
- [message].hash
88
+ [message, branch].hash
79
89
  end
80
90
 
81
91
  # Builds the object from hash
@@ -26,6 +26,8 @@ module Phrase
26
26
 
27
27
  attr_accessor :job_tag_name
28
28
 
29
+ attr_accessor :source_translations_updated_at
30
+
29
31
  attr_accessor :source_locale
30
32
 
31
33
  attr_accessor :locales
@@ -47,6 +49,7 @@ module Phrase
47
49
  :'updated_at' => :'updated_at',
48
50
  :'owner' => :'owner',
49
51
  :'job_tag_name' => :'job_tag_name',
52
+ :'source_translations_updated_at' => :'source_translations_updated_at',
50
53
  :'source_locale' => :'source_locale',
51
54
  :'locales' => :'locales',
52
55
  :'keys' => :'keys'
@@ -68,6 +71,7 @@ module Phrase
68
71
  :'updated_at' => :'DateTime',
69
72
  :'owner' => :'UserPreview',
70
73
  :'job_tag_name' => :'String',
74
+ :'source_translations_updated_at' => :'DateTime',
71
75
  :'source_locale' => :'LocalePreview',
72
76
  :'locales' => :'Array<LocalePreview>',
73
77
  :'keys' => :'Array<KeyPreview>'
@@ -151,6 +155,10 @@ module Phrase
151
155
  self.job_tag_name = attributes[:'job_tag_name']
152
156
  end
153
157
 
158
+ if attributes.key?(:'source_translations_updated_at')
159
+ self.source_translations_updated_at = attributes[:'source_translations_updated_at']
160
+ end
161
+
154
162
  if attributes.key?(:'source_locale')
155
163
  self.source_locale = attributes[:'source_locale']
156
164
  end
@@ -198,6 +206,7 @@ module Phrase
198
206
  updated_at == o.updated_at &&
199
207
  owner == o.owner &&
200
208
  job_tag_name == o.job_tag_name &&
209
+ source_translations_updated_at == o.source_translations_updated_at &&
201
210
  source_locale == o.source_locale &&
202
211
  locales == o.locales &&
203
212
  keys == o.keys
@@ -212,7 +221,7 @@ module Phrase
212
221
  # Calculates hash code according to all attributes.
213
222
  # @return [Integer] Hash code
214
223
  def hash
215
- [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, source_locale, locales, keys].hash
224
+ [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, source_translations_updated_at, source_locale, locales, keys].hash
216
225
  end
217
226
 
218
227
  # Builds the object from hash
@@ -0,0 +1,214 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class JobKeysDeleteParameters
5
+ # specify the branch to use
6
+ attr_accessor :branch
7
+
8
+ # ids of keys that should be deleted from the job
9
+ attr_accessor :translation_key_ids
10
+
11
+ # Attribute mapping from ruby-style variable name to JSON key.
12
+ def self.attribute_map
13
+ {
14
+ :'branch' => :'branch',
15
+ :'translation_key_ids' => :'translation_key_ids'
16
+ }
17
+ end
18
+
19
+ # Attribute type mapping.
20
+ def self.openapi_types
21
+ {
22
+ :'branch' => :'String',
23
+ :'translation_key_ids' => :'Array<String>'
24
+ }
25
+ end
26
+
27
+ # List of attributes with nullable: true
28
+ def self.openapi_nullable
29
+ Set.new([
30
+ ])
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ if (!attributes.is_a?(Hash))
37
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::JobKeysDeleteParameters` initialize method"
38
+ end
39
+
40
+ # check to see if the attribute exists and convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h|
42
+ if (!self.class.attribute_map.key?(k.to_sym))
43
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::JobKeysDeleteParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
44
+ end
45
+ h[k.to_sym] = v
46
+ }
47
+
48
+ if attributes.key?(:'branch')
49
+ self.branch = attributes[:'branch']
50
+ end
51
+
52
+ if attributes.key?(:'translation_key_ids')
53
+ if (value = attributes[:'translation_key_ids']).is_a?(Array)
54
+ self.translation_key_ids = value
55
+ end
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if @translation_key_ids.nil?
64
+ invalid_properties.push('invalid value for "translation_key_ids", translation_key_ids cannot be nil.')
65
+ end
66
+
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if @translation_key_ids.nil?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ branch == o.branch &&
83
+ translation_key_ids == o.translation_key_ids
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [branch, translation_key_ids].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.openapi_types.each_pair do |key, type|
111
+ if type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :DateTime
132
+ DateTime.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :Time
136
+ Time.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ Phrase.const_get(type).build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.openapi_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+ end
214
+ end
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
8
+ # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
9
9
  attr_accessor :q
10
10
 
11
11
  # Locale used to exlcude or include keys.
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
8
+ # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
9
9
  attr_accessor :q
10
10
 
11
11
  # Locale used to exlcude or include keys.
@@ -11,7 +11,7 @@ module Phrase
11
11
  # Order direction. Can be one of: asc, desc.
12
12
  attr_accessor :order
13
13
 
14
- # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{&gt;=|&lt;=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>. Please note: If <code>tags</code> are added to filter the search, the search will be limited to a maximum of 65,536 tagged keys.
14
+ # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{&gt;=|&lt;=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>. Please note: If <code>tags</code> are added to filter the search, the search will be limited to a maximum of 65,536 tagged keys.
15
15
  attr_accessor :q
16
16
 
17
17
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
8
+ # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
9
9
  attr_accessor :q
10
10
 
11
11
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
8
+ # Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
9
9
  attr_accessor :q
10
10
 
11
11
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.