phrase 4.10.0 → 4.12.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 +14 -0
- data/README.md +5 -3
- data/docs/AutomationsApi.md +9 -5
- data/docs/Branch.md +3 -1
- data/docs/BranchMergeParameters.md +1 -1
- data/docs/BranchSyncParameters.md +17 -0
- data/docs/BranchesApi.md +66 -1
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/lib/phrase/api/automations_api.rb +14 -10
- data/lib/phrase/api/branches_api.rb +80 -2
- data/lib/phrase/models/branch.rb +15 -4
- data/lib/phrase/models/branch_merge_parameters.rb +1 -1
- data/lib/phrase/models/branch_sync_parameters.rb +197 -0
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +1 -0
- data/spec/api/automations_api_spec.rb +7 -5
- data/spec/api/branches_api_spec.rb +16 -1
- data/spec/models/branch_spec.rb +6 -0
- data/spec/models/branch_sync_parameters_spec.rb +29 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6012867c26a4c63c0e1a9e93d0d27b919f39df642c0ea24270a81e36314b80a
|
4
|
+
data.tar.gz: 4c4a4a80ebcb5b32915d7bffedfc6b43ed94298f5065937275eb37b1f9551bbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b19c4f9dc2ed8382533742011e9502ad21bc677bab7e367c41c53809f81f2bf153d0584aa26e0b51e33208cd3b675c8b80e8543297cf5fa94e1c8236e6f7b93e
|
7
|
+
data.tar.gz: 7fb948e5d7009849057907b874e1cb783b636ff0390cbc0f6558496e5fc16d0912e735215204ba4acfe83e20ea800f378e9b1c185087704e8a30bdb0055a35f7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [4.12.0](https://github.com/phrase/openapi/compare/ruby-v4.11.0...ruby-v4.12.0) (2025-10-16)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* List child branches ([#926](https://github.com/phrase/openapi/issues/926)) ([31d3b57](https://github.com/phrase/openapi/commit/31d3b57e0d1381149409b77c3e236b226cde22a1))
|
9
|
+
|
10
|
+
## [4.11.0](https://github.com/phrase/openapi/compare/ruby-v4.10.0...ruby-v4.11.0) (2025-10-01)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* add branch sync endpoint ([#912](https://github.com/phrase/openapi/issues/912)) ([3293917](https://github.com/phrase/openapi/commit/329391757b3f81574448b1b87506b85bfdeb6761))
|
16
|
+
|
3
17
|
## [4.10.0](https://github.com/phrase/openapi/compare/ruby-v4.9.0...ruby-v4.10.0) (2025-09-30)
|
4
18
|
|
5
19
|
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Phrase Strings is a translation management platform for software projects. You c
|
|
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: 4.
|
10
|
+
- Package version: 4.12.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-4.
|
59
|
+
gem install ./phrase-4.12.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-4.
|
62
|
+
(for development, run `gem install --dev ./phrase-4.12.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -154,6 +154,7 @@ Class | Method | HTTP request | Description
|
|
154
154
|
*Phrase::BranchesApi* | [**branch_delete**](docs/BranchesApi.md#branch_delete) | **DELETE** /projects/{project_id}/branches/{name} | Delete a branch
|
155
155
|
*Phrase::BranchesApi* | [**branch_merge**](docs/BranchesApi.md#branch_merge) | **PATCH** /projects/{project_id}/branches/{name}/merge | Merge a branch
|
156
156
|
*Phrase::BranchesApi* | [**branch_show**](docs/BranchesApi.md#branch_show) | **GET** /projects/{project_id}/branches/{name} | Get a single branch
|
157
|
+
*Phrase::BranchesApi* | [**branch_sync**](docs/BranchesApi.md#branch_sync) | **PATCH** /projects/{project_id}/branches/{name}/sync | Sync a branch
|
157
158
|
*Phrase::BranchesApi* | [**branch_update**](docs/BranchesApi.md#branch_update) | **PATCH** /projects/{project_id}/branches/{name} | Update a branch
|
158
159
|
*Phrase::BranchesApi* | [**branches_list**](docs/BranchesApi.md#branches_list) | **GET** /projects/{project_id}/branches | List branches
|
159
160
|
*Phrase::CommentReactionsApi* | [**reaction_create**](docs/CommentReactionsApi.md#reaction_create) | **POST** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/reactions | Create a reaction
|
@@ -435,6 +436,7 @@ Class | Method | HTTP request | Description
|
|
435
436
|
- [Phrase::BranchCreateParameters](docs/BranchCreateParameters.md)
|
436
437
|
- [Phrase::BranchMergeParameters](docs/BranchMergeParameters.md)
|
437
438
|
- [Phrase::BranchName](docs/BranchName.md)
|
439
|
+
- [Phrase::BranchSyncParameters](docs/BranchSyncParameters.md)
|
438
440
|
- [Phrase::BranchUpdateParameters](docs/BranchUpdateParameters.md)
|
439
441
|
- [Phrase::Comment](docs/Comment.md)
|
440
442
|
- [Phrase::CommentCreateParameters](docs/CommentCreateParameters.md)
|
data/docs/AutomationsApi.md
CHANGED
@@ -20,6 +20,8 @@ Method | HTTP request | Description
|
|
20
20
|
|
21
21
|
Activate an automation
|
22
22
|
|
23
|
+
Activate an automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
24
|
+
|
23
25
|
### Example
|
24
26
|
|
25
27
|
```ruby
|
@@ -81,7 +83,7 @@ Response<([**Automation**](Automation.md))>
|
|
81
83
|
|
82
84
|
Create an automation
|
83
85
|
|
84
|
-
Create a new automation.
|
86
|
+
Create a new automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
85
87
|
|
86
88
|
### Example
|
87
89
|
|
@@ -144,6 +146,8 @@ Response<([**Automation**](Automation.md))>
|
|
144
146
|
|
145
147
|
Deactivate an automation
|
146
148
|
|
149
|
+
Deactivate an automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
150
|
+
|
147
151
|
### Example
|
148
152
|
|
149
153
|
```ruby
|
@@ -205,7 +209,7 @@ Response<([**Automation**](Automation.md))>
|
|
205
209
|
|
206
210
|
Destroy automation
|
207
211
|
|
208
|
-
Destroy an automation of an account.
|
212
|
+
Destroy an automation of an account. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
209
213
|
|
210
214
|
### Example
|
211
215
|
|
@@ -267,7 +271,7 @@ Response<(nil (empty response body))>
|
|
267
271
|
|
268
272
|
Get a single automation
|
269
273
|
|
270
|
-
Get details of a single automation.
|
274
|
+
Get details of a single automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
271
275
|
|
272
276
|
### Example
|
273
277
|
|
@@ -330,7 +334,7 @@ Response<([**Automation**](Automation.md))>
|
|
330
334
|
|
331
335
|
Update an automation
|
332
336
|
|
333
|
-
Update an existing automation.
|
337
|
+
Update an existing automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
334
338
|
|
335
339
|
### Example
|
336
340
|
|
@@ -395,7 +399,7 @@ Response<([**Automation**](Automation.md))>
|
|
395
399
|
|
396
400
|
List automations
|
397
401
|
|
398
|
-
List all automations for an account.
|
402
|
+
List all automations for an account. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
399
403
|
|
400
404
|
### Example
|
401
405
|
|
data/docs/Branch.md
CHANGED
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|
13
13
|
**merged_by** | [**UserPreview**](UserPreview.md) | | [optional]
|
14
14
|
**created_by** | [**UserPreview**](UserPreview.md) | | [optional]
|
15
15
|
**state** | **String** | | [optional]
|
16
|
+
**child_branches** | **Array<String>** | | [optional]
|
16
17
|
|
17
18
|
## Code Sample
|
18
19
|
|
@@ -27,7 +28,8 @@ instance = Phrase::Branch.new(base_project_id: null,
|
|
27
28
|
merged_at: null,
|
28
29
|
merged_by: null,
|
29
30
|
created_by: null,
|
30
|
-
state: null
|
31
|
+
state: null,
|
32
|
+
child_branches: null)
|
31
33
|
```
|
32
34
|
|
33
35
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**strategy** | **String** | strategy used for merge
|
7
|
+
**strategy** | **String** | strategy used for merge conflicts, use_main or use_branch | [optional]
|
8
8
|
|
9
9
|
## Code Sample
|
10
10
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Phrase::BranchSyncParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**strategy** | **String** | strategy used for conflicts, use_main or use_branch | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'Phrase'
|
13
|
+
|
14
|
+
instance = Phrase::BranchSyncParameters.new(strategy: use_main)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/BranchesApi.md
CHANGED
@@ -9,6 +9,7 @@ Method | HTTP request | Description
|
|
9
9
|
[**branch_delete**](BranchesApi.md#branch_delete) | **DELETE** /projects/{project_id}/branches/{name} | Delete a branch
|
10
10
|
[**branch_merge**](BranchesApi.md#branch_merge) | **PATCH** /projects/{project_id}/branches/{name}/merge | Merge a branch
|
11
11
|
[**branch_show**](BranchesApi.md#branch_show) | **GET** /projects/{project_id}/branches/{name} | Get a single branch
|
12
|
+
[**branch_sync**](BranchesApi.md#branch_sync) | **PATCH** /projects/{project_id}/branches/{name}/sync | Sync a branch
|
12
13
|
[**branch_update**](BranchesApi.md#branch_update) | **PATCH** /projects/{project_id}/branches/{name} | Update a branch
|
13
14
|
[**branches_list**](BranchesApi.md#branches_list) | **GET** /projects/{project_id}/branches | List branches
|
14
15
|
|
@@ -207,7 +208,7 @@ Response<(nil (empty response body))>
|
|
207
208
|
|
208
209
|
Merge a branch
|
209
210
|
|
210
|
-
Merge an existing branch.
|
211
|
+
Merge an existing branch. *Note: Merging a branch may take several minutes depending on diff size.*
|
211
212
|
|
212
213
|
### Example
|
213
214
|
|
@@ -328,6 +329,70 @@ Response<([**Branch**](Branch.md))>
|
|
328
329
|
- **Accept**: application/json
|
329
330
|
|
330
331
|
|
332
|
+
## branch_sync
|
333
|
+
|
334
|
+
> branch_sync(project_id, name, branch_sync_parameters, opts)
|
335
|
+
|
336
|
+
Sync a branch
|
337
|
+
|
338
|
+
Sync an existing branch. *Note: Only available for branches created with new branching. New branching is currently in private beta*
|
339
|
+
|
340
|
+
### Example
|
341
|
+
|
342
|
+
```ruby
|
343
|
+
# load the gem
|
344
|
+
require 'phrase'
|
345
|
+
# setup authorization
|
346
|
+
Phrase.configure do |config|
|
347
|
+
# Configure HTTP basic authorization: Basic
|
348
|
+
config.username = 'YOUR USERNAME'
|
349
|
+
config.password = 'YOUR PASSWORD'
|
350
|
+
|
351
|
+
# Configure API key authorization: Token
|
352
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
353
|
+
config.api_key_prefix['Authorization'] = 'token'
|
354
|
+
end
|
355
|
+
|
356
|
+
api_instance = Phrase::BranchesApi.new
|
357
|
+
project_id = 'project_id_example' # String | Project ID
|
358
|
+
name = 'name_example' # String | name
|
359
|
+
branch_sync_parameters = Phrase::BranchSyncParameters.new # BranchSyncParameters |
|
360
|
+
opts = {
|
361
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
362
|
+
}
|
363
|
+
|
364
|
+
begin
|
365
|
+
#Sync a branch
|
366
|
+
api_instance.branch_sync(project_id, name, branch_sync_parameters, opts)
|
367
|
+
rescue Phrase::ApiError => e
|
368
|
+
puts "Exception when calling BranchesApi->branch_sync: #{e}"
|
369
|
+
end
|
370
|
+
```
|
371
|
+
|
372
|
+
### Parameters
|
373
|
+
|
374
|
+
|
375
|
+
Name | Type | Description | Notes
|
376
|
+
------------- | ------------- | ------------- | -------------
|
377
|
+
**project_id** | **String**| Project ID |
|
378
|
+
**name** | **String**| name |
|
379
|
+
**branch_sync_parameters** | [**BranchSyncParameters**](BranchSyncParameters.md)| |
|
380
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
381
|
+
|
382
|
+
### Return type
|
383
|
+
|
384
|
+
Response<(nil (empty response body))>
|
385
|
+
|
386
|
+
### Authorization
|
387
|
+
|
388
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
389
|
+
|
390
|
+
### HTTP request headers
|
391
|
+
|
392
|
+
- **Content-Type**: application/json
|
393
|
+
- **Accept**: Not defined
|
394
|
+
|
395
|
+
|
331
396
|
## branch_update
|
332
397
|
|
333
398
|
> Branch branch_update(project_id, name, branch_update_parameters, opts)
|
data/docs/KeyCreateParameters.md
CHANGED
@@ -38,7 +38,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
|
|
38
38
|
data_type: number,
|
39
39
|
tags: awesome-feature,needs-proofreading,
|
40
40
|
max_characters_allowed: 140,
|
41
|
-
screenshot: [B@
|
41
|
+
screenshot: [B@6325a546,
|
42
42
|
remove_screenshot: null,
|
43
43
|
unformatted: null,
|
44
44
|
default_translation_content: Default translation content,
|
data/docs/KeyUpdateParameters.md
CHANGED
@@ -36,7 +36,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
|
|
36
36
|
data_type: number,
|
37
37
|
tags: awesome-feature,needs-proofreading,
|
38
38
|
max_characters_allowed: 140,
|
39
|
-
screenshot: [B@
|
39
|
+
screenshot: [B@89eab25,
|
40
40
|
remove_screenshot: null,
|
41
41
|
unformatted: null,
|
42
42
|
xml_space_preserve: null,
|
@@ -37,7 +37,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
|
|
37
37
|
main_format: yml,
|
38
38
|
media: Python,
|
39
39
|
shares_translation_memory: true,
|
40
|
-
project_image: [B@
|
40
|
+
project_image: [B@31b5db46,
|
41
41
|
remove_project_image: null,
|
42
42
|
account_id: abcd1234,
|
43
43
|
point_of_contact: abcd1234,
|
@@ -39,7 +39,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
|
|
39
39
|
main_format: yml,
|
40
40
|
media: Python,
|
41
41
|
shares_translation_memory: true,
|
42
|
-
project_image: [B@
|
42
|
+
project_image: [B@78026a45,
|
43
43
|
remove_project_image: false,
|
44
44
|
workflow: review,
|
45
45
|
machine_translation_enabled: true,
|
@@ -8,6 +8,7 @@ module Phrase
|
|
8
8
|
@api_client = api_client
|
9
9
|
end
|
10
10
|
# Activate an automation
|
11
|
+
# Activate an automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
11
12
|
# @param account_id [String] Account ID
|
12
13
|
# @param id [String] ID
|
13
14
|
# @param [Hash] opts the optional parameters
|
@@ -19,6 +20,7 @@ module Phrase
|
|
19
20
|
end
|
20
21
|
|
21
22
|
# Activate an automation
|
23
|
+
# Activate an automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
22
24
|
# @param account_id [String] Account ID
|
23
25
|
# @param id [String] ID
|
24
26
|
# @param [Hash] opts the optional parameters
|
@@ -78,7 +80,7 @@ module Phrase
|
|
78
80
|
end
|
79
81
|
|
80
82
|
# Create an automation
|
81
|
-
# Create a new automation.
|
83
|
+
# Create a new automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
82
84
|
# @param account_id [String] Account ID
|
83
85
|
# @param automations_create_parameters [AutomationsCreateParameters]
|
84
86
|
# @param [Hash] opts the optional parameters
|
@@ -90,7 +92,7 @@ module Phrase
|
|
90
92
|
end
|
91
93
|
|
92
94
|
# Create an automation
|
93
|
-
# Create a new automation.
|
95
|
+
# Create a new automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
94
96
|
# @param account_id [String] Account ID
|
95
97
|
# @param automations_create_parameters [AutomationsCreateParameters]
|
96
98
|
# @param [Hash] opts the optional parameters
|
@@ -152,6 +154,7 @@ module Phrase
|
|
152
154
|
end
|
153
155
|
|
154
156
|
# Deactivate an automation
|
157
|
+
# Deactivate an automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
155
158
|
# @param account_id [String] Account ID
|
156
159
|
# @param id [String] ID
|
157
160
|
# @param [Hash] opts the optional parameters
|
@@ -163,6 +166,7 @@ module Phrase
|
|
163
166
|
end
|
164
167
|
|
165
168
|
# Deactivate an automation
|
169
|
+
# Deactivate an automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
166
170
|
# @param account_id [String] Account ID
|
167
171
|
# @param id [String] ID
|
168
172
|
# @param [Hash] opts the optional parameters
|
@@ -222,7 +226,7 @@ module Phrase
|
|
222
226
|
end
|
223
227
|
|
224
228
|
# Destroy automation
|
225
|
-
# Destroy an automation of an account.
|
229
|
+
# Destroy an automation of an account. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
226
230
|
# @param account_id [String] Account ID
|
227
231
|
# @param id [String] ID
|
228
232
|
# @param [Hash] opts the optional parameters
|
@@ -234,7 +238,7 @@ module Phrase
|
|
234
238
|
end
|
235
239
|
|
236
240
|
# Destroy automation
|
237
|
-
# Destroy an automation of an account.
|
241
|
+
# Destroy an automation of an account. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
238
242
|
# @param account_id [String] Account ID
|
239
243
|
# @param id [String] ID
|
240
244
|
# @param [Hash] opts the optional parameters
|
@@ -292,7 +296,7 @@ module Phrase
|
|
292
296
|
end
|
293
297
|
|
294
298
|
# Get a single automation
|
295
|
-
# Get details of a single automation.
|
299
|
+
# Get details of a single automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
296
300
|
# @param account_id [String] Account ID
|
297
301
|
# @param id [String] ID
|
298
302
|
# @param [Hash] opts the optional parameters
|
@@ -304,7 +308,7 @@ module Phrase
|
|
304
308
|
end
|
305
309
|
|
306
310
|
# Get a single automation
|
307
|
-
# Get details of a single automation.
|
311
|
+
# Get details of a single automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
308
312
|
# @param account_id [String] Account ID
|
309
313
|
# @param id [String] ID
|
310
314
|
# @param [Hash] opts the optional parameters
|
@@ -364,7 +368,7 @@ module Phrase
|
|
364
368
|
end
|
365
369
|
|
366
370
|
# Update an automation
|
367
|
-
# Update an existing automation.
|
371
|
+
# Update an existing automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
368
372
|
# @param account_id [String] Account ID
|
369
373
|
# @param id [String] ID
|
370
374
|
# @param automations_create_parameters1 [AutomationsCreateParameters1]
|
@@ -377,7 +381,7 @@ module Phrase
|
|
377
381
|
end
|
378
382
|
|
379
383
|
# Update an automation
|
380
|
-
# Update an existing automation.
|
384
|
+
# Update an existing automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
381
385
|
# @param account_id [String] Account ID
|
382
386
|
# @param id [String] ID
|
383
387
|
# @param automations_create_parameters1 [AutomationsCreateParameters1]
|
@@ -444,7 +448,7 @@ module Phrase
|
|
444
448
|
end
|
445
449
|
|
446
450
|
# List automations
|
447
|
-
# List all automations for an account.
|
451
|
+
# List all automations for an account. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
448
452
|
# @param account_id [String] Account ID
|
449
453
|
# @param [Hash] opts the optional parameters
|
450
454
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
@@ -457,7 +461,7 @@ module Phrase
|
|
457
461
|
end
|
458
462
|
|
459
463
|
# List automations
|
460
|
-
# List all automations for an account.
|
464
|
+
# List all automations for an account. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
461
465
|
# @param account_id [String] Account ID
|
462
466
|
# @param [Hash] opts the optional parameters
|
463
467
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
@@ -222,7 +222,7 @@ module Phrase
|
|
222
222
|
end
|
223
223
|
|
224
224
|
# Merge a branch
|
225
|
-
# Merge an existing branch.
|
225
|
+
# Merge an existing branch. *Note: Merging a branch may take several minutes depending on diff size.*
|
226
226
|
# @param project_id [String] Project ID
|
227
227
|
# @param name [String] name
|
228
228
|
# @param branch_merge_parameters [BranchMergeParameters]
|
@@ -235,7 +235,7 @@ module Phrase
|
|
235
235
|
end
|
236
236
|
|
237
237
|
# Merge a branch
|
238
|
-
# Merge an existing branch.
|
238
|
+
# Merge an existing branch. *Note: Merging a branch may take several minutes depending on diff size.*
|
239
239
|
# @param project_id [String] Project ID
|
240
240
|
# @param name [String] name
|
241
241
|
# @param branch_merge_parameters [BranchMergeParameters]
|
@@ -371,6 +371,84 @@ module Phrase
|
|
371
371
|
return response, status_code, headers
|
372
372
|
end
|
373
373
|
|
374
|
+
# Sync a branch
|
375
|
+
# Sync an existing branch. *Note: Only available for branches created with new branching. New branching is currently in private beta*
|
376
|
+
# @param project_id [String] Project ID
|
377
|
+
# @param name [String] name
|
378
|
+
# @param branch_sync_parameters [BranchSyncParameters]
|
379
|
+
# @param [Hash] opts the optional parameters
|
380
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
381
|
+
# @return [nil]
|
382
|
+
def branch_sync(project_id, name, branch_sync_parameters, opts = {})
|
383
|
+
data, _status_code, _headers = branch_sync_with_http_info(project_id, name, branch_sync_parameters, opts)
|
384
|
+
data
|
385
|
+
end
|
386
|
+
|
387
|
+
# Sync a branch
|
388
|
+
# Sync an existing branch. *Note: Only available for branches created with new branching. New branching is currently in private beta*
|
389
|
+
# @param project_id [String] Project ID
|
390
|
+
# @param name [String] name
|
391
|
+
# @param branch_sync_parameters [BranchSyncParameters]
|
392
|
+
# @param [Hash] opts the optional parameters
|
393
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
394
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
395
|
+
def branch_sync_with_http_info(project_id, name, branch_sync_parameters, opts = {})
|
396
|
+
if @api_client.config.debugging
|
397
|
+
@api_client.config.logger.debug 'Calling API: BranchesApi.branch_sync ...'
|
398
|
+
end
|
399
|
+
# verify the required parameter 'project_id' is set
|
400
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
401
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branch_sync"
|
402
|
+
end
|
403
|
+
# verify the required parameter 'name' is set
|
404
|
+
if @api_client.config.client_side_validation && name.nil?
|
405
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling BranchesApi.branch_sync"
|
406
|
+
end
|
407
|
+
# verify the required parameter 'branch_sync_parameters' is set
|
408
|
+
if @api_client.config.client_side_validation && branch_sync_parameters.nil?
|
409
|
+
fail ArgumentError, "Missing the required parameter 'branch_sync_parameters' when calling BranchesApi.branch_sync"
|
410
|
+
end
|
411
|
+
# resource path
|
412
|
+
local_var_path = '/projects/{project_id}/branches/{name}/sync'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
413
|
+
|
414
|
+
# query parameters
|
415
|
+
query_params = opts[:query_params] || {}
|
416
|
+
|
417
|
+
# header parameters
|
418
|
+
header_params = opts[:header_params] || {}
|
419
|
+
# HTTP header 'Content-Type'
|
420
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
421
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
422
|
+
|
423
|
+
# form parameters
|
424
|
+
form_params = opts[:form_params] || {}
|
425
|
+
|
426
|
+
# http body (model)
|
427
|
+
post_body = opts[:body] || @api_client.object_to_http_body(branch_sync_parameters)
|
428
|
+
|
429
|
+
# return_type
|
430
|
+
return_type = opts[:return_type]
|
431
|
+
|
432
|
+
# auth_names
|
433
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
434
|
+
|
435
|
+
new_options = opts.merge(
|
436
|
+
:header_params => header_params,
|
437
|
+
:query_params => query_params,
|
438
|
+
:form_params => form_params,
|
439
|
+
:body => post_body,
|
440
|
+
:auth_names => auth_names,
|
441
|
+
:return_type => return_type
|
442
|
+
)
|
443
|
+
|
444
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
445
|
+
if @api_client.config.debugging
|
446
|
+
@api_client.config.logger.debug "API called: BranchesApi#branch_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
447
|
+
end
|
448
|
+
response = ::Phrase::Response.new(data, headers)
|
449
|
+
return response, status_code, headers
|
450
|
+
end
|
451
|
+
|
374
452
|
# Update a branch
|
375
453
|
# Update an existing branch.
|
376
454
|
# @param project_id [String] Project ID
|
data/lib/phrase/models/branch.rb
CHANGED
@@ -20,6 +20,8 @@ module Phrase
|
|
20
20
|
|
21
21
|
attr_accessor :state
|
22
22
|
|
23
|
+
attr_accessor :child_branches
|
24
|
+
|
23
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
26
|
def self.attribute_map
|
25
27
|
{
|
@@ -31,7 +33,8 @@ module Phrase
|
|
31
33
|
:'merged_at' => :'merged_at',
|
32
34
|
:'merged_by' => :'merged_by',
|
33
35
|
:'created_by' => :'created_by',
|
34
|
-
:'state' => :'state'
|
36
|
+
:'state' => :'state',
|
37
|
+
:'child_branches' => :'child_branches'
|
35
38
|
}
|
36
39
|
end
|
37
40
|
|
@@ -46,7 +49,8 @@ module Phrase
|
|
46
49
|
:'merged_at' => :'DateTime',
|
47
50
|
:'merged_by' => :'UserPreview',
|
48
51
|
:'created_by' => :'UserPreview',
|
49
|
-
:'state' => :'String'
|
52
|
+
:'state' => :'String',
|
53
|
+
:'child_branches' => :'Array<String>'
|
50
54
|
}
|
51
55
|
end
|
52
56
|
|
@@ -106,6 +110,12 @@ module Phrase
|
|
106
110
|
if attributes.key?(:'state')
|
107
111
|
self.state = attributes[:'state']
|
108
112
|
end
|
113
|
+
|
114
|
+
if attributes.key?(:'child_branches')
|
115
|
+
if (value = attributes[:'child_branches']).is_a?(Array)
|
116
|
+
self.child_branches = value
|
117
|
+
end
|
118
|
+
end
|
109
119
|
end
|
110
120
|
|
111
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -134,7 +144,8 @@ module Phrase
|
|
134
144
|
merged_at == o.merged_at &&
|
135
145
|
merged_by == o.merged_by &&
|
136
146
|
created_by == o.created_by &&
|
137
|
-
state == o.state
|
147
|
+
state == o.state &&
|
148
|
+
child_branches == o.child_branches
|
138
149
|
end
|
139
150
|
|
140
151
|
# @see the `==` method
|
@@ -146,7 +157,7 @@ module Phrase
|
|
146
157
|
# Calculates hash code according to all attributes.
|
147
158
|
# @return [Integer] Hash code
|
148
159
|
def hash
|
149
|
-
[base_project_id, branch_project_id, name, created_at, updated_at, merged_at, merged_by, created_by, state].hash
|
160
|
+
[base_project_id, branch_project_id, name, created_at, updated_at, merged_at, merged_by, created_by, state, child_branches].hash
|
150
161
|
end
|
151
162
|
|
152
163
|
# Builds the object from hash
|
@@ -2,7 +2,7 @@ require 'date'
|
|
2
2
|
|
3
3
|
module Phrase
|
4
4
|
class BranchMergeParameters
|
5
|
-
# strategy used for merge
|
5
|
+
# strategy used for merge conflicts, use_main or use_branch
|
6
6
|
attr_accessor :strategy
|
7
7
|
|
8
8
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -0,0 +1,197 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class BranchSyncParameters
|
5
|
+
# strategy used for conflicts, use_main or use_branch
|
6
|
+
attr_accessor :strategy
|
7
|
+
|
8
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:'strategy' => :'strategy'
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
# Attribute type mapping.
|
16
|
+
def self.openapi_types
|
17
|
+
{
|
18
|
+
:'strategy' => :'String'
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# List of attributes with nullable: true
|
23
|
+
def self.openapi_nullable
|
24
|
+
Set.new([
|
25
|
+
])
|
26
|
+
end
|
27
|
+
|
28
|
+
# Initializes the object
|
29
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
30
|
+
def initialize(attributes = {})
|
31
|
+
if (!attributes.is_a?(Hash))
|
32
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::BranchSyncParameters` initialize method"
|
33
|
+
end
|
34
|
+
|
35
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
36
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
37
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
38
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::BranchSyncParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
39
|
+
end
|
40
|
+
h[k.to_sym] = v
|
41
|
+
}
|
42
|
+
|
43
|
+
if attributes.key?(:'strategy')
|
44
|
+
self.strategy = attributes[:'strategy']
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
49
|
+
# @return Array for valid properties with the reasons
|
50
|
+
def list_invalid_properties
|
51
|
+
invalid_properties = Array.new
|
52
|
+
invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Checks equality by comparing each attribute.
|
62
|
+
# @param [Object] Object to be compared
|
63
|
+
def ==(o)
|
64
|
+
return true if self.equal?(o)
|
65
|
+
self.class == o.class &&
|
66
|
+
strategy == o.strategy
|
67
|
+
end
|
68
|
+
|
69
|
+
# @see the `==` method
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def eql?(o)
|
72
|
+
self == o
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Integer] Hash code
|
77
|
+
def hash
|
78
|
+
[strategy].hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# Builds the object from hash
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
# @return [Object] Returns the model itself
|
84
|
+
def self.build_from_hash(attributes)
|
85
|
+
new.build_from_hash(attributes)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Builds the object from hash
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
90
|
+
# @return [Object] Returns the model itself
|
91
|
+
def build_from_hash(attributes)
|
92
|
+
return nil unless attributes.is_a?(Hash)
|
93
|
+
self.class.openapi_types.each_pair do |key, type|
|
94
|
+
if type =~ /\AArray<(.*)>/i
|
95
|
+
# check to ensure the input is an array given that the attribute
|
96
|
+
# is documented as an array but the input is not
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
99
|
+
end
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
102
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
103
|
+
end
|
104
|
+
|
105
|
+
self
|
106
|
+
end
|
107
|
+
|
108
|
+
# Deserializes the data based on type
|
109
|
+
# @param string type Data type
|
110
|
+
# @param string value Value to be deserialized
|
111
|
+
# @return [Object] Deserialized data
|
112
|
+
def _deserialize(type, value)
|
113
|
+
case type.to_sym
|
114
|
+
when :DateTime
|
115
|
+
DateTime.parse(value)
|
116
|
+
when :Date
|
117
|
+
Date.parse(value)
|
118
|
+
when :Time
|
119
|
+
Time.parse(value)
|
120
|
+
when :String
|
121
|
+
value.to_s
|
122
|
+
when :Integer
|
123
|
+
value.to_i
|
124
|
+
when :Float
|
125
|
+
value.to_f
|
126
|
+
when :Boolean
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
128
|
+
true
|
129
|
+
else
|
130
|
+
false
|
131
|
+
end
|
132
|
+
when :Object
|
133
|
+
# generic object (usually a Hash), return directly
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else # model
|
147
|
+
Phrase.const_get(type).build_from_hash(value)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
# Returns the string representation of the object
|
152
|
+
# @return [String] String presentation of the object
|
153
|
+
def to_s
|
154
|
+
to_hash.to_s
|
155
|
+
end
|
156
|
+
|
157
|
+
# to_body is an alias to to_hash (backward compatibility)
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
159
|
+
def to_body
|
160
|
+
to_hash
|
161
|
+
end
|
162
|
+
|
163
|
+
# Returns the object in the form of hash
|
164
|
+
# @return [Hash] Returns the object in the form of hash
|
165
|
+
def to_hash
|
166
|
+
hash = {}
|
167
|
+
self.class.attribute_map.each_pair do |attr, param|
|
168
|
+
value = self.send(attr)
|
169
|
+
if value.nil?
|
170
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
171
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
172
|
+
end
|
173
|
+
|
174
|
+
hash[param] = _to_hash(value)
|
175
|
+
end
|
176
|
+
hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Outputs non-array value in the form of hash
|
180
|
+
# For object, use to_hash. Otherwise, just return the value
|
181
|
+
# @param [Object] value Any valid value
|
182
|
+
# @return [Hash] Returns the value in the form of hash
|
183
|
+
def _to_hash(value)
|
184
|
+
if value.is_a?(Array)
|
185
|
+
value.compact.map { |v| _to_hash(v) }
|
186
|
+
elsif value.is_a?(Hash)
|
187
|
+
{}.tap do |hash|
|
188
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
189
|
+
end
|
190
|
+
elsif value.respond_to? :to_hash
|
191
|
+
value.to_hash
|
192
|
+
else
|
193
|
+
value
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
data/lib/phrase/version.rb
CHANGED
data/lib/phrase.rb
CHANGED
@@ -27,6 +27,7 @@ require 'phrase/models/branch'
|
|
27
27
|
require 'phrase/models/branch_create_parameters'
|
28
28
|
require 'phrase/models/branch_merge_parameters'
|
29
29
|
require 'phrase/models/branch_name'
|
30
|
+
require 'phrase/models/branch_sync_parameters'
|
30
31
|
require 'phrase/models/branch_update_parameters'
|
31
32
|
require 'phrase/models/comment'
|
32
33
|
require 'phrase/models/comment_create_parameters'
|
@@ -22,6 +22,7 @@ describe 'AutomationsApi' do
|
|
22
22
|
|
23
23
|
# unit tests for automation_activate
|
24
24
|
# Activate an automation
|
25
|
+
# Activate an automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
25
26
|
# @param account_id Account ID
|
26
27
|
# @param id ID
|
27
28
|
# @param [Hash] opts the optional parameters
|
@@ -35,7 +36,7 @@ describe 'AutomationsApi' do
|
|
35
36
|
|
36
37
|
# unit tests for automation_create
|
37
38
|
# Create an automation
|
38
|
-
# Create a new automation.
|
39
|
+
# Create a new automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
39
40
|
# @param account_id Account ID
|
40
41
|
# @param automations_create_parameters
|
41
42
|
# @param [Hash] opts the optional parameters
|
@@ -49,6 +50,7 @@ describe 'AutomationsApi' do
|
|
49
50
|
|
50
51
|
# unit tests for automation_deactivate
|
51
52
|
# Deactivate an automation
|
53
|
+
# Deactivate an automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
52
54
|
# @param account_id Account ID
|
53
55
|
# @param id ID
|
54
56
|
# @param [Hash] opts the optional parameters
|
@@ -62,7 +64,7 @@ describe 'AutomationsApi' do
|
|
62
64
|
|
63
65
|
# unit tests for automation_delete
|
64
66
|
# Destroy automation
|
65
|
-
# Destroy an automation of an account.
|
67
|
+
# Destroy an automation of an account. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
66
68
|
# @param account_id Account ID
|
67
69
|
# @param id ID
|
68
70
|
# @param [Hash] opts the optional parameters
|
@@ -76,7 +78,7 @@ describe 'AutomationsApi' do
|
|
76
78
|
|
77
79
|
# unit tests for automation_show
|
78
80
|
# Get a single automation
|
79
|
-
# Get details of a single automation.
|
81
|
+
# Get details of a single automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
80
82
|
# @param account_id Account ID
|
81
83
|
# @param id ID
|
82
84
|
# @param [Hash] opts the optional parameters
|
@@ -90,7 +92,7 @@ describe 'AutomationsApi' do
|
|
90
92
|
|
91
93
|
# unit tests for automation_update
|
92
94
|
# Update an automation
|
93
|
-
# Update an existing automation.
|
95
|
+
# Update an existing automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
94
96
|
# @param account_id Account ID
|
95
97
|
# @param id ID
|
96
98
|
# @param automations_create_parameters1
|
@@ -105,7 +107,7 @@ describe 'AutomationsApi' do
|
|
105
107
|
|
106
108
|
# unit tests for automations_list
|
107
109
|
# List automations
|
108
|
-
# List all automations for an account.
|
110
|
+
# List all automations for an account. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
|
109
111
|
# @param account_id Account ID
|
110
112
|
# @param [Hash] opts the optional parameters
|
111
113
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
@@ -64,7 +64,7 @@ describe 'BranchesApi' do
|
|
64
64
|
|
65
65
|
# unit tests for branch_merge
|
66
66
|
# Merge a branch
|
67
|
-
# Merge an existing branch.
|
67
|
+
# Merge an existing branch. *Note: Merging a branch may take several minutes depending on diff size.*
|
68
68
|
# @param project_id Project ID
|
69
69
|
# @param name name
|
70
70
|
# @param branch_merge_parameters
|
@@ -91,6 +91,21 @@ describe 'BranchesApi' do
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
# unit tests for branch_sync
|
95
|
+
# Sync a branch
|
96
|
+
# Sync an existing branch. *Note: Only available for branches created with new branching. New branching is currently in private beta*
|
97
|
+
# @param project_id Project ID
|
98
|
+
# @param name name
|
99
|
+
# @param branch_sync_parameters
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
102
|
+
# @return [nil]
|
103
|
+
describe 'branch_sync test' do
|
104
|
+
it 'should work' do
|
105
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
94
109
|
# unit tests for branch_update
|
95
110
|
# Update a branch
|
96
111
|
# Update an existing branch.
|
data/spec/models/branch_spec.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'json'
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# Unit tests for Phrase::BranchSyncParameters
|
6
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
7
|
+
# Please update as you see appropriate
|
8
|
+
describe 'BranchSyncParameters' do
|
9
|
+
before do
|
10
|
+
# run before each test
|
11
|
+
@instance = Phrase::BranchSyncParameters.new
|
12
|
+
end
|
13
|
+
|
14
|
+
after do
|
15
|
+
# run after each test
|
16
|
+
end
|
17
|
+
|
18
|
+
describe 'test an instance of BranchSyncParameters' do
|
19
|
+
it 'should create an instance of BranchSyncParameters' do
|
20
|
+
expect(@instance).to be_instance_of(Phrase::BranchSyncParameters)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "strategy"' do
|
24
|
+
it 'should work' do
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phrase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phrase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- docs/BranchCreateParameters.md
|
102
102
|
- docs/BranchMergeParameters.md
|
103
103
|
- docs/BranchName.md
|
104
|
+
- docs/BranchSyncParameters.md
|
104
105
|
- docs/BranchUpdateParameters.md
|
105
106
|
- docs/BranchesApi.md
|
106
107
|
- docs/Comment.md
|
@@ -432,6 +433,7 @@ files:
|
|
432
433
|
- lib/phrase/models/branch_create_parameters.rb
|
433
434
|
- lib/phrase/models/branch_merge_parameters.rb
|
434
435
|
- lib/phrase/models/branch_name.rb
|
436
|
+
- lib/phrase/models/branch_sync_parameters.rb
|
435
437
|
- lib/phrase/models/branch_update_parameters.rb
|
436
438
|
- lib/phrase/models/comment.rb
|
437
439
|
- lib/phrase/models/comment_create_parameters.rb
|
@@ -711,6 +713,7 @@ files:
|
|
711
713
|
- spec/models/branch_merge_parameters_spec.rb
|
712
714
|
- spec/models/branch_name_spec.rb
|
713
715
|
- spec/models/branch_spec.rb
|
716
|
+
- spec/models/branch_sync_parameters_spec.rb
|
714
717
|
- spec/models/branch_update_parameters_spec.rb
|
715
718
|
- spec/models/comment_create_parameters1_spec.rb
|
716
719
|
- spec/models/comment_create_parameters_spec.rb
|
@@ -1182,6 +1185,7 @@ test_files:
|
|
1182
1185
|
- spec/models/job_locale_complete_review_parameters_spec.rb
|
1183
1186
|
- spec/models/screenshot_marker_update_parameters_spec.rb
|
1184
1187
|
- spec/models/distribution_create_parameters_spec.rb
|
1188
|
+
- spec/models/branch_sync_parameters_spec.rb
|
1185
1189
|
- spec/models/quality_performance_score_list_request_spec.rb
|
1186
1190
|
- spec/models/distribution_update_parameters_spec.rb
|
1187
1191
|
- spec/models/affected_count_spec.rb
|