phrase 4.22.0 → 4.23.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +8 -6
- data/docs/AccountDetails.md +1 -1
- data/docs/AuthorizationsApi.md +1 -1
- data/docs/Automation.md +6 -0
- data/docs/AutomationsApi.md +1 -1
- data/docs/AutomationsCreateParameters.md +5 -1
- data/docs/AutomationsCreateParameters1.md +5 -1
- data/docs/BlacklistedKeysApi.md +1 -1
- data/docs/Branch.md +2 -0
- data/docs/BranchCreateParameters.md +3 -1
- data/docs/BranchMergeParameters.md +1 -1
- data/docs/BranchSyncParameters.md +1 -1
- data/docs/BranchesApi.md +10 -10
- data/docs/CommentsApi.md +7 -7
- data/docs/Distribution.md +4 -4
- data/docs/{DistributionPreview.md → DistributionDetails.md} +9 -3
- data/docs/DistributionsApi.md +9 -9
- data/docs/DocumentDelete422Response.md +19 -0
- data/docs/{CustomMetadataPropertyCreate422ResponseErrorsInner.md → DocumentDelete422ResponseErrorsInner.md} +2 -2
- data/docs/DocumentsApi.md +4 -2
- data/docs/FigmaAttachmentsApi.md +1 -1
- data/docs/GlossariesApi.md +1 -1
- data/docs/Glossary.md +2 -0
- data/docs/GlossaryTerm.md +2 -0
- data/docs/GlossaryTermGlossary.md +19 -0
- data/docs/GlossaryTermTranslationsApi.md +1 -1
- data/docs/GlossaryTermsApi.md +1 -1
- data/docs/IcuSkeletonParameters.md +3 -1
- data/docs/Invitation.md +2 -2
- data/docs/InvitationsApi.md +1 -1
- data/docs/Job.md +5 -1
- data/docs/JobDetails.md +8 -2
- data/docs/JobTemplate.md +2 -0
- data/docs/JobTemplateDetails.md +2 -0
- data/docs/JobTemplatesApi.md +1 -1
- data/docs/JobsApi.md +15 -9
- data/docs/KeyCreateParameters.md +6 -2
- data/docs/KeyUpdateParameters.md +6 -2
- data/docs/KeysApi.md +1 -1
- data/docs/LocalesApi.md +6 -2
- data/docs/MembersApi.md +1 -1
- data/docs/NotificationsApi.md +3 -1
- data/docs/OrdersApi.md +4 -2
- data/docs/OrganizationJobTemplate.md +4 -0
- data/docs/OrganizationJobTemplateDetails.md +4 -0
- data/docs/OrganizationJobTemplatesApi.md +1 -1
- data/docs/ProjectCreateParameters.md +17 -1
- data/docs/ProjectDetails.md +7 -1
- data/docs/ProjectUpdateParameters.md +17 -3
- data/docs/ProjectsApi.md +10 -8
- data/docs/Release.md +2 -0
- data/docs/ReleasesApi.md +1 -1
- data/docs/RepoSync.md +2 -0
- data/docs/ScreenshotMarker.md +2 -2
- data/docs/ScreenshotMarkerPresentation.md +23 -0
- data/docs/ScreenshotMarkersApi.md +1 -1
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/ScreenshotsApi.md +1 -1
- data/docs/SearchInAccountParameters.md +3 -1
- data/docs/StyleGuidesApi.md +1 -1
- data/docs/StyleguideCreateParameters.md +3 -3
- data/docs/StyleguideUpdateParameters.md +3 -3
- data/docs/Tag.md +2 -0
- data/docs/TagWithStats.md +2 -0
- data/docs/TagsApi.md +5 -3
- data/docs/TranslationCreateParameters.md +5 -1
- data/docs/TranslationOrder.md +2 -2
- data/docs/TranslationUpdateParameters.md +3 -1
- data/docs/TranslationsApi.md +4 -0
- data/docs/UploadBatch.md +4 -2
- data/docs/UploadsApi.md +3 -1
- data/docs/VariablesApi.md +1 -1
- data/docs/WebhooksApi.md +7 -6
- data/lib/phrase/api/authorizations_api.rb +2 -0
- data/lib/phrase/api/automations_api.rb +2 -0
- data/lib/phrase/api/blacklisted_keys_api.rb +2 -0
- data/lib/phrase/api/branches_api.rb +20 -14
- data/lib/phrase/api/comments_api.rb +18 -4
- data/lib/phrase/api/distributions_api.rb +14 -12
- data/lib/phrase/api/documents_api.rb +5 -0
- data/lib/phrase/api/figma_attachments_api.rb +2 -0
- data/lib/phrase/api/glossaries_api.rb +2 -0
- data/lib/phrase/api/glossary_term_translations_api.rb +2 -0
- data/lib/phrase/api/glossary_terms_api.rb +2 -0
- data/lib/phrase/api/invitations_api.rb +2 -0
- data/lib/phrase/api/job_templates_api.rb +2 -0
- data/lib/phrase/api/jobs_api.rb +18 -6
- data/lib/phrase/api/keys_api.rb +2 -0
- data/lib/phrase/api/locales_api.rb +8 -0
- data/lib/phrase/api/members_api.rb +2 -0
- data/lib/phrase/api/notifications_api.rb +3 -0
- data/lib/phrase/api/orders_api.rb +5 -0
- data/lib/phrase/api/organization_job_templates_api.rb +2 -0
- data/lib/phrase/api/projects_api.rb +23 -10
- data/lib/phrase/api/releases_api.rb +2 -0
- data/lib/phrase/api/screenshot_markers_api.rb +2 -0
- data/lib/phrase/api/screenshots_api.rb +2 -0
- data/lib/phrase/api/style_guides_api.rb +2 -0
- data/lib/phrase/api/tags_api.rb +7 -2
- data/lib/phrase/api/translations_api.rb +6 -0
- data/lib/phrase/api/uploads_api.rb +3 -0
- data/lib/phrase/api/variables_api.rb +2 -0
- data/lib/phrase/api/webhooks_api.rb +9 -5
- data/lib/phrase/models/account_details.rb +1 -0
- data/lib/phrase/models/authorization_create_parameters.rb +22 -0
- data/lib/phrase/models/authorization_update_parameters.rb +22 -0
- data/lib/phrase/models/automation.rb +34 -1
- data/lib/phrase/models/automations_create_parameters.rb +24 -4
- data/lib/phrase/models/automations_create_parameters1.rb +24 -4
- data/lib/phrase/models/branch.rb +46 -1
- data/lib/phrase/models/branch_create_parameters.rb +14 -4
- data/lib/phrase/models/branch_merge_parameters.rb +35 -1
- data/lib/phrase/models/branch_sync_parameters.rb +35 -1
- data/lib/phrase/models/distribution.rb +17 -20
- data/lib/phrase/models/{distribution_preview.rb → distribution_details.rb} +46 -7
- data/lib/phrase/models/{custom_metadata_property_create422_response.rb → document_delete422_response.rb} +4 -4
- data/lib/phrase/models/{custom_metadata_property_create422_response_errors_inner.rb → document_delete422_response_errors_inner.rb} +3 -3
- data/lib/phrase/models/glossary.rb +12 -1
- data/lib/phrase/models/glossary_term.rb +10 -1
- data/lib/phrase/models/glossary_term_glossary.rb +206 -0
- data/lib/phrase/models/icu_skeleton_parameters.rb +12 -2
- data/lib/phrase/models/invitation.rb +9 -8
- data/lib/phrase/models/job.rb +26 -4
- data/lib/phrase/models/job_details.rb +37 -4
- data/lib/phrase/models/job_template.rb +11 -1
- data/lib/phrase/models/job_template_details.rb +11 -1
- data/lib/phrase/models/key_create_parameters.rb +26 -4
- data/lib/phrase/models/key_update_parameters.rb +26 -4
- data/lib/phrase/models/organization_job_template.rb +22 -1
- data/lib/phrase/models/organization_job_template_details.rb +22 -1
- data/lib/phrase/models/project_create_parameters.rb +115 -1
- data/lib/phrase/models/project_details.rb +31 -4
- data/lib/phrase/models/project_update_parameters.rb +75 -5
- data/lib/phrase/models/release.rb +10 -1
- data/lib/phrase/models/repo_sync.rb +12 -1
- data/lib/phrase/models/screenshot_marker.rb +2 -1
- data/lib/phrase/models/screenshot_marker_presentation.rb +224 -0
- data/lib/phrase/models/search_in_account_parameters.rb +16 -4
- data/lib/phrase/models/styleguide_create_parameters.rb +61 -3
- data/lib/phrase/models/styleguide_update_parameters.rb +61 -3
- data/lib/phrase/models/tag.rb +11 -1
- data/lib/phrase/models/tag_with_stats.rb +11 -1
- data/lib/phrase/models/translation_create_parameters.rb +24 -4
- data/lib/phrase/models/translation_order.rb +8 -7
- data/lib/phrase/models/translation_update_parameters.rb +14 -4
- data/lib/phrase/models/upload_batch.rb +24 -14
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +5 -3
- data/spec/api/branches_api_spec.rb +7 -7
- data/spec/api/comments_api_spec.rb +2 -2
- data/spec/api/distributions_api_spec.rb +4 -4
- data/spec/api/documents_api_spec.rb +1 -0
- data/spec/api/jobs_api_spec.rb +4 -2
- data/spec/api/notifications_api_spec.rb +1 -0
- data/spec/api/orders_api_spec.rb +1 -0
- data/spec/api/projects_api_spec.rb +6 -5
- data/spec/api/tags_api_spec.rb +2 -1
- data/spec/api/translations_api_spec.rb +2 -0
- data/spec/api/webhooks_api_spec.rb +2 -2
- data/spec/models/authorization_create_parameters_spec.rb +4 -0
- data/spec/models/authorization_update_parameters_spec.rb +4 -0
- data/spec/models/automation_spec.rb +18 -0
- data/spec/models/automations_create_parameters1_spec.rb +12 -0
- data/spec/models/automations_create_parameters_spec.rb +12 -0
- data/spec/models/branch_create_parameters_spec.rb +6 -0
- data/spec/models/branch_merge_parameters_spec.rb +4 -0
- data/spec/models/branch_spec.rb +10 -0
- data/spec/models/branch_sync_parameters_spec.rb +4 -0
- data/spec/models/{distribution_preview_spec.rb → distribution_details_spec.rb} +24 -6
- data/spec/models/distribution_spec.rb +3 -3
- data/spec/models/{custom_metadata_property_create422_response_errors_inner_spec.rb → document_delete422_response_errors_inner_spec.rb} +6 -6
- data/spec/models/{custom_metadata_property_create422_response_spec.rb → document_delete422_response_spec.rb} +6 -6
- data/spec/models/glossary_spec.rb +6 -0
- data/spec/models/glossary_term_glossary_spec.rb +35 -0
- data/spec/models/glossary_term_spec.rb +6 -0
- data/spec/models/icu_skeleton_parameters_spec.rb +6 -0
- data/spec/models/invitation_spec.rb +1 -1
- data/spec/models/job_details_spec.rb +18 -0
- data/spec/models/job_spec.rb +12 -0
- data/spec/models/job_template_details_spec.rb +6 -0
- data/spec/models/job_template_spec.rb +6 -0
- data/spec/models/key_create_parameters_spec.rb +12 -0
- data/spec/models/key_update_parameters_spec.rb +12 -0
- data/spec/models/organization_job_template_details_spec.rb +12 -0
- data/spec/models/organization_job_template_spec.rb +12 -0
- data/spec/models/project_create_parameters_spec.rb +52 -0
- data/spec/models/project_details_spec.rb +18 -0
- data/spec/models/project_update_parameters_spec.rb +42 -0
- data/spec/models/release_spec.rb +6 -0
- data/spec/models/repo_sync_spec.rb +6 -0
- data/spec/models/screenshot_marker_presentation_spec.rb +47 -0
- data/spec/models/search_in_account_parameters_spec.rb +6 -0
- data/spec/models/styleguide_create_parameters_spec.rb +12 -0
- data/spec/models/styleguide_update_parameters_spec.rb +12 -0
- data/spec/models/tag_spec.rb +6 -0
- data/spec/models/tag_with_stats_spec.rb +6 -0
- data/spec/models/translation_create_parameters_spec.rb +12 -0
- data/spec/models/translation_order_spec.rb +1 -1
- data/spec/models/translation_update_parameters_spec.rb +6 -0
- data/spec/models/upload_batch_spec.rb +8 -2
- metadata +267 -259
- data/docs/CustomMetadataPropertyCreate422Response.md +0 -19
|
@@ -120,6 +120,8 @@ module Phrase
|
|
|
120
120
|
|
|
121
121
|
# header parameters
|
|
122
122
|
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
123
125
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
124
126
|
|
|
125
127
|
# form parameters
|
|
@@ -8,7 +8,7 @@ module Phrase
|
|
|
8
8
|
@api_client = api_client
|
|
9
9
|
end
|
|
10
10
|
# Create a project
|
|
11
|
-
# Create a new project.
|
|
11
|
+
# Create a new project in the given account. When `source_project_id` is supplied, the new project is created as a clone of that project. All locales, keys, and translations are copied asynchronously after the response is returned, so they may not be available immediately. Settings from the source project are inherited unless explicitly overridden in the request; in clone mode, the `shares_translation_memory` field is ignored and inherited from the source. `shares_translation_memory` defaults to `true` when omitted on a non-clone create.
|
|
12
12
|
# @param project_create_parameters [ProjectCreateParameters]
|
|
13
13
|
# @param [Hash] opts the optional parameters
|
|
14
14
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
@@ -19,7 +19,7 @@ module Phrase
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
# Create a project
|
|
22
|
-
# Create a new project.
|
|
22
|
+
# Create a new project in the given account. When `source_project_id` is supplied, the new project is created as a clone of that project. All locales, keys, and translations are copied asynchronously after the response is returned, so they may not be available immediately. Settings from the source project are inherited unless explicitly overridden in the request; in clone mode, the `shares_translation_memory` field is ignored and inherited from the source. `shares_translation_memory` defaults to `true` when omitted on a non-clone create.
|
|
23
23
|
# @param project_create_parameters [ProjectCreateParameters]
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
@@ -76,7 +76,7 @@ module Phrase
|
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
# Delete a project
|
|
79
|
-
# Delete an existing project.
|
|
79
|
+
# Delete an existing project. Associated repository syncs and OTA distributions are removed. A `project:delete` event is dispatched.
|
|
80
80
|
# @param id [String] ID
|
|
81
81
|
# @param [Hash] opts the optional parameters
|
|
82
82
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
@@ -87,7 +87,7 @@ module Phrase
|
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
# Delete a project
|
|
90
|
-
# Delete an existing project.
|
|
90
|
+
# Delete an existing project. Associated repository syncs and OTA distributions are removed. A `project:delete` event is dispatched.
|
|
91
91
|
# @param id [String] ID
|
|
92
92
|
# @param [Hash] opts the optional parameters
|
|
93
93
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
@@ -108,6 +108,8 @@ module Phrase
|
|
|
108
108
|
|
|
109
109
|
# header parameters
|
|
110
110
|
header_params = opts[:header_params] || {}
|
|
111
|
+
# HTTP header 'Accept' (if needed)
|
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
111
113
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
112
114
|
|
|
113
115
|
# form parameters
|
|
@@ -280,14 +282,15 @@ module Phrase
|
|
|
280
282
|
end
|
|
281
283
|
|
|
282
284
|
# List projects
|
|
283
|
-
# List all projects the current user has access to.
|
|
285
|
+
# List all projects the current user has access to. When the `account_id` query parameter is omitted, the response includes projects across every account the user is a member of. Pass `account_id` to scope the results to a single account.
|
|
284
286
|
# @param [Hash] opts the optional parameters
|
|
285
287
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
286
288
|
# @option opts [Integer] :page Page number
|
|
287
289
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
288
290
|
# @option opts [String] :account_id Filter by Account ID
|
|
289
|
-
# @option opts [String] :sort_by Sort projects. Valid
|
|
290
|
-
# @option opts [Array<String>] :filters Filter projects.
|
|
291
|
+
# @option opts [String] :sort_by Sort projects. Valid values are `name_asc`, `name_desc`, `updated_at_asc`, `updated_at_desc`, `space_asc`, and `space_desc`. The trailing direction segment is optional; if omitted or invalid, projects are sorted ascending. Any other value is ignored and the default ordering is returned.
|
|
292
|
+
# @option opts [Array<String>] :filters Filter projects. The only supported value is `favorites`, which restricts the results to projects the current user has starred.
|
|
293
|
+
# @option opts [String] :q Search query. The only supported syntax is `name:<text>` — for example `name:android` returns projects whose name matches `android` (case-insensitive substring). Any value that does not match the `name:` prefix is ignored.
|
|
291
294
|
# @return [Array<Project>]
|
|
292
295
|
def projects_list(opts = {})
|
|
293
296
|
data, _status_code, _headers = projects_list_with_http_info(opts)
|
|
@@ -295,19 +298,28 @@ module Phrase
|
|
|
295
298
|
end
|
|
296
299
|
|
|
297
300
|
# List projects
|
|
298
|
-
# List all projects the current user has access to.
|
|
301
|
+
# List all projects the current user has access to. When the `account_id` query parameter is omitted, the response includes projects across every account the user is a member of. Pass `account_id` to scope the results to a single account.
|
|
299
302
|
# @param [Hash] opts the optional parameters
|
|
300
303
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
301
304
|
# @option opts [Integer] :page Page number
|
|
302
305
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
303
306
|
# @option opts [String] :account_id Filter by Account ID
|
|
304
|
-
# @option opts [String] :sort_by Sort projects. Valid
|
|
305
|
-
# @option opts [Array<String>] :filters Filter projects.
|
|
307
|
+
# @option opts [String] :sort_by Sort projects. Valid values are `name_asc`, `name_desc`, `updated_at_asc`, `updated_at_desc`, `space_asc`, and `space_desc`. The trailing direction segment is optional; if omitted or invalid, projects are sorted ascending. Any other value is ignored and the default ordering is returned.
|
|
308
|
+
# @option opts [Array<String>] :filters Filter projects. The only supported value is `favorites`, which restricts the results to projects the current user has starred.
|
|
309
|
+
# @option opts [String] :q Search query. The only supported syntax is `name:<text>` — for example `name:android` returns projects whose name matches `android` (case-insensitive substring). Any value that does not match the `name:` prefix is ignored.
|
|
306
310
|
# @return [Array<(Response<(Array<Project>)>, Integer, Hash)>] Response<(Array<Project>)> data, response status code and response headers
|
|
307
311
|
def projects_list_with_http_info(opts = {})
|
|
308
312
|
if @api_client.config.debugging
|
|
309
313
|
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_list ...'
|
|
310
314
|
end
|
|
315
|
+
allowable_values = ["name_asc", "name_desc", "updated_at_asc", "updated_at_desc", "space_asc", "space_desc"]
|
|
316
|
+
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
317
|
+
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
318
|
+
end
|
|
319
|
+
allowable_values = ["favorites"]
|
|
320
|
+
if @api_client.config.client_side_validation && opts[:'filters'] && !opts[:'filters'].all? { |item| allowable_values.include?(item) }
|
|
321
|
+
fail ArgumentError, "invalid value for \"filters\", must include one of #{allowable_values}"
|
|
322
|
+
end
|
|
311
323
|
# resource path
|
|
312
324
|
local_var_path = '/projects'
|
|
313
325
|
|
|
@@ -318,6 +330,7 @@ module Phrase
|
|
|
318
330
|
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
319
331
|
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
320
332
|
query_params[:'filters'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
|
333
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
321
334
|
|
|
322
335
|
# header parameters
|
|
323
336
|
header_params = opts[:header_params] || {}
|
|
@@ -132,6 +132,8 @@ module Phrase
|
|
|
132
132
|
|
|
133
133
|
# header parameters
|
|
134
134
|
header_params = opts[:header_params] || {}
|
|
135
|
+
# HTTP header 'Accept' (if needed)
|
|
136
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
135
137
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
136
138
|
|
|
137
139
|
# form parameters
|
|
@@ -129,6 +129,8 @@ module Phrase
|
|
|
129
129
|
|
|
130
130
|
# header parameters
|
|
131
131
|
header_params = opts[:header_params] || {}
|
|
132
|
+
# HTTP header 'Accept' (if needed)
|
|
133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
132
134
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
133
135
|
|
|
134
136
|
# form parameters
|
|
@@ -129,6 +129,8 @@ module Phrase
|
|
|
129
129
|
|
|
130
130
|
# header parameters
|
|
131
131
|
header_params = opts[:header_params] || {}
|
|
132
|
+
# HTTP header 'Accept' (if needed)
|
|
133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
132
134
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
133
135
|
|
|
134
136
|
# form parameters
|
|
@@ -120,6 +120,8 @@ module Phrase
|
|
|
120
120
|
|
|
121
121
|
# header parameters
|
|
122
122
|
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
123
125
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
124
126
|
|
|
125
127
|
# form parameters
|
data/lib/phrase/api/tags_api.rb
CHANGED
|
@@ -123,6 +123,8 @@ module Phrase
|
|
|
123
123
|
|
|
124
124
|
# header parameters
|
|
125
125
|
header_params = opts[:header_params] || {}
|
|
126
|
+
# HTTP header 'Accept' (if needed)
|
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
126
128
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
127
129
|
|
|
128
130
|
# form parameters
|
|
@@ -239,7 +241,8 @@ module Phrase
|
|
|
239
241
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
240
242
|
# @option opts [Integer] :page Page number
|
|
241
243
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
242
|
-
# @option opts [Boolean] :exclude_system_tags
|
|
244
|
+
# @option opts [Boolean] :exclude_system_tags Excludes tags generated by the system, e.g. job, upload or figma tags. Mutually exclusive with `only_system_tags`.
|
|
245
|
+
# @option opts [Boolean] :only_system_tags Returns only system-generated tags (e.g. job, upload, figma) and excludes user-defined tags. Mutually exclusive with `exclude_system_tags`.
|
|
243
246
|
# @option opts [String] :branch specify the branch to use
|
|
244
247
|
# @option opts [String] :q Specify a query to filter tags by name.
|
|
245
248
|
# @return [Array<Tag>]
|
|
@@ -255,7 +258,8 @@ module Phrase
|
|
|
255
258
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
256
259
|
# @option opts [Integer] :page Page number
|
|
257
260
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
258
|
-
# @option opts [Boolean] :exclude_system_tags
|
|
261
|
+
# @option opts [Boolean] :exclude_system_tags Excludes tags generated by the system, e.g. job, upload or figma tags. Mutually exclusive with `only_system_tags`.
|
|
262
|
+
# @option opts [Boolean] :only_system_tags Returns only system-generated tags (e.g. job, upload, figma) and excludes user-defined tags. Mutually exclusive with `exclude_system_tags`.
|
|
259
263
|
# @option opts [String] :branch specify the branch to use
|
|
260
264
|
# @option opts [String] :q Specify a query to filter tags by name.
|
|
261
265
|
# @return [Array<(Response<(Array<Tag>)>, Integer, Hash)>] Response<(Array<Tag>)> data, response status code and response headers
|
|
@@ -275,6 +279,7 @@ module Phrase
|
|
|
275
279
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
276
280
|
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
277
281
|
query_params[:'exclude_system_tags'] = opts[:'exclude_system_tags'] if !opts[:'exclude_system_tags'].nil?
|
|
282
|
+
query_params[:'only_system_tags'] = opts[:'only_system_tags'] if !opts[:'only_system_tags'].nil?
|
|
278
283
|
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
279
284
|
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
280
285
|
|
|
@@ -1054,6 +1054,8 @@ module Phrase
|
|
|
1054
1054
|
# @option opts [Integer] :page Page number
|
|
1055
1055
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
1056
1056
|
# @option opts [String] :branch specify the branch to use
|
|
1057
|
+
# @option opts [String] :key_id Filter translations to those attached to the key identified by this code. Equivalent to calling `GET /projects/{project_id}/keys/{key_id}/translations`.
|
|
1058
|
+
# @option opts [String] :locale_id Filter translations to those for the given locale (locale code or id). Equivalent to calling `GET /projects/{project_id}/locales/{locale_id}/translations`.
|
|
1057
1059
|
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
|
|
1058
1060
|
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
|
1059
1061
|
# @option opts [String] :q Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of ids * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
|
|
@@ -1073,6 +1075,8 @@ module Phrase
|
|
|
1073
1075
|
# @option opts [Integer] :page Page number
|
|
1074
1076
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
1075
1077
|
# @option opts [String] :branch specify the branch to use
|
|
1078
|
+
# @option opts [String] :key_id Filter translations to those attached to the key identified by this code. Equivalent to calling `GET /projects/{project_id}/keys/{key_id}/translations`.
|
|
1079
|
+
# @option opts [String] :locale_id Filter translations to those for the given locale (locale code or id). Equivalent to calling `GET /projects/{project_id}/locales/{locale_id}/translations`.
|
|
1076
1080
|
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
|
|
1077
1081
|
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
|
1078
1082
|
# @option opts [String] :q Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of ids * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
|
|
@@ -1093,6 +1097,8 @@ module Phrase
|
|
|
1093
1097
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1094
1098
|
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
1095
1099
|
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
1100
|
+
query_params[:'key_id'] = opts[:'key_id'] if !opts[:'key_id'].nil?
|
|
1101
|
+
query_params[:'locale_id'] = opts[:'locale_id'] if !opts[:'locale_id'].nil?
|
|
1096
1102
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1097
1103
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1098
1104
|
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
@@ -34,6 +34,7 @@ module Phrase
|
|
|
34
34
|
# @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.
|
|
35
35
|
# @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false` (default to false)
|
|
36
36
|
# @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.
|
|
37
|
+
# @option opts [Boolean] :skip_automated_job_creation When `true`, the automation rules for the project will not fire for this upload, so no jobs are created as a side effect of importing this file. Defaults to `false`. (default to false)
|
|
37
38
|
# @return [Upload]
|
|
38
39
|
def upload_create(project_id, file, file_format, locale_id, opts = {})
|
|
39
40
|
data, _status_code, _headers = upload_create_with_http_info(project_id, file, file_format, locale_id, opts)
|
|
@@ -67,6 +68,7 @@ module Phrase
|
|
|
67
68
|
# @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.
|
|
68
69
|
# @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
|
|
69
70
|
# @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.
|
|
71
|
+
# @option opts [Boolean] :skip_automated_job_creation When `true`, the automation rules for the project will not fire for this upload, so no jobs are created as a side effect of importing this file. Defaults to `false`.
|
|
70
72
|
# @return [Array<(Response<(Upload)>, Integer, Hash)>] Response<(Upload)> data, response status code and response headers
|
|
71
73
|
def upload_create_with_http_info(project_id, file, file_format, locale_id, opts = {})
|
|
72
74
|
if @api_client.config.debugging
|
|
@@ -126,6 +128,7 @@ module Phrase
|
|
|
126
128
|
form_params['mark_reviewed'] = opts[:'mark_reviewed'] if !opts[:'mark_reviewed'].nil?
|
|
127
129
|
form_params['tag_only_affected_keys'] = opts[:'tag_only_affected_keys'] if !opts[:'tag_only_affected_keys'].nil?
|
|
128
130
|
form_params['translation_key_prefix'] = opts[:'translation_key_prefix'] if !opts[:'translation_key_prefix'].nil?
|
|
131
|
+
form_params['skip_automated_job_creation'] = opts[:'skip_automated_job_creation'] if !opts[:'skip_automated_job_creation'].nil?
|
|
129
132
|
|
|
130
133
|
# http body (model)
|
|
131
134
|
post_body = opts[:body]
|
|
@@ -120,6 +120,8 @@ module Phrase
|
|
|
120
120
|
|
|
121
121
|
# header parameters
|
|
122
122
|
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
123
125
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
124
126
|
|
|
125
127
|
# form parameters
|
|
@@ -120,6 +120,8 @@ module Phrase
|
|
|
120
120
|
|
|
121
121
|
# header parameters
|
|
122
122
|
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
123
125
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
124
126
|
|
|
125
127
|
# form parameters
|
|
@@ -224,24 +226,24 @@ module Phrase
|
|
|
224
226
|
end
|
|
225
227
|
|
|
226
228
|
# Test a webhook
|
|
227
|
-
# Perform a test request for a webhook.
|
|
229
|
+
# Perform a test request for a webhook. Sends a synthetic `test:event` payload to the webhook's `callback_url` and returns the webhook resource.
|
|
228
230
|
# @param project_id [String] Project ID
|
|
229
231
|
# @param id [String] ID
|
|
230
232
|
# @param [Hash] opts the optional parameters
|
|
231
233
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
232
|
-
# @return [
|
|
234
|
+
# @return [Webhook]
|
|
233
235
|
def webhook_test(project_id, id, opts = {})
|
|
234
236
|
data, _status_code, _headers = webhook_test_with_http_info(project_id, id, opts)
|
|
235
237
|
data
|
|
236
238
|
end
|
|
237
239
|
|
|
238
240
|
# Test a webhook
|
|
239
|
-
# Perform a test request for a webhook.
|
|
241
|
+
# Perform a test request for a webhook. Sends a synthetic `test:event` payload to the webhook's `callback_url` and returns the webhook resource.
|
|
240
242
|
# @param project_id [String] Project ID
|
|
241
243
|
# @param id [String] ID
|
|
242
244
|
# @param [Hash] opts the optional parameters
|
|
243
245
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
244
|
-
# @return [Array<(Response
|
|
246
|
+
# @return [Array<(Response<(Webhook)>, Integer, Hash)>] Response<(Webhook)> data, response status code and response headers
|
|
245
247
|
def webhook_test_with_http_info(project_id, id, opts = {})
|
|
246
248
|
if @api_client.config.debugging
|
|
247
249
|
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_test ...'
|
|
@@ -262,6 +264,8 @@ module Phrase
|
|
|
262
264
|
|
|
263
265
|
# header parameters
|
|
264
266
|
header_params = opts[:header_params] || {}
|
|
267
|
+
# HTTP header 'Accept' (if needed)
|
|
268
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
265
269
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
266
270
|
|
|
267
271
|
# form parameters
|
|
@@ -271,7 +275,7 @@ module Phrase
|
|
|
271
275
|
post_body = opts[:body]
|
|
272
276
|
|
|
273
277
|
# return_type
|
|
274
|
-
return_type = opts[:return_type]
|
|
278
|
+
return_type = opts[:return_type] || 'Webhook'
|
|
275
279
|
|
|
276
280
|
# auth_names
|
|
277
281
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -11,6 +11,28 @@ module Phrase
|
|
|
11
11
|
# Expiration date for the authorization token. Null means no expiration date (default).
|
|
12
12
|
attr_accessor :expires_at
|
|
13
13
|
|
|
14
|
+
class EnumAttributeValidator
|
|
15
|
+
attr_reader :datatype
|
|
16
|
+
attr_reader :allowable_values
|
|
17
|
+
|
|
18
|
+
def initialize(datatype, allowable_values)
|
|
19
|
+
@allowable_values = allowable_values.map do |value|
|
|
20
|
+
case datatype.to_s
|
|
21
|
+
when /Integer/i
|
|
22
|
+
value.to_i
|
|
23
|
+
when /Float/i
|
|
24
|
+
value.to_f
|
|
25
|
+
else
|
|
26
|
+
value
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def valid?(value)
|
|
32
|
+
!value || allowable_values.include?(value)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
14
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
15
37
|
def self.attribute_map
|
|
16
38
|
{
|
|
@@ -11,6 +11,28 @@ module Phrase
|
|
|
11
11
|
# Expiration date for the authorization token. Null means no expiration date (default).
|
|
12
12
|
attr_accessor :expires_at
|
|
13
13
|
|
|
14
|
+
class EnumAttributeValidator
|
|
15
|
+
attr_reader :datatype
|
|
16
|
+
attr_reader :allowable_values
|
|
17
|
+
|
|
18
|
+
def initialize(datatype, allowable_values)
|
|
19
|
+
@allowable_values = allowable_values.map do |value|
|
|
20
|
+
case datatype.to_s
|
|
21
|
+
when /Integer/i
|
|
22
|
+
value.to_i
|
|
23
|
+
when /Float/i
|
|
24
|
+
value.to_f
|
|
25
|
+
else
|
|
26
|
+
value
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def valid?(value)
|
|
32
|
+
!value || allowable_values.include?(value)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
14
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
15
37
|
def self.attribute_map
|
|
16
38
|
{
|
|
@@ -15,8 +15,17 @@ module Phrase
|
|
|
15
15
|
|
|
16
16
|
attr_accessor :project_id
|
|
17
17
|
|
|
18
|
+
# All project IDs the automation applies to. Returned alongside the singular `project_id` for backwards compatibility.
|
|
19
|
+
attr_accessor :project_ids
|
|
20
|
+
|
|
18
21
|
attr_accessor :job_template_id
|
|
19
22
|
|
|
23
|
+
# User ID of the job owner that newly created jobs are assigned to.
|
|
24
|
+
attr_accessor :job_owner_id
|
|
25
|
+
|
|
26
|
+
# When `true`, the automation only acts on locales that changed since its last run.
|
|
27
|
+
attr_accessor :include_only_updated_locales
|
|
28
|
+
|
|
20
29
|
attr_accessor :tags
|
|
21
30
|
|
|
22
31
|
attr_accessor :cron_schedule
|
|
@@ -60,7 +69,10 @@ module Phrase
|
|
|
60
69
|
:'trigger' => :'trigger',
|
|
61
70
|
:'status_filters' => :'status_filters',
|
|
62
71
|
:'project_id' => :'project_id',
|
|
72
|
+
:'project_ids' => :'project_ids',
|
|
63
73
|
:'job_template_id' => :'job_template_id',
|
|
74
|
+
:'job_owner_id' => :'job_owner_id',
|
|
75
|
+
:'include_only_updated_locales' => :'include_only_updated_locales',
|
|
64
76
|
:'tags' => :'tags',
|
|
65
77
|
:'cron_schedule' => :'cron_schedule',
|
|
66
78
|
:'time_zone' => :'time_zone',
|
|
@@ -79,7 +91,10 @@ module Phrase
|
|
|
79
91
|
:'trigger' => :'String',
|
|
80
92
|
:'status_filters' => :'Array<String>',
|
|
81
93
|
:'project_id' => :'String',
|
|
94
|
+
:'project_ids' => :'Array<String>',
|
|
82
95
|
:'job_template_id' => :'String',
|
|
96
|
+
:'job_owner_id' => :'String',
|
|
97
|
+
:'include_only_updated_locales' => :'Boolean',
|
|
83
98
|
:'tags' => :'Array<String>',
|
|
84
99
|
:'cron_schedule' => :'String',
|
|
85
100
|
:'time_zone' => :'String',
|
|
@@ -92,6 +107,7 @@ module Phrase
|
|
|
92
107
|
# List of attributes with nullable: true
|
|
93
108
|
def self.openapi_nullable
|
|
94
109
|
Set.new([
|
|
110
|
+
:'job_owner_id',
|
|
95
111
|
])
|
|
96
112
|
end
|
|
97
113
|
|
|
@@ -136,10 +152,24 @@ module Phrase
|
|
|
136
152
|
self.project_id = attributes[:'project_id']
|
|
137
153
|
end
|
|
138
154
|
|
|
155
|
+
if attributes.key?(:'project_ids')
|
|
156
|
+
if (value = attributes[:'project_ids']).is_a?(Array)
|
|
157
|
+
self.project_ids = value
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
139
161
|
if attributes.key?(:'job_template_id')
|
|
140
162
|
self.job_template_id = attributes[:'job_template_id']
|
|
141
163
|
end
|
|
142
164
|
|
|
165
|
+
if attributes.key?(:'job_owner_id')
|
|
166
|
+
self.job_owner_id = attributes[:'job_owner_id']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'include_only_updated_locales')
|
|
170
|
+
self.include_only_updated_locales = attributes[:'include_only_updated_locales']
|
|
171
|
+
end
|
|
172
|
+
|
|
143
173
|
if attributes.key?(:'tags')
|
|
144
174
|
if (value = attributes[:'tags']).is_a?(Array)
|
|
145
175
|
self.tags = value
|
|
@@ -215,7 +245,10 @@ module Phrase
|
|
|
215
245
|
trigger == o.trigger &&
|
|
216
246
|
status_filters == o.status_filters &&
|
|
217
247
|
project_id == o.project_id &&
|
|
248
|
+
project_ids == o.project_ids &&
|
|
218
249
|
job_template_id == o.job_template_id &&
|
|
250
|
+
job_owner_id == o.job_owner_id &&
|
|
251
|
+
include_only_updated_locales == o.include_only_updated_locales &&
|
|
219
252
|
tags == o.tags &&
|
|
220
253
|
cron_schedule == o.cron_schedule &&
|
|
221
254
|
time_zone == o.time_zone &&
|
|
@@ -233,7 +266,7 @@ module Phrase
|
|
|
233
266
|
# Calculates hash code according to all attributes.
|
|
234
267
|
# @return [Integer] Hash code
|
|
235
268
|
def hash
|
|
236
|
-
[id, name, status, trigger, status_filters, project_id, job_template_id, tags, cron_schedule, time_zone, account, created_at, updated_at].hash
|
|
269
|
+
[id, name, status, trigger, status_filters, project_id, project_ids, job_template_id, job_owner_id, include_only_updated_locales, tags, cron_schedule, time_zone, account, created_at, updated_at].hash
|
|
237
270
|
end
|
|
238
271
|
|
|
239
272
|
# Builds the object from hash
|
|
@@ -25,6 +25,12 @@ module Phrase
|
|
|
25
25
|
# along with cron_schedule, specifies when the scheduled automation is supposed to run
|
|
26
26
|
attr_accessor :time_zone
|
|
27
27
|
|
|
28
|
+
# User ID of the job owner that newly created jobs are assigned to.
|
|
29
|
+
attr_accessor :job_owner_id
|
|
30
|
+
|
|
31
|
+
# When `true`, the automation only acts on locales that changed since its last run. Defaults to `false`.
|
|
32
|
+
attr_accessor :include_only_updated_locales
|
|
33
|
+
|
|
28
34
|
class EnumAttributeValidator
|
|
29
35
|
attr_reader :datatype
|
|
30
36
|
attr_reader :allowable_values
|
|
@@ -57,7 +63,9 @@ module Phrase
|
|
|
57
63
|
:'status_filters' => :'status_filters',
|
|
58
64
|
:'tags' => :'tags',
|
|
59
65
|
:'cron_schedule' => :'cron_schedule',
|
|
60
|
-
:'time_zone' => :'time_zone'
|
|
66
|
+
:'time_zone' => :'time_zone',
|
|
67
|
+
:'job_owner_id' => :'job_owner_id',
|
|
68
|
+
:'include_only_updated_locales' => :'include_only_updated_locales'
|
|
61
69
|
}
|
|
62
70
|
end
|
|
63
71
|
|
|
@@ -71,7 +79,9 @@ module Phrase
|
|
|
71
79
|
:'status_filters' => :'Array<String>',
|
|
72
80
|
:'tags' => :'Array<String>',
|
|
73
81
|
:'cron_schedule' => :'String',
|
|
74
|
-
:'time_zone' => :'String'
|
|
82
|
+
:'time_zone' => :'String',
|
|
83
|
+
:'job_owner_id' => :'String',
|
|
84
|
+
:'include_only_updated_locales' => :'Boolean'
|
|
75
85
|
}
|
|
76
86
|
end
|
|
77
87
|
|
|
@@ -133,6 +143,14 @@ module Phrase
|
|
|
133
143
|
if attributes.key?(:'time_zone')
|
|
134
144
|
self.time_zone = attributes[:'time_zone']
|
|
135
145
|
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'job_owner_id')
|
|
148
|
+
self.job_owner_id = attributes[:'job_owner_id']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'include_only_updated_locales')
|
|
152
|
+
self.include_only_updated_locales = attributes[:'include_only_updated_locales']
|
|
153
|
+
end
|
|
136
154
|
end
|
|
137
155
|
|
|
138
156
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -192,7 +210,9 @@ module Phrase
|
|
|
192
210
|
status_filters == o.status_filters &&
|
|
193
211
|
tags == o.tags &&
|
|
194
212
|
cron_schedule == o.cron_schedule &&
|
|
195
|
-
time_zone == o.time_zone
|
|
213
|
+
time_zone == o.time_zone &&
|
|
214
|
+
job_owner_id == o.job_owner_id &&
|
|
215
|
+
include_only_updated_locales == o.include_only_updated_locales
|
|
196
216
|
end
|
|
197
217
|
|
|
198
218
|
# @see the `==` method
|
|
@@ -204,7 +224,7 @@ module Phrase
|
|
|
204
224
|
# Calculates hash code according to all attributes.
|
|
205
225
|
# @return [Integer] Hash code
|
|
206
226
|
def hash
|
|
207
|
-
[name, trigger, project_ids, job_template_id, status_filters, tags, cron_schedule, time_zone].hash
|
|
227
|
+
[name, trigger, project_ids, job_template_id, status_filters, tags, cron_schedule, time_zone, job_owner_id, include_only_updated_locales].hash
|
|
208
228
|
end
|
|
209
229
|
|
|
210
230
|
# Builds the object from hash
|
|
@@ -25,6 +25,12 @@ module Phrase
|
|
|
25
25
|
# along with cron_schedule, specifies when the scheduled automation is supposed to run
|
|
26
26
|
attr_accessor :time_zone
|
|
27
27
|
|
|
28
|
+
# User ID of the job owner that newly created jobs are assigned to.
|
|
29
|
+
attr_accessor :job_owner_id
|
|
30
|
+
|
|
31
|
+
# When `true`, the automation only acts on locales that changed since its last run.
|
|
32
|
+
attr_accessor :include_only_updated_locales
|
|
33
|
+
|
|
28
34
|
class EnumAttributeValidator
|
|
29
35
|
attr_reader :datatype
|
|
30
36
|
attr_reader :allowable_values
|
|
@@ -57,7 +63,9 @@ module Phrase
|
|
|
57
63
|
:'status_filters' => :'status_filters',
|
|
58
64
|
:'tags' => :'tags',
|
|
59
65
|
:'cron_schedule' => :'cron_schedule',
|
|
60
|
-
:'time_zone' => :'time_zone'
|
|
66
|
+
:'time_zone' => :'time_zone',
|
|
67
|
+
:'job_owner_id' => :'job_owner_id',
|
|
68
|
+
:'include_only_updated_locales' => :'include_only_updated_locales'
|
|
61
69
|
}
|
|
62
70
|
end
|
|
63
71
|
|
|
@@ -71,7 +79,9 @@ module Phrase
|
|
|
71
79
|
:'status_filters' => :'Array<String>',
|
|
72
80
|
:'tags' => :'Array<String>',
|
|
73
81
|
:'cron_schedule' => :'String',
|
|
74
|
-
:'time_zone' => :'String'
|
|
82
|
+
:'time_zone' => :'String',
|
|
83
|
+
:'job_owner_id' => :'String',
|
|
84
|
+
:'include_only_updated_locales' => :'Boolean'
|
|
75
85
|
}
|
|
76
86
|
end
|
|
77
87
|
|
|
@@ -133,6 +143,14 @@ module Phrase
|
|
|
133
143
|
if attributes.key?(:'time_zone')
|
|
134
144
|
self.time_zone = attributes[:'time_zone']
|
|
135
145
|
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'job_owner_id')
|
|
148
|
+
self.job_owner_id = attributes[:'job_owner_id']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'include_only_updated_locales')
|
|
152
|
+
self.include_only_updated_locales = attributes[:'include_only_updated_locales']
|
|
153
|
+
end
|
|
136
154
|
end
|
|
137
155
|
|
|
138
156
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -192,7 +210,9 @@ module Phrase
|
|
|
192
210
|
status_filters == o.status_filters &&
|
|
193
211
|
tags == o.tags &&
|
|
194
212
|
cron_schedule == o.cron_schedule &&
|
|
195
|
-
time_zone == o.time_zone
|
|
213
|
+
time_zone == o.time_zone &&
|
|
214
|
+
job_owner_id == o.job_owner_id &&
|
|
215
|
+
include_only_updated_locales == o.include_only_updated_locales
|
|
196
216
|
end
|
|
197
217
|
|
|
198
218
|
# @see the `==` method
|
|
@@ -204,7 +224,7 @@ module Phrase
|
|
|
204
224
|
# Calculates hash code according to all attributes.
|
|
205
225
|
# @return [Integer] Hash code
|
|
206
226
|
def hash
|
|
207
|
-
[name, trigger, project_ids, job_template_id, status_filters, tags, cron_schedule, time_zone].hash
|
|
227
|
+
[name, trigger, project_ids, job_template_id, status_filters, tags, cron_schedule, time_zone, job_owner_id, include_only_updated_locales].hash
|
|
208
228
|
end
|
|
209
229
|
|
|
210
230
|
# Builds the object from hash
|