phrase 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fab3b1e5927c606f8aa084c6fd447790ad73966e6ef23e793efea5024010c56e
4
- data.tar.gz: dfa7a8651a85ea4de73fd8a451df1538a91986e92562f8cf62088b0d51291080
3
+ metadata.gz: f0afc1546c07fa31b7164efead62346a4e2c15713741b4bd82f6820b5fa20bb4
4
+ data.tar.gz: 26b9f3b45aadf02a99ad6223d777c88bc6d7b1c72920a5cfdfe477dade70d80e
5
5
  SHA512:
6
- metadata.gz: 5cfe0d98a53f4151f91f16e94294fd465b856b9eceb26835baab8c21a5501595513f4d2293f8c478079b7929d9f772fd320b3492647687dd50b4b4efc149fa9c
7
- data.tar.gz: ed9a85f5907ee16c95556a1013f2c44f5d249ecff1949e66298cdf3b50174275b4f5d2cc98a3f51ae4c397d0de3517cd4d96343e32171fec94752b354b7a926c
6
+ metadata.gz: e7e35314a1218e0474017639dff3526b6f589206a54516952a47992274a128782e082954aab7976024970c9ba1814a8511a1a1d948b4fca908a4d0ce3ddb4e51
7
+ data.tar.gz: 63ebccacb2b16c1a49360f73481e89270d3ea55c9eab1fe8af693d8a6a597ca4c5dafb30e4a404b4de7bd99e50b24ed552342e829cd62ae178d8cd17a5e7f720
data/README.md CHANGED
@@ -7,7 +7,7 @@ Phrase is a translation management platform for software projects. You can colla
7
7
  ## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 2.6.0
10
+ - Package version: 2.7.0
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
13
13
 
@@ -56,10 +56,10 @@ gem build phrase.gemspec
56
56
  Then install the gem locally:
57
57
 
58
58
  ```shell
59
- gem install ./phrase-2.6.0.gem
59
+ gem install ./phrase-2.7.0.gem
60
60
  ```
61
61
 
62
- (for development, run `gem install --dev ./phrase-2.6.0.gem` to install the development dependencies)
62
+ (for development, run `gem install --dev ./phrase-2.7.0.gem` to install the development dependencies)
63
63
 
64
64
  ## Getting Started
65
65
 
@@ -199,9 +199,11 @@ Class | Method | HTTP request | Description
199
199
  *Phrase::JobsApi* | [**job_delete**](docs/JobsApi.md#job_delete) | **DELETE** /projects/{project_id}/jobs/{id} | Delete a job
200
200
  *Phrase::JobsApi* | [**job_keys_create**](docs/JobsApi.md#job_keys_create) | **POST** /projects/{project_id}/jobs/{id}/keys | Add keys to job
201
201
  *Phrase::JobsApi* | [**job_keys_delete**](docs/JobsApi.md#job_keys_delete) | **DELETE** /projects/{project_id}/jobs/{id}/keys | Remove keys from job
202
+ *Phrase::JobsApi* | [**job_lock**](docs/JobsApi.md#job_lock) | **POST** /projects/{project_id}/jobs/{id}/lock | Lock a job
202
203
  *Phrase::JobsApi* | [**job_reopen**](docs/JobsApi.md#job_reopen) | **POST** /projects/{project_id}/jobs/{id}/reopen | Reopen a job
203
204
  *Phrase::JobsApi* | [**job_show**](docs/JobsApi.md#job_show) | **GET** /projects/{project_id}/jobs/{id} | Get a single job
204
205
  *Phrase::JobsApi* | [**job_start**](docs/JobsApi.md#job_start) | **POST** /projects/{project_id}/jobs/{id}/start | Start a job
206
+ *Phrase::JobsApi* | [**job_unlock**](docs/JobsApi.md#job_unlock) | **POST** /projects/{project_id}/jobs/{id}/unlock | Unlock a job
205
207
  *Phrase::JobsApi* | [**job_update**](docs/JobsApi.md#job_update) | **PATCH** /projects/{project_id}/jobs/{id} | Update a job
206
208
  *Phrase::JobsApi* | [**jobs_by_account**](docs/JobsApi.md#jobs_by_account) | **GET** /accounts/{account_id}/jobs | List account jobs
207
209
  *Phrase::JobsApi* | [**jobs_list**](docs/JobsApi.md#jobs_list) | **GET** /projects/{project_id}/jobs | List jobs
@@ -475,9 +477,9 @@ Class | Method | HTTP request | Description
475
477
  - [Phrase::TagWithStats1Statistics](docs/TagWithStats1Statistics.md)
476
478
  - [Phrase::TagWithStats1Statistics1](docs/TagWithStats1Statistics1.md)
477
479
  - [Phrase::Team](docs/Team.md)
478
- - [Phrase::Team1](docs/Team1.md)
479
480
  - [Phrase::TeamCreateParameters](docs/TeamCreateParameters.md)
480
481
  - [Phrase::TeamDetail](docs/TeamDetail.md)
482
+ - [Phrase::TeamShort](docs/TeamShort.md)
481
483
  - [Phrase::TeamUpdateParameters](docs/TeamUpdateParameters.md)
482
484
  - [Phrase::TeamsProjectsCreateParameters](docs/TeamsProjectsCreateParameters.md)
483
485
  - [Phrase::TeamsSpacesCreateParameters](docs/TeamsSpacesCreateParameters.md)
data/docs/Invitation.md CHANGED
@@ -10,14 +10,14 @@ Name | Type | Description | Notes
10
10
  **state** | **String** | | [optional]
11
11
  **projects** | [**Array<ProjectShort>**](ProjectShort.md) | | [optional]
12
12
  **locales** | [**Array<LocalePreview>**](LocalePreview.md) | | [optional]
13
+ **teams** | [**Array<TeamShort>**](TeamShort.md) | | [optional]
13
14
  **default_locale_codes** | **Array<String>** | | [optional]
14
15
  **permissions** | [**Object**](.md) | | [optional]
15
16
  **locale_ids** | **Array<String>** | | [optional]
16
17
  **created_at** | **DateTime** | | [optional]
17
18
  **updated_at** | **DateTime** | | [optional]
18
19
  **accepted_at** | **DateTime** | | [optional]
19
- **spaces** | [**Array<MemberSpaces>**](MemberSpaces.md) | | [optional]
20
- **teams** | [**Array<Items>**](Items.md) | | [optional]
20
+ **spaces** | [**Array<Space>**](Space.md) | | [optional]
21
21
  **project_role** | [**Array<MemberProjectDetailProjectRoles>**](MemberProjectDetailProjectRoles.md) | | [optional]
22
22
 
23
23
  ## Code Sample
@@ -31,6 +31,7 @@ instance = Phrase::Invitation.new(id: null,
31
31
  state: null,
32
32
  projects: null,
33
33
  locales: null,
34
+ teams: null,
34
35
  default_locale_codes: null,
35
36
  permissions: null,
36
37
  locale_ids: null,
@@ -38,7 +39,6 @@ instance = Phrase::Invitation.new(id: null,
38
39
  updated_at: null,
39
40
  accepted_at: null,
40
41
  spaces: null,
41
- teams: null,
42
42
  project_role: null)
43
43
  ```
44
44
 
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
12
12
  **ticket_url** | **String** | URL to a ticket for this job (e.g. Jira, Trello) | [optional]
13
13
  **tags** | **Array<String>** | tags of keys that should be included within the job | [optional]
14
14
  **translation_key_ids** | **Array<String>** | ids of keys that should be included within the job | [optional]
15
+ **job_template_id** | **String** | id of a job template you would like to model the created job after. Any manually added parameters will take preference over template attributes. | [optional]
15
16
 
16
17
  ## Code Sample
17
18
 
@@ -25,7 +26,8 @@ instance = Phrase::JobCreateParameters.new(branch: my-feature-branch,
25
26
  due_date: null,
26
27
  ticket_url: https://example.atlassian.net/browse/FOO,
27
28
  tags: ["myUploadTag"],
28
- translation_key_ids: ["abcd1234cdef1234abcd1234cdef1234"])
29
+ translation_key_ids: ["abcd1234cdef1234abcd1234cdef1234"],
30
+ job_template_id: abcd1234cdef1234abcd1234cdef1234)
29
31
  ```
30
32
 
31
33
 
data/docs/JobsApi.md CHANGED
@@ -9,9 +9,11 @@ Method | HTTP request | Description
9
9
  [**job_delete**](JobsApi.md#job_delete) | **DELETE** /projects/{project_id}/jobs/{id} | Delete a job
10
10
  [**job_keys_create**](JobsApi.md#job_keys_create) | **POST** /projects/{project_id}/jobs/{id}/keys | Add keys to job
11
11
  [**job_keys_delete**](JobsApi.md#job_keys_delete) | **DELETE** /projects/{project_id}/jobs/{id}/keys | Remove keys from job
12
+ [**job_lock**](JobsApi.md#job_lock) | **POST** /projects/{project_id}/jobs/{id}/lock | Lock a job
12
13
  [**job_reopen**](JobsApi.md#job_reopen) | **POST** /projects/{project_id}/jobs/{id}/reopen | Reopen a job
13
14
  [**job_show**](JobsApi.md#job_show) | **GET** /projects/{project_id}/jobs/{id} | Get a single job
14
15
  [**job_start**](JobsApi.md#job_start) | **POST** /projects/{project_id}/jobs/{id}/start | Start a job
16
+ [**job_unlock**](JobsApi.md#job_unlock) | **POST** /projects/{project_id}/jobs/{id}/unlock | Unlock a job
15
17
  [**job_update**](JobsApi.md#job_update) | **PATCH** /projects/{project_id}/jobs/{id} | Update a job
16
18
  [**jobs_by_account**](JobsApi.md#jobs_by_account) | **GET** /accounts/{account_id}/jobs | List account jobs
17
19
  [**jobs_list**](JobsApi.md#jobs_list) | **GET** /projects/{project_id}/jobs | List jobs
@@ -341,6 +343,70 @@ Response<(nil (empty response body))>
341
343
  - **Accept**: Not defined
342
344
 
343
345
 
346
+ ## job_lock
347
+
348
+ > job_lock(project_id, id, opts)
349
+
350
+ Lock a job
351
+
352
+ If you are the job owner, you may lock a job using this API request.
353
+
354
+ ### Example
355
+
356
+ ```ruby
357
+ # load the gem
358
+ require 'phrase'
359
+ # setup authorization
360
+ Phrase.configure do |config|
361
+ # Configure HTTP basic authorization: Basic
362
+ config.username = 'YOUR USERNAME'
363
+ config.password = 'YOUR PASSWORD'
364
+
365
+ # Configure API key authorization: Token
366
+ config.api_key['Authorization'] = 'YOUR API KEY'
367
+ config.api_key_prefix['Authorization'] = 'token'
368
+ end
369
+
370
+ api_instance = Phrase::JobsApi.new
371
+ project_id = 'project_id_example' # String | Project ID
372
+ id = 'id_example' # String | ID
373
+ opts = {
374
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
375
+ branch: 'my-feature-branch' # String | specify the branch to use
376
+ }
377
+
378
+ begin
379
+ #Lock a job
380
+ api_instance.job_lock(project_id, id, opts)
381
+ rescue Phrase::ApiError => e
382
+ puts "Exception when calling JobsApi->job_lock: #{e}"
383
+ end
384
+ ```
385
+
386
+ ### Parameters
387
+
388
+
389
+ Name | Type | Description | Notes
390
+ ------------- | ------------- | ------------- | -------------
391
+ **project_id** | **String**| Project ID |
392
+ **id** | **String**| ID |
393
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
394
+ **branch** | **String**| specify the branch to use | [optional]
395
+
396
+ ### Return type
397
+
398
+ Response<(nil (empty response body))>
399
+
400
+ ### Authorization
401
+
402
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
403
+
404
+ ### HTTP request headers
405
+
406
+ - **Content-Type**: Not defined
407
+ - **Accept**: Not defined
408
+
409
+
344
410
  ## job_reopen
345
411
 
346
412
  > JobDetails job_reopen(project_id, id, job_reopen_parameters, opts)
@@ -536,6 +602,70 @@ Response<([**JobDetails**](JobDetails.md))>
536
602
  - **Accept**: application/json
537
603
 
538
604
 
605
+ ## job_unlock
606
+
607
+ > job_unlock(project_id, id, opts)
608
+
609
+ Unlock a job
610
+
611
+ If you are the job owner, you may unlock a locked job using this API request.
612
+
613
+ ### Example
614
+
615
+ ```ruby
616
+ # load the gem
617
+ require 'phrase'
618
+ # setup authorization
619
+ Phrase.configure do |config|
620
+ # Configure HTTP basic authorization: Basic
621
+ config.username = 'YOUR USERNAME'
622
+ config.password = 'YOUR PASSWORD'
623
+
624
+ # Configure API key authorization: Token
625
+ config.api_key['Authorization'] = 'YOUR API KEY'
626
+ config.api_key_prefix['Authorization'] = 'token'
627
+ end
628
+
629
+ api_instance = Phrase::JobsApi.new
630
+ project_id = 'project_id_example' # String | Project ID
631
+ id = 'id_example' # String | ID
632
+ opts = {
633
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
634
+ branch: 'my-feature-branch' # String | specify the branch to use
635
+ }
636
+
637
+ begin
638
+ #Unlock a job
639
+ api_instance.job_unlock(project_id, id, opts)
640
+ rescue Phrase::ApiError => e
641
+ puts "Exception when calling JobsApi->job_unlock: #{e}"
642
+ end
643
+ ```
644
+
645
+ ### Parameters
646
+
647
+
648
+ Name | Type | Description | Notes
649
+ ------------- | ------------- | ------------- | -------------
650
+ **project_id** | **String**| Project ID |
651
+ **id** | **String**| ID |
652
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
653
+ **branch** | **String**| specify the branch to use | [optional]
654
+
655
+ ### Return type
656
+
657
+ Response<(nil (empty response body))>
658
+
659
+ ### Authorization
660
+
661
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
662
+
663
+ ### HTTP request headers
664
+
665
+ - **Content-Type**: Not defined
666
+ - **Accept**: Not defined
667
+
668
+
539
669
  ## job_update
540
670
 
541
671
  > JobDetails job_update(project_id, id, job_update_parameters, opts)
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
15
15
  **screenshot** | **File** | Screenshot/image for the key. This parameter is deprecated. Please use the Screenshots endpoint instead. | [optional]
16
16
  **remove_screenshot** | **Boolean** | Indicates whether the screenshot will be deleted. This parameter is deprecated. Please use the Screenshots endpoint instead. | [optional]
17
17
  **unformatted** | **Boolean** | Indicates whether the key should be exported as \&quot;unformatted\&quot;. Supported by Android XML and other formats. | [optional]
18
+ **default_translation_content** | **String** | Creates a translation in the default locale with the specified content | [optional]
18
19
  **xml_space_preserve** | **Boolean** | Indicates whether the key should be exported with \&quot;xml:space&#x3D;preserve\&quot;. Supported by several XML-based formats. | [optional]
19
20
  **original_file** | **String** | Original file attribute. Used in some formats, e.g. XLIFF. | [optional]
20
21
  **localized_format_string** | **String** | NSStringLocalizedFormatKey attribute. Used in .stringsdict format. | [optional]
@@ -36,6 +37,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
36
37
  screenshot: null,
37
38
  remove_screenshot: null,
38
39
  unformatted: null,
40
+ default_translation_content: Default translation content,
39
41
  xml_space_preserve: null,
40
42
  original_file: null,
41
43
  localized_format_string: null,
data/docs/Member.md CHANGED
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
13
13
  **projects** | [**Array&lt;ProjectLocales&gt;**](ProjectLocales.md) | | [optional]
14
14
  **permissions** | [**Object**](.md) | | [optional]
15
15
  **default_locale_codes** | **Array&lt;String&gt;** | | [optional]
16
- **teams** | [**Array&lt;Team1&gt;**](Team1.md) | | [optional]
16
+ **teams** | [**Array&lt;TeamShort&gt;**](TeamShort.md) | | [optional]
17
17
  **spaces** | [**Array&lt;MemberSpaces&gt;**](MemberSpaces.md) | | [optional]
18
18
 
19
19
  ## Code Sample
@@ -1,4 +1,4 @@
1
- # Phrase::Team1
1
+ # Phrase::TeamShort
2
2
 
3
3
  ## Properties
4
4
 
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
14
14
  ```ruby
15
15
  require 'Phrase'
16
16
 
17
- instance = Phrase::Team1.new(id: null,
17
+ instance = Phrase::TeamShort.new(id: null,
18
18
  name: null,
19
19
  created_at: null,
20
20
  updated_at: null)
@@ -390,6 +390,79 @@ module Phrase
390
390
  return response, status_code, headers
391
391
  end
392
392
 
393
+ # Lock a job
394
+ # If you are the job owner, you may lock a job using this API request.
395
+ # @param project_id [String] Project ID
396
+ # @param id [String] ID
397
+ # @param [Hash] opts the optional parameters
398
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
399
+ # @option opts [String] :branch specify the branch to use
400
+ # @return [nil]
401
+ def job_lock(project_id, id, opts = {})
402
+ data, _status_code, _headers = job_lock_with_http_info(project_id, id, opts)
403
+ data
404
+ end
405
+
406
+ # Lock a job
407
+ # If you are the job owner, you may lock a job using this API request.
408
+ # @param project_id [String] Project ID
409
+ # @param id [String] ID
410
+ # @param [Hash] opts the optional parameters
411
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
412
+ # @option opts [String] :branch specify the branch to use
413
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
414
+ def job_lock_with_http_info(project_id, id, opts = {})
415
+ if @api_client.config.debugging
416
+ @api_client.config.logger.debug 'Calling API: JobsApi.job_lock ...'
417
+ end
418
+ # verify the required parameter 'project_id' is set
419
+ if @api_client.config.client_side_validation && project_id.nil?
420
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_lock"
421
+ end
422
+ # verify the required parameter 'id' is set
423
+ if @api_client.config.client_side_validation && id.nil?
424
+ fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_lock"
425
+ end
426
+ # resource path
427
+ local_var_path = '/projects/{project_id}/jobs/{id}/lock'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
428
+
429
+ # query parameters
430
+ query_params = opts[:query_params] || {}
431
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
432
+
433
+ # header parameters
434
+ header_params = opts[:header_params] || {}
435
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
436
+
437
+ # form parameters
438
+ form_params = opts[:form_params] || {}
439
+
440
+ # http body (model)
441
+ post_body = opts[:body]
442
+
443
+ # return_type
444
+ return_type = opts[:return_type]
445
+
446
+ # auth_names
447
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
448
+
449
+ new_options = opts.merge(
450
+ :header_params => header_params,
451
+ :query_params => query_params,
452
+ :form_params => form_params,
453
+ :body => post_body,
454
+ :auth_names => auth_names,
455
+ :return_type => return_type
456
+ )
457
+
458
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
459
+ if @api_client.config.debugging
460
+ @api_client.config.logger.debug "API called: JobsApi#job_lock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
461
+ end
462
+ response = ::Phrase::Response.new(data, headers)
463
+ return response, status_code, headers
464
+ end
465
+
393
466
  # Reopen a job
394
467
  # Mark a job as uncompleted.
395
468
  # @param project_id [String] Project ID
@@ -625,6 +698,79 @@ module Phrase
625
698
  return response, status_code, headers
626
699
  end
627
700
 
701
+ # Unlock a job
702
+ # If you are the job owner, you may unlock a locked job using this API request.
703
+ # @param project_id [String] Project ID
704
+ # @param id [String] ID
705
+ # @param [Hash] opts the optional parameters
706
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
707
+ # @option opts [String] :branch specify the branch to use
708
+ # @return [nil]
709
+ def job_unlock(project_id, id, opts = {})
710
+ data, _status_code, _headers = job_unlock_with_http_info(project_id, id, opts)
711
+ data
712
+ end
713
+
714
+ # Unlock a job
715
+ # If you are the job owner, you may unlock a locked job using this API request.
716
+ # @param project_id [String] Project ID
717
+ # @param id [String] ID
718
+ # @param [Hash] opts the optional parameters
719
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
720
+ # @option opts [String] :branch specify the branch to use
721
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
722
+ def job_unlock_with_http_info(project_id, id, opts = {})
723
+ if @api_client.config.debugging
724
+ @api_client.config.logger.debug 'Calling API: JobsApi.job_unlock ...'
725
+ end
726
+ # verify the required parameter 'project_id' is set
727
+ if @api_client.config.client_side_validation && project_id.nil?
728
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_unlock"
729
+ end
730
+ # verify the required parameter 'id' is set
731
+ if @api_client.config.client_side_validation && id.nil?
732
+ fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_unlock"
733
+ end
734
+ # resource path
735
+ local_var_path = '/projects/{project_id}/jobs/{id}/unlock'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
736
+
737
+ # query parameters
738
+ query_params = opts[:query_params] || {}
739
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
740
+
741
+ # header parameters
742
+ header_params = opts[:header_params] || {}
743
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
744
+
745
+ # form parameters
746
+ form_params = opts[:form_params] || {}
747
+
748
+ # http body (model)
749
+ post_body = opts[:body]
750
+
751
+ # return_type
752
+ return_type = opts[:return_type]
753
+
754
+ # auth_names
755
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
756
+
757
+ new_options = opts.merge(
758
+ :header_params => header_params,
759
+ :query_params => query_params,
760
+ :form_params => form_params,
761
+ :body => post_body,
762
+ :auth_names => auth_names,
763
+ :return_type => return_type
764
+ )
765
+
766
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
767
+ if @api_client.config.debugging
768
+ @api_client.config.logger.debug "API called: JobsApi#job_unlock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
769
+ end
770
+ response = ::Phrase::Response.new(data, headers)
771
+ return response, status_code, headers
772
+ end
773
+
628
774
  # Update a job
629
775
  # Update an existing job.
630
776
  # @param project_id [String] Project ID
@@ -14,6 +14,8 @@ module Phrase
14
14
 
15
15
  attr_accessor :locales
16
16
 
17
+ attr_accessor :teams
18
+
17
19
  attr_accessor :default_locale_codes
18
20
 
19
21
  attr_accessor :permissions
@@ -28,8 +30,6 @@ module Phrase
28
30
 
29
31
  attr_accessor :spaces
30
32
 
31
- attr_accessor :teams
32
-
33
33
  attr_accessor :project_role
34
34
 
35
35
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -41,6 +41,7 @@ module Phrase
41
41
  :'state' => :'state',
42
42
  :'projects' => :'projects',
43
43
  :'locales' => :'locales',
44
+ :'teams' => :'teams',
44
45
  :'default_locale_codes' => :'default_locale_codes',
45
46
  :'permissions' => :'permissions',
46
47
  :'locale_ids' => :'locale_ids',
@@ -48,7 +49,6 @@ module Phrase
48
49
  :'updated_at' => :'updated_at',
49
50
  :'accepted_at' => :'accepted_at',
50
51
  :'spaces' => :'spaces',
51
- :'teams' => :'teams',
52
52
  :'project_role' => :'project_role'
53
53
  }
54
54
  end
@@ -62,14 +62,14 @@ module Phrase
62
62
  :'state' => :'String',
63
63
  :'projects' => :'Array<ProjectShort>',
64
64
  :'locales' => :'Array<LocalePreview>',
65
+ :'teams' => :'Array<TeamShort>',
65
66
  :'default_locale_codes' => :'Array<String>',
66
67
  :'permissions' => :'Object',
67
68
  :'locale_ids' => :'Array<String>',
68
69
  :'created_at' => :'DateTime',
69
70
  :'updated_at' => :'DateTime',
70
71
  :'accepted_at' => :'DateTime',
71
- :'spaces' => :'Array<MemberSpaces>',
72
- :'teams' => :'Array<Items>',
72
+ :'spaces' => :'Array<Space>',
73
73
  :'project_role' => :'Array<MemberProjectDetailProjectRoles>'
74
74
  }
75
75
  end
@@ -123,6 +123,12 @@ module Phrase
123
123
  end
124
124
  end
125
125
 
126
+ if attributes.key?(:'teams')
127
+ if (value = attributes[:'teams']).is_a?(Array)
128
+ self.teams = value
129
+ end
130
+ end
131
+
126
132
  if attributes.key?(:'default_locale_codes')
127
133
  if (value = attributes[:'default_locale_codes']).is_a?(Array)
128
134
  self.default_locale_codes = value
@@ -157,12 +163,6 @@ module Phrase
157
163
  end
158
164
  end
159
165
 
160
- if attributes.key?(:'teams')
161
- if (value = attributes[:'teams']).is_a?(Array)
162
- self.teams = value
163
- end
164
- end
165
-
166
166
  if attributes.key?(:'project_role')
167
167
  if (value = attributes[:'project_role']).is_a?(Array)
168
168
  self.project_role = value
@@ -194,6 +194,7 @@ module Phrase
194
194
  state == o.state &&
195
195
  projects == o.projects &&
196
196
  locales == o.locales &&
197
+ teams == o.teams &&
197
198
  default_locale_codes == o.default_locale_codes &&
198
199
  permissions == o.permissions &&
199
200
  locale_ids == o.locale_ids &&
@@ -201,7 +202,6 @@ module Phrase
201
202
  updated_at == o.updated_at &&
202
203
  accepted_at == o.accepted_at &&
203
204
  spaces == o.spaces &&
204
- teams == o.teams &&
205
205
  project_role == o.project_role
206
206
  end
207
207
 
@@ -214,7 +214,7 @@ module Phrase
214
214
  # Calculates hash code according to all attributes.
215
215
  # @return [Integer] Hash code
216
216
  def hash
217
- [id, email, role, state, projects, locales, default_locale_codes, permissions, locale_ids, created_at, updated_at, accepted_at, spaces, teams, project_role].hash
217
+ [id, email, role, state, projects, locales, teams, default_locale_codes, permissions, locale_ids, created_at, updated_at, accepted_at, spaces, project_role].hash
218
218
  end
219
219
 
220
220
  # Builds the object from hash
@@ -26,6 +26,9 @@ module Phrase
26
26
  # ids of keys that should be included within the job
27
27
  attr_accessor :translation_key_ids
28
28
 
29
+ # id of a job template you would like to model the created job after. Any manually added parameters will take preference over template attributes.
30
+ attr_accessor :job_template_id
31
+
29
32
  # Attribute mapping from ruby-style variable name to JSON key.
30
33
  def self.attribute_map
31
34
  {
@@ -36,7 +39,8 @@ module Phrase
36
39
  :'due_date' => :'due_date',
37
40
  :'ticket_url' => :'ticket_url',
38
41
  :'tags' => :'tags',
39
- :'translation_key_ids' => :'translation_key_ids'
42
+ :'translation_key_ids' => :'translation_key_ids',
43
+ :'job_template_id' => :'job_template_id'
40
44
  }
41
45
  end
42
46
 
@@ -50,7 +54,8 @@ module Phrase
50
54
  :'due_date' => :'DateTime',
51
55
  :'ticket_url' => :'String',
52
56
  :'tags' => :'Array<String>',
53
- :'translation_key_ids' => :'Array<String>'
57
+ :'translation_key_ids' => :'Array<String>',
58
+ :'job_template_id' => :'String'
54
59
  }
55
60
  end
56
61
 
@@ -110,6 +115,10 @@ module Phrase
110
115
  self.translation_key_ids = value
111
116
  end
112
117
  end
118
+
119
+ if attributes.key?(:'job_template_id')
120
+ self.job_template_id = attributes[:'job_template_id']
121
+ end
113
122
  end
114
123
 
115
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -137,7 +146,8 @@ module Phrase
137
146
  due_date == o.due_date &&
138
147
  ticket_url == o.ticket_url &&
139
148
  tags == o.tags &&
140
- translation_key_ids == o.translation_key_ids
149
+ translation_key_ids == o.translation_key_ids &&
150
+ job_template_id == o.job_template_id
141
151
  end
142
152
 
143
153
  # @see the `==` method
@@ -149,7 +159,7 @@ module Phrase
149
159
  # Calculates hash code according to all attributes.
150
160
  # @return [Integer] Hash code
151
161
  def hash
152
- [branch, name, source_locale_id, briefing, due_date, ticket_url, tags, translation_key_ids].hash
162
+ [branch, name, source_locale_id, briefing, due_date, ticket_url, tags, translation_key_ids, job_template_id].hash
153
163
  end
154
164
 
155
165
  # Builds the object from hash
@@ -35,6 +35,9 @@ module Phrase
35
35
  # Indicates whether the key should be exported as \"unformatted\". Supported by Android XML and other formats.
36
36
  attr_accessor :unformatted
37
37
 
38
+ # Creates a translation in the default locale with the specified content
39
+ attr_accessor :default_translation_content
40
+
38
41
  # Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats.
39
42
  attr_accessor :xml_space_preserve
40
43
 
@@ -61,6 +64,7 @@ module Phrase
61
64
  :'screenshot' => :'screenshot',
62
65
  :'remove_screenshot' => :'remove_screenshot',
63
66
  :'unformatted' => :'unformatted',
67
+ :'default_translation_content' => :'default_translation_content',
64
68
  :'xml_space_preserve' => :'xml_space_preserve',
65
69
  :'original_file' => :'original_file',
66
70
  :'localized_format_string' => :'localized_format_string',
@@ -82,6 +86,7 @@ module Phrase
82
86
  :'screenshot' => :'File',
83
87
  :'remove_screenshot' => :'Boolean',
84
88
  :'unformatted' => :'Boolean',
89
+ :'default_translation_content' => :'String',
85
90
  :'xml_space_preserve' => :'Boolean',
86
91
  :'original_file' => :'String',
87
92
  :'localized_format_string' => :'String',
@@ -154,6 +159,10 @@ module Phrase
154
159
  self.unformatted = attributes[:'unformatted']
155
160
  end
156
161
 
162
+ if attributes.key?(:'default_translation_content')
163
+ self.default_translation_content = attributes[:'default_translation_content']
164
+ end
165
+
157
166
  if attributes.key?(:'xml_space_preserve')
158
167
  self.xml_space_preserve = attributes[:'xml_space_preserve']
159
168
  end
@@ -200,6 +209,7 @@ module Phrase
200
209
  screenshot == o.screenshot &&
201
210
  remove_screenshot == o.remove_screenshot &&
202
211
  unformatted == o.unformatted &&
212
+ default_translation_content == o.default_translation_content &&
203
213
  xml_space_preserve == o.xml_space_preserve &&
204
214
  original_file == o.original_file &&
205
215
  localized_format_string == o.localized_format_string &&
@@ -215,7 +225,7 @@ module Phrase
215
225
  # Calculates hash code according to all attributes.
216
226
  # @return [Integer] Hash code
217
227
  def hash
218
- [branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, xml_space_preserve, original_file, localized_format_string, localized_format_key].hash
228
+ [branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, xml_space_preserve, original_file, localized_format_string, localized_format_key].hash
219
229
  end
220
230
 
221
231
  # Builds the object from hash