phrase 4.9.0 → 4.11.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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +15 -3
  4. data/docs/Automation.md +41 -0
  5. data/docs/AutomationsApi.md +455 -0
  6. data/docs/AutomationsCreateParameters.md +31 -0
  7. data/docs/AutomationsCreateParameters1.md +31 -0
  8. data/docs/BranchMergeParameters.md +1 -1
  9. data/docs/BranchSyncParameters.md +17 -0
  10. data/docs/BranchesApi.md +66 -1
  11. data/docs/KeyCreateParameters.md +1 -1
  12. data/docs/KeyUpdateParameters.md +1 -1
  13. data/docs/ProjectCreateParameters.md +1 -1
  14. data/docs/ProjectUpdateParameters.md +1 -1
  15. data/docs/ScreenshotUpdateParameters.md +1 -1
  16. data/docs/TranslationUpdateParameters.md +3 -1
  17. data/docs/UploadsApi.md +2 -2
  18. data/lib/phrase/api/automations_api.rb +518 -0
  19. data/lib/phrase/api/branches_api.rb +80 -2
  20. data/lib/phrase/api/uploads_api.rb +2 -2
  21. data/lib/phrase/models/automation.rb +355 -0
  22. data/lib/phrase/models/automations_create_parameters.rb +326 -0
  23. data/lib/phrase/models/automations_create_parameters1.rb +326 -0
  24. data/lib/phrase/models/branch_merge_parameters.rb +1 -1
  25. data/lib/phrase/models/branch_sync_parameters.rb +197 -0
  26. data/lib/phrase/models/translation_update_parameters.rb +14 -4
  27. data/lib/phrase/version.rb +1 -1
  28. data/lib/phrase.rb +5 -0
  29. data/spec/api/automations_api_spec.rb +121 -0
  30. data/spec/api/branches_api_spec.rb +16 -1
  31. data/spec/models/automation_spec.rb +113 -0
  32. data/spec/models/automations_create_parameters1_spec.rb +79 -0
  33. data/spec/models/automations_create_parameters_spec.rb +79 -0
  34. data/spec/models/branch_sync_parameters_spec.rb +29 -0
  35. data/spec/models/translation_update_parameters_spec.rb +6 -0
  36. metadata +251 -231
@@ -0,0 +1,121 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::AutomationsApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'AutomationsApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::AutomationsApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of AutomationsApi' do
18
+ it 'should create an instance of AutomationsApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::AutomationsApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for automation_activate
24
+ # Activate an automation
25
+ # @param account_id Account ID
26
+ # @param id ID
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
29
+ # @return [Automation]
30
+ describe 'automation_activate test' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
33
+ end
34
+ end
35
+
36
+ # unit tests for automation_create
37
+ # Create an automation
38
+ # Create a new automation.
39
+ # @param account_id Account ID
40
+ # @param automations_create_parameters
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
43
+ # @return [Automation]
44
+ describe 'automation_create test' do
45
+ it 'should work' do
46
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
+ end
48
+ end
49
+
50
+ # unit tests for automation_deactivate
51
+ # Deactivate an automation
52
+ # @param account_id Account ID
53
+ # @param id ID
54
+ # @param [Hash] opts the optional parameters
55
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
56
+ # @return [Automation]
57
+ describe 'automation_deactivate test' do
58
+ it 'should work' do
59
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ end
61
+ end
62
+
63
+ # unit tests for automation_delete
64
+ # Destroy automation
65
+ # Destroy an automation of an account. This endpoint is only available to accounts with advanced plans or above.
66
+ # @param account_id Account ID
67
+ # @param id ID
68
+ # @param [Hash] opts the optional parameters
69
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
70
+ # @return [nil]
71
+ describe 'automation_delete test' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
77
+ # unit tests for automation_show
78
+ # Get a single automation
79
+ # Get details of a single automation.
80
+ # @param account_id Account ID
81
+ # @param id ID
82
+ # @param [Hash] opts the optional parameters
83
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
84
+ # @return [Automation]
85
+ describe 'automation_show test' do
86
+ it 'should work' do
87
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
88
+ end
89
+ end
90
+
91
+ # unit tests for automation_update
92
+ # Update an automation
93
+ # Update an existing automation.
94
+ # @param account_id Account ID
95
+ # @param id ID
96
+ # @param automations_create_parameters1
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
99
+ # @return [Automation]
100
+ describe 'automation_update test' do
101
+ it 'should work' do
102
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
103
+ end
104
+ end
105
+
106
+ # unit tests for automations_list
107
+ # List automations
108
+ # List all automations for an account. This endpoint is only available to accounts with advanced plans or above.
109
+ # @param account_id Account ID
110
+ # @param [Hash] opts the optional parameters
111
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
112
+ # @option opts [Integer] :page Page number
113
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
114
+ # @return [Array<Automation>]
115
+ describe 'automations_list test' do
116
+ it 'should work' do
117
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
118
+ end
119
+ end
120
+
121
+ end
@@ -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. *Note: Merging a branch may take several minutes depending on diff size.*
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.
@@ -0,0 +1,113 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::Automation
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'Automation' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::Automation.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of Automation' do
19
+ it 'should create an instance of Automation' do
20
+ expect(@instance).to be_instance_of(Phrase::Automation)
21
+ end
22
+ end
23
+ describe 'test attribute "id"' 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
+ describe 'test attribute "name"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "status"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["inactive", "active", "error"])
39
+ # validator.allowable_values.each do |value|
40
+ # expect { @instance.status = value }.not_to raise_error
41
+ # end
42
+ end
43
+ end
44
+
45
+ describe 'test attribute "trigger"' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["schedule", "upload"])
49
+ # validator.allowable_values.each do |value|
50
+ # expect { @instance.trigger = value }.not_to raise_error
51
+ # end
52
+ end
53
+ end
54
+
55
+ describe 'test attribute "status_filters"' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["unverified", "untranslated", "ready_for_review"])
59
+ # validator.allowable_values.each do |value|
60
+ # expect { @instance.status_filters = value }.not_to raise_error
61
+ # end
62
+ end
63
+ end
64
+
65
+ describe 'test attribute "project_id"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ describe 'test attribute "job_template_id"' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
77
+ describe 'test attribute "tags"' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ describe 'test attribute "cron_schedule"' do
84
+ it 'should work' do
85
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ end
87
+ end
88
+
89
+ describe 'test attribute "time_zone"' do
90
+ it 'should work' do
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
94
+
95
+ describe 'test attribute "account"' do
96
+ it 'should work' do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
101
+ describe 'test attribute "created_at"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
107
+ describe 'test attribute "updated_at"' do
108
+ it 'should work' do
109
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
110
+ end
111
+ end
112
+
113
+ end
@@ -0,0 +1,79 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::AutomationsCreateParameters1
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'AutomationsCreateParameters1' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::AutomationsCreateParameters1.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of AutomationsCreateParameters1' do
19
+ it 'should create an instance of AutomationsCreateParameters1' do
20
+ expect(@instance).to be_instance_of(Phrase::AutomationsCreateParameters1)
21
+ end
22
+ end
23
+ describe 'test attribute "name"' 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
+ describe 'test attribute "trigger"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["schedule", "upload"])
33
+ # validator.allowable_values.each do |value|
34
+ # expect { @instance.trigger = value }.not_to raise_error
35
+ # end
36
+ end
37
+ end
38
+
39
+ describe 'test attribute "project_ids"' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ describe 'test attribute "job_template_id"' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ describe 'test attribute "status_filters"' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["unverified", "untranslated", "ready_for_review"])
55
+ # validator.allowable_values.each do |value|
56
+ # expect { @instance.status_filters = value }.not_to raise_error
57
+ # end
58
+ end
59
+ end
60
+
61
+ describe 'test attribute "tags"' do
62
+ it 'should work' do
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
67
+ describe 'test attribute "cron_schedule"' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
+ end
71
+ end
72
+
73
+ describe 'test attribute "time_zone"' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ end
@@ -0,0 +1,79 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::AutomationsCreateParameters
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'AutomationsCreateParameters' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::AutomationsCreateParameters.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of AutomationsCreateParameters' do
19
+ it 'should create an instance of AutomationsCreateParameters' do
20
+ expect(@instance).to be_instance_of(Phrase::AutomationsCreateParameters)
21
+ end
22
+ end
23
+ describe 'test attribute "name"' 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
+ describe 'test attribute "trigger"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["schedule", "upload"])
33
+ # validator.allowable_values.each do |value|
34
+ # expect { @instance.trigger = value }.not_to raise_error
35
+ # end
36
+ end
37
+ end
38
+
39
+ describe 'test attribute "project_ids"' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ describe 'test attribute "job_template_id"' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ describe 'test attribute "status_filters"' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["unverified", "untranslated", "ready_for_review"])
55
+ # validator.allowable_values.each do |value|
56
+ # expect { @instance.status_filters = value }.not_to raise_error
57
+ # end
58
+ end
59
+ end
60
+
61
+ describe 'test attribute "tags"' do
62
+ it 'should work' do
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
67
+ describe 'test attribute "cron_schedule"' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
+ end
71
+ end
72
+
73
+ describe 'test attribute "time_zone"' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ end
@@ -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
@@ -56,4 +56,10 @@ describe 'TranslationUpdateParameters' do
56
56
  end
57
57
  end
58
58
 
59
+ describe 'test attribute "reviewed"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
59
65
  end