phrase 1.0.8 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -3
  3. data/docs/BranchName.md +17 -0
  4. data/docs/Invitation.md +9 -1
  5. data/docs/InvitationCreateParameters.md +4 -0
  6. data/docs/InvitationUpdateParameters.md +4 -0
  7. data/docs/InvitationUpdateSettingsParameters.md +19 -0
  8. data/docs/InvitationsApi.md +66 -0
  9. data/docs/Job.md +5 -3
  10. data/docs/JobDetails.md +4 -2
  11. data/docs/JobLocale.md +3 -1
  12. data/docs/LocalesApi.md +2 -0
  13. data/docs/Member.md +7 -1
  14. data/docs/MemberProjectDetail.md +35 -0
  15. data/docs/MemberProjectDetailProjectRoles.md +19 -0
  16. data/docs/MemberSpaces.md +25 -0
  17. data/docs/MemberUpdateParameters.md +4 -0
  18. data/docs/MemberUpdateSettingsParameters.md +19 -0
  19. data/docs/MembersApi.md +66 -0
  20. data/docs/ProjectUpdateParameters.md +43 -9
  21. data/docs/Variable.md +23 -0
  22. data/docs/VariableCreateParameters.md +19 -0
  23. data/docs/VariableUpdateParameters.md +19 -0
  24. data/docs/VariablesApi.md +331 -0
  25. data/docs/Webhook.md +2 -0
  26. data/docs/WebhookCreateParameters.md +3 -1
  27. data/docs/WebhookUpdateParameters.md +3 -1
  28. data/lib/phrase.rb +10 -0
  29. data/lib/phrase/api/invitations_api.rb +80 -0
  30. data/lib/phrase/api/locales_api.rb +3 -0
  31. data/lib/phrase/api/members_api.rb +80 -0
  32. data/lib/phrase/api/variables_api.rb +378 -0
  33. data/lib/phrase/models/branch_name.rb +194 -0
  34. data/lib/phrase/models/invitation.rb +48 -4
  35. data/lib/phrase/models/invitation_create_parameters.rb +25 -1
  36. data/lib/phrase/models/invitation_update_parameters.rb +25 -1
  37. data/lib/phrase/models/invitation_update_settings_parameters.rb +207 -0
  38. data/lib/phrase/models/job.rb +22 -13
  39. data/lib/phrase/models/job_details.rb +19 -10
  40. data/lib/phrase/models/job_locale.rb +13 -4
  41. data/lib/phrase/models/member.rb +35 -4
  42. data/lib/phrase/models/member_project_detail.rb +285 -0
  43. data/lib/phrase/models/member_project_detail_project_roles.rb +203 -0
  44. data/lib/phrase/models/member_spaces.rb +230 -0
  45. data/lib/phrase/models/member_update_parameters.rb +25 -1
  46. data/lib/phrase/models/member_update_settings_parameters.rb +207 -0
  47. data/lib/phrase/models/project_update_parameters.rb +183 -13
  48. data/lib/phrase/models/variable.rb +221 -0
  49. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  50. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  51. data/lib/phrase/models/webhook.rb +10 -1
  52. data/lib/phrase/models/webhook_create_parameters.rb +14 -4
  53. data/lib/phrase/models/webhook_update_parameters.rb +14 -4
  54. data/lib/phrase/version.rb +1 -1
  55. data/spec/api/invitations_api_spec.rb +15 -0
  56. data/spec/api/locales_api_spec.rb +1 -0
  57. data/spec/api/members_api_spec.rb +15 -0
  58. data/spec/api/variables_api_spec.rb +95 -0
  59. data/spec/models/branch_name_spec.rb +29 -0
  60. data/spec/models/invitation_create_parameters_spec.rb +12 -0
  61. data/spec/models/invitation_spec.rb +24 -0
  62. data/spec/models/invitation_update_parameters_spec.rb +12 -0
  63. data/spec/models/invitation_update_settings_parameters_spec.rb +35 -0
  64. data/spec/models/job_details_spec.rb +9 -3
  65. data/spec/models/job_locale_spec.rb +6 -0
  66. data/spec/models/job_spec.rb +9 -3
  67. data/spec/models/member_project_detail_project_roles_spec.rb +35 -0
  68. data/spec/models/member_project_detail_spec.rb +83 -0
  69. data/spec/models/member_spaces_spec.rb +53 -0
  70. data/spec/models/member_spec.rb +18 -0
  71. data/spec/models/member_update_parameters_spec.rb +12 -0
  72. data/spec/models/member_update_settings_parameters_spec.rb +35 -0
  73. data/spec/models/project_update_parameters_spec.rb +103 -1
  74. data/spec/models/variable_create_parameters_spec.rb +35 -0
  75. data/spec/models/variable_spec.rb +47 -0
  76. data/spec/models/variable_update_parameters_spec.rb +35 -0
  77. data/spec/models/webhook_create_parameters_spec.rb +6 -0
  78. data/spec/models/webhook_spec.rb +6 -0
  79. data/spec/models/webhook_update_parameters_spec.rb +6 -0
  80. metadata +205 -165
@@ -12,6 +12,8 @@ module Phrase
12
12
 
13
13
  attr_accessor :active
14
14
 
15
+ attr_accessor :include_branches
16
+
15
17
  attr_accessor :created_at
16
18
 
17
19
  attr_accessor :updated_at
@@ -24,6 +26,7 @@ module Phrase
24
26
  :'description' => :'description',
25
27
  :'events' => :'events',
26
28
  :'active' => :'active',
29
+ :'include_branches' => :'include_branches',
27
30
  :'created_at' => :'created_at',
28
31
  :'updated_at' => :'updated_at'
29
32
  }
@@ -37,6 +40,7 @@ module Phrase
37
40
  :'description' => :'String',
38
41
  :'events' => :'Array<String>',
39
42
  :'active' => :'Boolean',
43
+ :'include_branches' => :'Boolean',
40
44
  :'created_at' => :'DateTime',
41
45
  :'updated_at' => :'DateTime'
42
46
  }
@@ -85,6 +89,10 @@ module Phrase
85
89
  self.active = attributes[:'active']
86
90
  end
87
91
 
92
+ if attributes.key?(:'include_branches')
93
+ self.include_branches = attributes[:'include_branches']
94
+ end
95
+
88
96
  if attributes.key?(:'created_at')
89
97
  self.created_at = attributes[:'created_at']
90
98
  end
@@ -117,6 +125,7 @@ module Phrase
117
125
  description == o.description &&
118
126
  events == o.events &&
119
127
  active == o.active &&
128
+ include_branches == o.include_branches &&
120
129
  created_at == o.created_at &&
121
130
  updated_at == o.updated_at
122
131
  end
@@ -130,7 +139,7 @@ module Phrase
130
139
  # Calculates hash code according to all attributes.
131
140
  # @return [Integer] Hash code
132
141
  def hash
133
- [id, callback_url, description, events, active, created_at, updated_at].hash
142
+ [id, callback_url, description, events, active, include_branches, created_at, updated_at].hash
134
143
  end
135
144
 
136
145
  # Builds the object from hash
@@ -17,6 +17,9 @@ module Phrase
17
17
  # Whether webhook is active or inactive
18
18
  attr_accessor :active
19
19
 
20
+ # If enabled, webhook will also be triggered for events from branches of the project specified.
21
+ attr_accessor :include_branches
22
+
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
@@ -24,7 +27,8 @@ module Phrase
24
27
  :'secret' => :'secret',
25
28
  :'description' => :'description',
26
29
  :'events' => :'events',
27
- :'active' => :'active'
30
+ :'active' => :'active',
31
+ :'include_branches' => :'include_branches'
28
32
  }
29
33
  end
30
34
 
@@ -35,7 +39,8 @@ module Phrase
35
39
  :'secret' => :'String',
36
40
  :'description' => :'String',
37
41
  :'events' => :'String',
38
- :'active' => :'Boolean'
42
+ :'active' => :'Boolean',
43
+ :'include_branches' => :'Boolean'
39
44
  }
40
45
  end
41
46
 
@@ -79,6 +84,10 @@ module Phrase
79
84
  if attributes.key?(:'active')
80
85
  self.active = attributes[:'active']
81
86
  end
87
+
88
+ if attributes.key?(:'include_branches')
89
+ self.include_branches = attributes[:'include_branches']
90
+ end
82
91
  end
83
92
 
84
93
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -103,7 +112,8 @@ module Phrase
103
112
  secret == o.secret &&
104
113
  description == o.description &&
105
114
  events == o.events &&
106
- active == o.active
115
+ active == o.active &&
116
+ include_branches == o.include_branches
107
117
  end
108
118
 
109
119
  # @see the `==` method
@@ -115,7 +125,7 @@ module Phrase
115
125
  # Calculates hash code according to all attributes.
116
126
  # @return [Integer] Hash code
117
127
  def hash
118
- [callback_url, secret, description, events, active].hash
128
+ [callback_url, secret, description, events, active, include_branches].hash
119
129
  end
120
130
 
121
131
  # Builds the object from hash
@@ -17,6 +17,9 @@ module Phrase
17
17
  # Whether webhook is active or inactive
18
18
  attr_accessor :active
19
19
 
20
+ # If enabled, webhook will also be triggered for events from branches of the project specified.
21
+ attr_accessor :include_branches
22
+
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
@@ -24,7 +27,8 @@ module Phrase
24
27
  :'secret' => :'secret',
25
28
  :'description' => :'description',
26
29
  :'events' => :'events',
27
- :'active' => :'active'
30
+ :'active' => :'active',
31
+ :'include_branches' => :'include_branches'
28
32
  }
29
33
  end
30
34
 
@@ -35,7 +39,8 @@ module Phrase
35
39
  :'secret' => :'String',
36
40
  :'description' => :'String',
37
41
  :'events' => :'String',
38
- :'active' => :'Boolean'
42
+ :'active' => :'Boolean',
43
+ :'include_branches' => :'Boolean'
39
44
  }
40
45
  end
41
46
 
@@ -79,6 +84,10 @@ module Phrase
79
84
  if attributes.key?(:'active')
80
85
  self.active = attributes[:'active']
81
86
  end
87
+
88
+ if attributes.key?(:'include_branches')
89
+ self.include_branches = attributes[:'include_branches']
90
+ end
82
91
  end
83
92
 
84
93
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -103,7 +112,8 @@ module Phrase
103
112
  secret == o.secret &&
104
113
  description == o.description &&
105
114
  events == o.events &&
106
- active == o.active
115
+ active == o.active &&
116
+ include_branches == o.include_branches
107
117
  end
108
118
 
109
119
  # @see the `==` method
@@ -115,7 +125,7 @@ module Phrase
115
125
  # Calculates hash code according to all attributes.
116
126
  # @return [Integer] Hash code
117
127
  def hash
118
- [callback_url, secret, description, events, active].hash
128
+ [callback_url, secret, description, events, active, include_branches].hash
119
129
  end
120
130
 
121
131
  # Builds the object from hash
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '1.0.8'
2
+ VERSION = '1.0.13'
3
3
  end
@@ -91,6 +91,21 @@ describe 'InvitationsApi' do
91
91
  end
92
92
  end
93
93
 
94
+ # unit tests for invitation_update_settings
95
+ # Update a member&#39;s invitation access
96
+ # Update member&#39;s settings in the invitations. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
97
+ # @param project_id Project ID
98
+ # @param id ID
99
+ # @param invitation_update_settings_parameters
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
102
+ # @return [Invitation]
103
+ describe 'invitation_update_settings 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 invitations_list
95
110
  # List invitations
96
111
  # List invitations for an account. It will also list the accessible resources like projects and locales the invited user has access to. In case nothing is shown the default access from the role is used. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
@@ -61,6 +61,7 @@ describe 'LocalesApi' do
61
61
  # @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
62
62
  # @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \&quot;tags\&quot; parameter instead
63
63
  # @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
64
+ # @option opts [Boolean] :exclude_empty_zero_forms Indicates whether zero forms should be included when empty in pluralized keys.
64
65
  # @option opts [Boolean] :include_translated_keys Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
65
66
  # @option opts [Boolean] :keep_notranslate_tags Indicates whether [NOTRANSLATE] tags should be kept.
66
67
  # @option opts [Boolean] :convert_emoji This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
@@ -63,6 +63,21 @@ describe 'MembersApi' do
63
63
  end
64
64
  end
65
65
 
66
+ # unit tests for member_update_settings
67
+ # Update a member&#39;s project settings
68
+ # Update user settings in the project. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
69
+ # @param project_id Project ID
70
+ # @param id ID
71
+ # @param member_update_settings_parameters
72
+ # @param [Hash] opts the optional parameters
73
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
74
+ # @return [MemberProjectDetail]
75
+ describe 'member_update_settings test' do
76
+ it 'should work' do
77
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
78
+ end
79
+ end
80
+
66
81
  # unit tests for members_list
67
82
  # List members
68
83
  # Get all users active in the account. It also lists resources like projects and locales the member has access to. In case nothing is shown the default access from the role is used. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
@@ -0,0 +1,95 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::VariablesApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'VariablesApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::VariablesApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of VariablesApi' do
18
+ it 'should create an instance of VariablesApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::VariablesApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for variable_create
24
+ # Create a variable
25
+ # Create a new variable.
26
+ # @param project_id Project ID
27
+ # @param variable_create_parameters
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
+ # @return [Variable]
31
+ describe 'variable_create test' do
32
+ it 'should work' do
33
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
34
+ end
35
+ end
36
+
37
+ # unit tests for variable_delete
38
+ # Delete a variable
39
+ # Delete an existing variable.
40
+ # @param project_id Project ID
41
+ # @param name name
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
44
+ # @return [nil]
45
+ describe 'variable_delete test' 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
+ # unit tests for variable_show
52
+ # Get a single variable
53
+ # Get details on a single variable for a given project.
54
+ # @param project_id Project ID
55
+ # @param name name
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
58
+ # @return [Variable]
59
+ describe 'variable_show test' 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
+
65
+ # unit tests for variable_update
66
+ # Update a variable
67
+ # Update an existing variable.
68
+ # @param project_id Project ID
69
+ # @param name name
70
+ # @param variable_update_parameters
71
+ # @param [Hash] opts the optional parameters
72
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
73
+ # @return [Variable]
74
+ describe 'variable_update test' do
75
+ it 'should work' do
76
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
77
+ end
78
+ end
79
+
80
+ # unit tests for variables_list
81
+ # List variables
82
+ # List all variables for the current project.
83
+ # @param project_id Project ID
84
+ # @param [Hash] opts the optional parameters
85
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
86
+ # @option opts [Integer] :page Page number
87
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
88
+ # @return [Array<Variable>]
89
+ describe 'variables_list test' 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
+ end
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::BranchName
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'BranchName' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::BranchName.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of BranchName' do
19
+ it 'should create an instance of BranchName' do
20
+ expect(@instance).to be_instance_of(Phrase::BranchName)
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
+ end
@@ -44,6 +44,18 @@ describe 'InvitationCreateParameters' do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "space_ids"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "default_locale_codes"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
47
59
  describe 'test attribute "permissions"' do
48
60
  it 'should work' do
49
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -56,12 +56,24 @@ describe 'Invitation' do
56
56
  end
57
57
  end
58
58
 
59
+ describe 'test attribute "default_locale_codes"' 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
  describe 'test attribute "permissions"' do
60
66
  it 'should work' do
61
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
68
  end
63
69
  end
64
70
 
71
+ describe 'test attribute "locale_ids"' 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
+
65
77
  describe 'test attribute "created_at"' do
66
78
  it 'should work' do
67
79
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -80,4 +92,16 @@ describe 'Invitation' do
80
92
  end
81
93
  end
82
94
 
95
+ describe 'test attribute "spaces"' 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 "project_role"' 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
+
83
107
  end
@@ -38,6 +38,18 @@ describe 'InvitationUpdateParameters' do
38
38
  end
39
39
  end
40
40
 
41
+ describe 'test attribute "space_ids"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "default_locale_codes"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
41
53
  describe 'test attribute "permissions"' do
42
54
  it 'should work' do
43
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::InvitationUpdateSettingsParameters
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'InvitationUpdateSettingsParameters' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::InvitationUpdateSettingsParameters.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of InvitationUpdateSettingsParameters' do
19
+ it 'should create an instance of InvitationUpdateSettingsParameters' do
20
+ expect(@instance).to be_instance_of(Phrase::InvitationUpdateSettingsParameters)
21
+ end
22
+ end
23
+ describe 'test attribute "project_role"' 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 "locale_ids"' 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
+ end