phrase 3.5.0 → 3.7.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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +4 -3
  4. data/docs/CommentCreateParameters.md +5 -3
  5. data/docs/CommentCreateParameters1.md +19 -0
  6. data/docs/CommentRepliesApi.md +6 -8
  7. data/docs/CommentsApi.md +2 -6
  8. data/docs/FormatsApi.md +3 -9
  9. data/docs/JobsApi.md +2 -2
  10. data/docs/KeyCreateParameters.md +3 -1
  11. data/docs/KeyUpdateParameters.md +1 -1
  12. data/docs/LocalesApi.md +4 -0
  13. data/docs/ProjectCreateParameters.md +3 -9
  14. data/docs/ProjectUpdateParameters.md +3 -9
  15. data/docs/ScreenshotUpdateParameters.md +1 -1
  16. data/docs/UploadsApi.md +5 -3
  17. data/lib/phrase/api/comment_replies_api.rb +12 -10
  18. data/lib/phrase/api/comments_api.rb +0 -6
  19. data/lib/phrase/api/formats_api.rb +0 -3
  20. data/lib/phrase/api/jobs_api.rb +2 -2
  21. data/lib/phrase/api/locales_api.rb +6 -0
  22. data/lib/phrase/api/uploads_api.rb +5 -2
  23. data/lib/phrase/models/comment_create_parameters.rb +25 -8
  24. data/lib/phrase/models/comment_create_parameters1.rb +212 -0
  25. data/lib/phrase/models/key_create_parameters.rb +11 -1
  26. data/lib/phrase/models/project_create_parameters.rb +5 -35
  27. data/lib/phrase/models/project_update_parameters.rb +5 -35
  28. data/lib/phrase/version.rb +1 -1
  29. data/lib/phrase.rb +1 -0
  30. data/spec/api/comment_replies_api_spec.rb +1 -2
  31. data/spec/api/comments_api_spec.rb +0 -2
  32. data/spec/api/formats_api_spec.rb +0 -1
  33. data/spec/api/jobs_api_spec.rb +1 -1
  34. data/spec/models/comment_create_parameters1_spec.rb +35 -0
  35. data/spec/models/comment_create_parameters_spec.rb +7 -1
  36. data/spec/models/key_create_parameters_spec.rb +6 -0
  37. data/spec/models/project_create_parameters_spec.rb +0 -18
  38. data/spec/models/project_update_parameters_spec.rb +0 -18
  39. metadata +250 -246
@@ -2,25 +2,30 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class CommentCreateParameters
5
+ # Comment message
6
+ attr_accessor :message
7
+
5
8
  # specify the branch to use
6
9
  attr_accessor :branch
7
10
 
8
- # Comment message
9
- attr_accessor :message
11
+ # specify the locales for the comment
12
+ attr_accessor :locale_ids
10
13
 
11
14
  # Attribute mapping from ruby-style variable name to JSON key.
12
15
  def self.attribute_map
13
16
  {
17
+ :'message' => :'message',
14
18
  :'branch' => :'branch',
15
- :'message' => :'message'
19
+ :'locale_ids' => :'locale_ids'
16
20
  }
17
21
  end
18
22
 
19
23
  # Attribute type mapping.
20
24
  def self.openapi_types
21
25
  {
26
+ :'message' => :'String',
22
27
  :'branch' => :'String',
23
- :'message' => :'String'
28
+ :'locale_ids' => :'Array<String>'
24
29
  }
25
30
  end
26
31
 
@@ -45,12 +50,18 @@ module Phrase
45
50
  h[k.to_sym] = v
46
51
  }
47
52
 
53
+ if attributes.key?(:'message')
54
+ self.message = attributes[:'message']
55
+ end
56
+
48
57
  if attributes.key?(:'branch')
49
58
  self.branch = attributes[:'branch']
50
59
  end
51
60
 
52
- if attributes.key?(:'message')
53
- self.message = attributes[:'message']
61
+ if attributes.key?(:'locale_ids')
62
+ if (value = attributes[:'locale_ids']).is_a?(Array)
63
+ self.locale_ids = value
64
+ end
54
65
  end
55
66
  end
56
67
 
@@ -58,12 +69,17 @@ module Phrase
58
69
  # @return Array for valid properties with the reasons
59
70
  def list_invalid_properties
60
71
  invalid_properties = Array.new
72
+ if @message.nil?
73
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
74
+ end
75
+
61
76
  invalid_properties
62
77
  end
63
78
 
64
79
  # Check to see if the all the properties in the model are valid
65
80
  # @return true if the model is valid
66
81
  def valid?
82
+ return false if @message.nil?
67
83
  true
68
84
  end
69
85
 
@@ -72,8 +88,9 @@ module Phrase
72
88
  def ==(o)
73
89
  return true if self.equal?(o)
74
90
  self.class == o.class &&
91
+ message == o.message &&
75
92
  branch == o.branch &&
76
- message == o.message
93
+ locale_ids == o.locale_ids
77
94
  end
78
95
 
79
96
  # @see the `==` method
@@ -85,7 +102,7 @@ module Phrase
85
102
  # Calculates hash code according to all attributes.
86
103
  # @return [Integer] Hash code
87
104
  def hash
88
- [branch, message].hash
105
+ [message, branch, locale_ids].hash
89
106
  end
90
107
 
91
108
  # Builds the object from hash
@@ -0,0 +1,212 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class CommentCreateParameters1
5
+ # Reply message body
6
+ attr_accessor :message
7
+
8
+ # Specify the branch to use
9
+ attr_accessor :branch
10
+
11
+ # Attribute mapping from ruby-style variable name to JSON key.
12
+ def self.attribute_map
13
+ {
14
+ :'message' => :'message',
15
+ :'branch' => :'branch'
16
+ }
17
+ end
18
+
19
+ # Attribute type mapping.
20
+ def self.openapi_types
21
+ {
22
+ :'message' => :'String',
23
+ :'branch' => :'String'
24
+ }
25
+ end
26
+
27
+ # List of attributes with nullable: true
28
+ def self.openapi_nullable
29
+ Set.new([
30
+ ])
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ if (!attributes.is_a?(Hash))
37
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CommentCreateParameters1` initialize method"
38
+ end
39
+
40
+ # check to see if the attribute exists and convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h|
42
+ if (!self.class.attribute_map.key?(k.to_sym))
43
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CommentCreateParameters1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
44
+ end
45
+ h[k.to_sym] = v
46
+ }
47
+
48
+ if attributes.key?(:'message')
49
+ self.message = attributes[:'message']
50
+ end
51
+
52
+ if attributes.key?(:'branch')
53
+ self.branch = attributes[:'branch']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ if @message.nil?
62
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
63
+ end
64
+
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ return false if @message.nil?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ message == o.message &&
81
+ branch == o.branch
82
+ end
83
+
84
+ # @see the `==` method
85
+ # @param [Object] Object to be compared
86
+ def eql?(o)
87
+ self == o
88
+ end
89
+
90
+ # Calculates hash code according to all attributes.
91
+ # @return [Integer] Hash code
92
+ def hash
93
+ [message, branch].hash
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def self.build_from_hash(attributes)
100
+ new.build_from_hash(attributes)
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.openapi_types.each_pair do |key, type|
109
+ if type =~ /\AArray<(.*)>/i
110
+ # check to ensure the input is an array given that the attribute
111
+ # is documented as an array but the input is not
112
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
113
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ end
115
+ elsif !attributes[self.class.attribute_map[key]].nil?
116
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
118
+ end
119
+
120
+ self
121
+ end
122
+
123
+ # Deserializes the data based on type
124
+ # @param string type Data type
125
+ # @param string value Value to be deserialized
126
+ # @return [Object] Deserialized data
127
+ def _deserialize(type, value)
128
+ case type.to_sym
129
+ when :DateTime
130
+ DateTime.parse(value)
131
+ when :Date
132
+ Date.parse(value)
133
+ when :Time
134
+ Time.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ Phrase.const_get(type).build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ if value.nil?
185
+ is_nullable = self.class.openapi_nullable.include?(attr)
186
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
187
+ end
188
+
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+ end
212
+ end
@@ -38,6 +38,9 @@ module Phrase
38
38
  # Creates a translation in the default locale with the specified content
39
39
  attr_accessor :default_translation_content
40
40
 
41
+ # Indicates whether the key should be autotranslated to other locales based on the copy provided in `default_translation_content`.
42
+ attr_accessor :autotranslate
43
+
41
44
  # Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats.
42
45
  attr_accessor :xml_space_preserve
43
46
 
@@ -68,6 +71,7 @@ module Phrase
68
71
  :'remove_screenshot' => :'remove_screenshot',
69
72
  :'unformatted' => :'unformatted',
70
73
  :'default_translation_content' => :'default_translation_content',
74
+ :'autotranslate' => :'autotranslate',
71
75
  :'xml_space_preserve' => :'xml_space_preserve',
72
76
  :'original_file' => :'original_file',
73
77
  :'localized_format_string' => :'localized_format_string',
@@ -91,6 +95,7 @@ module Phrase
91
95
  :'remove_screenshot' => :'Boolean',
92
96
  :'unformatted' => :'Boolean',
93
97
  :'default_translation_content' => :'String',
98
+ :'autotranslate' => :'Boolean',
94
99
  :'xml_space_preserve' => :'Boolean',
95
100
  :'original_file' => :'String',
96
101
  :'localized_format_string' => :'String',
@@ -168,6 +173,10 @@ module Phrase
168
173
  self.default_translation_content = attributes[:'default_translation_content']
169
174
  end
170
175
 
176
+ if attributes.key?(:'autotranslate')
177
+ self.autotranslate = attributes[:'autotranslate']
178
+ end
179
+
171
180
  if attributes.key?(:'xml_space_preserve')
172
181
  self.xml_space_preserve = attributes[:'xml_space_preserve']
173
182
  end
@@ -224,6 +233,7 @@ module Phrase
224
233
  remove_screenshot == o.remove_screenshot &&
225
234
  unformatted == o.unformatted &&
226
235
  default_translation_content == o.default_translation_content &&
236
+ autotranslate == o.autotranslate &&
227
237
  xml_space_preserve == o.xml_space_preserve &&
228
238
  original_file == o.original_file &&
229
239
  localized_format_string == o.localized_format_string &&
@@ -240,7 +250,7 @@ module Phrase
240
250
  # Calculates hash code according to all attributes.
241
251
  # @return [Integer] Hash code
242
252
  def hash
243
- [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, custom_metadata].hash
253
+ [branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, autotranslate, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
244
254
  end
245
255
 
246
256
  # Builds the object from hash
@@ -32,7 +32,7 @@ module Phrase
32
32
  # (Optional) Review Workflow. \"simple\" / \"review\". <a href=\"https://support.phrase.com/hc/en-us/articles/5784094755484\">Read more</a>
33
33
  attr_accessor :workflow
34
34
 
35
- # (Optional) Enable machine translation support in the project. Required for Autopilot and Smart Suggest
35
+ # (Optional) Enable machine translation support in the project. Required for Pre-Translation
36
36
  attr_accessor :machine_translation_enabled
37
37
 
38
38
  # (Optional) Enable branching in the project
@@ -71,15 +71,6 @@ module Phrase
71
71
  # (Optional) Requires autotranslate_enabled to be true
72
72
  attr_accessor :autotranslate_use_translation_memory
73
73
 
74
- # (Optional) Smart Suggest, requires machine_translation_enabled
75
- attr_accessor :smart_suggest_enabled
76
-
77
- # (Optional) Requires smart_suggest_enabled to be true
78
- attr_accessor :smart_suggest_use_glossary
79
-
80
- # (Optional) Requires smart_suggest_enabled to be true
81
- attr_accessor :smart_suggest_use_machine_translation
82
-
83
74
  # Attribute mapping from ruby-style variable name to JSON key.
84
75
  def self.attribute_map
85
76
  {
@@ -105,10 +96,7 @@ module Phrase
105
96
  :'autotranslate_check_new_locales' => :'autotranslate_check_new_locales',
106
97
  :'autotranslate_mark_as_unverified' => :'autotranslate_mark_as_unverified',
107
98
  :'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
108
- :'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
109
- :'smart_suggest_enabled' => :'smart_suggest_enabled',
110
- :'smart_suggest_use_glossary' => :'smart_suggest_use_glossary',
111
- :'smart_suggest_use_machine_translation' => :'smart_suggest_use_machine_translation'
99
+ :'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory'
112
100
  }
113
101
  end
114
102
 
@@ -137,10 +125,7 @@ module Phrase
137
125
  :'autotranslate_check_new_locales' => :'Boolean',
138
126
  :'autotranslate_mark_as_unverified' => :'Boolean',
139
127
  :'autotranslate_use_machine_translation' => :'Boolean',
140
- :'autotranslate_use_translation_memory' => :'Boolean',
141
- :'smart_suggest_enabled' => :'Boolean',
142
- :'smart_suggest_use_glossary' => :'Boolean',
143
- :'smart_suggest_use_machine_translation' => :'Boolean'
128
+ :'autotranslate_use_translation_memory' => :'Boolean'
144
129
  }
145
130
  end
146
131
 
@@ -256,18 +241,6 @@ module Phrase
256
241
  if attributes.key?(:'autotranslate_use_translation_memory')
257
242
  self.autotranslate_use_translation_memory = attributes[:'autotranslate_use_translation_memory']
258
243
  end
259
-
260
- if attributes.key?(:'smart_suggest_enabled')
261
- self.smart_suggest_enabled = attributes[:'smart_suggest_enabled']
262
- end
263
-
264
- if attributes.key?(:'smart_suggest_use_glossary')
265
- self.smart_suggest_use_glossary = attributes[:'smart_suggest_use_glossary']
266
- end
267
-
268
- if attributes.key?(:'smart_suggest_use_machine_translation')
269
- self.smart_suggest_use_machine_translation = attributes[:'smart_suggest_use_machine_translation']
270
- end
271
244
  end
272
245
 
273
246
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -315,10 +288,7 @@ module Phrase
315
288
  autotranslate_check_new_locales == o.autotranslate_check_new_locales &&
316
289
  autotranslate_mark_as_unverified == o.autotranslate_mark_as_unverified &&
317
290
  autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
318
- autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
319
- smart_suggest_enabled == o.smart_suggest_enabled &&
320
- smart_suggest_use_glossary == o.smart_suggest_use_glossary &&
321
- smart_suggest_use_machine_translation == o.smart_suggest_use_machine_translation
291
+ autotranslate_use_translation_memory == o.autotranslate_use_translation_memory
322
292
  end
323
293
 
324
294
  # @see the `==` method
@@ -330,7 +300,7 @@ module Phrase
330
300
  # Calculates hash code according to all attributes.
331
301
  # @return [Integer] Hash code
332
302
  def hash
333
- [name, main_format, media, shares_translation_memory, project_image, remove_project_image, account_id, point_of_contact, source_project_id, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, smart_suggest_enabled, smart_suggest_use_glossary, smart_suggest_use_machine_translation].hash
303
+ [name, main_format, media, shares_translation_memory, project_image, remove_project_image, account_id, point_of_contact, source_project_id, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory].hash
334
304
  end
335
305
 
336
306
  # Builds the object from hash
@@ -29,7 +29,7 @@ module Phrase
29
29
  # (Optional) Review Workflow. \"simple\" / \"review\". <a href=\"https://support.phrase.com/hc/en-us/articles/5784094755484\">Read more</a>
30
30
  attr_accessor :workflow
31
31
 
32
- # (Optional) Enable machine translation support in the project. Required for Autopilot and Smart Suggest
32
+ # (Optional) Enable machine translation support in the project. Required for Pre-Translation
33
33
  attr_accessor :machine_translation_enabled
34
34
 
35
35
  # (Optional) Enable branching in the project
@@ -68,15 +68,6 @@ module Phrase
68
68
  # (Optional) Requires autotranslate_enabled to be true
69
69
  attr_accessor :autotranslate_use_translation_memory
70
70
 
71
- # (Optional) Smart Suggest, requires machine_translation_enabled
72
- attr_accessor :smart_suggest_enabled
73
-
74
- # (Optional) Requires smart_suggest_enabled to be true
75
- attr_accessor :smart_suggest_use_glossary
76
-
77
- # (Optional) Requires smart_suggest_enabled to be true
78
- attr_accessor :smart_suggest_use_machine_translation
79
-
80
71
  # Attribute mapping from ruby-style variable name to JSON key.
81
72
  def self.attribute_map
82
73
  {
@@ -101,10 +92,7 @@ module Phrase
101
92
  :'autotranslate_check_new_locales' => :'autotranslate_check_new_locales',
102
93
  :'autotranslate_mark_as_unverified' => :'autotranslate_mark_as_unverified',
103
94
  :'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
104
- :'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
105
- :'smart_suggest_enabled' => :'smart_suggest_enabled',
106
- :'smart_suggest_use_glossary' => :'smart_suggest_use_glossary',
107
- :'smart_suggest_use_machine_translation' => :'smart_suggest_use_machine_translation'
95
+ :'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory'
108
96
  }
109
97
  end
110
98
 
@@ -132,10 +120,7 @@ module Phrase
132
120
  :'autotranslate_check_new_locales' => :'Boolean',
133
121
  :'autotranslate_mark_as_unverified' => :'Boolean',
134
122
  :'autotranslate_use_machine_translation' => :'Boolean',
135
- :'autotranslate_use_translation_memory' => :'Boolean',
136
- :'smart_suggest_enabled' => :'Boolean',
137
- :'smart_suggest_use_glossary' => :'Boolean',
138
- :'smart_suggest_use_machine_translation' => :'Boolean'
123
+ :'autotranslate_use_translation_memory' => :'Boolean'
139
124
  }
140
125
  end
141
126
 
@@ -247,18 +232,6 @@ module Phrase
247
232
  if attributes.key?(:'autotranslate_use_translation_memory')
248
233
  self.autotranslate_use_translation_memory = attributes[:'autotranslate_use_translation_memory']
249
234
  end
250
-
251
- if attributes.key?(:'smart_suggest_enabled')
252
- self.smart_suggest_enabled = attributes[:'smart_suggest_enabled']
253
- end
254
-
255
- if attributes.key?(:'smart_suggest_use_glossary')
256
- self.smart_suggest_use_glossary = attributes[:'smart_suggest_use_glossary']
257
- end
258
-
259
- if attributes.key?(:'smart_suggest_use_machine_translation')
260
- self.smart_suggest_use_machine_translation = attributes[:'smart_suggest_use_machine_translation']
261
- end
262
235
  end
263
236
 
264
237
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -300,10 +273,7 @@ module Phrase
300
273
  autotranslate_check_new_locales == o.autotranslate_check_new_locales &&
301
274
  autotranslate_mark_as_unverified == o.autotranslate_mark_as_unverified &&
302
275
  autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
303
- autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
304
- smart_suggest_enabled == o.smart_suggest_enabled &&
305
- smart_suggest_use_glossary == o.smart_suggest_use_glossary &&
306
- smart_suggest_use_machine_translation == o.smart_suggest_use_machine_translation
276
+ autotranslate_use_translation_memory == o.autotranslate_use_translation_memory
307
277
  end
308
278
 
309
279
  # @see the `==` method
@@ -315,7 +285,7 @@ module Phrase
315
285
  # Calculates hash code according to all attributes.
316
286
  # @return [Integer] Hash code
317
287
  def hash
318
- [account_id, name, point_of_contact, main_format, media, shares_translation_memory, project_image, remove_project_image, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, smart_suggest_enabled, smart_suggest_use_glossary, smart_suggest_use_machine_translation].hash
288
+ [account_id, name, point_of_contact, main_format, media, shares_translation_memory, project_image, remove_project_image, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory].hash
319
289
  end
320
290
 
321
291
  # Builds the object from hash
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '3.5.0'
2
+ VERSION = '3.7.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -31,6 +31,7 @@ require 'phrase/models/branch_name'
31
31
  require 'phrase/models/branch_update_parameters'
32
32
  require 'phrase/models/comment'
33
33
  require 'phrase/models/comment_create_parameters'
34
+ require 'phrase/models/comment_create_parameters1'
34
35
  require 'phrase/models/comment_mark_read_parameters'
35
36
  require 'phrase/models/comment_reaction'
36
37
  require 'phrase/models/comment_update_parameters'
@@ -48,10 +48,9 @@ describe 'CommentRepliesApi' do
48
48
  # @param project_id Project ID
49
49
  # @param key_id Translation Key ID
50
50
  # @param comment_id Comment ID
51
+ # @param comment_create_parameters1
51
52
  # @param [Hash] opts the optional parameters
52
53
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
53
- # @option opts [String] :branch specify the branch to use
54
- # @option opts [String] :message specify the message for the comment
55
54
  # @return [Comment]
56
55
  describe 'reply_create test' do
57
56
  it 'should work' do
@@ -28,8 +28,6 @@ describe 'CommentsApi' do
28
28
  # @param comment_create_parameters
29
29
  # @param [Hash] opts the optional parameters
30
30
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
31
- # @option opts [String] :message specify the message for the comment
32
- # @option opts [Array<String>] :locale_ids specify the locales for the comment
33
31
  # @return [Comment]
34
32
  describe 'comment_create test' do
35
33
  it 'should work' do
@@ -24,7 +24,6 @@ describe 'FormatsApi' do
24
24
  # List formats
25
25
  # Get a handy list of all localization file formats supported in Phrase.
26
26
  # @param [Hash] opts the optional parameters
27
- # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
28
27
  # @return [Array<Format>]
29
28
  describe 'formats_list test' do
30
29
  it 'should work' do
@@ -87,7 +87,7 @@ describe 'JobsApi' do
87
87
  # @param [Hash] opts the optional parameters
88
88
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
89
89
  # @option opts [String] :branch specify the branch to use
90
- # @option opts [Array<String>] :translation_key_ids ids of keys that should added to the job
90
+ # @option opts [Array<String>] :translation_key_ids ids of keys that should be removed from the job
91
91
  # @return [nil]
92
92
  describe 'job_keys_delete test' do
93
93
  it 'should work' do
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::CommentCreateParameters1
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'CommentCreateParameters1' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::CommentCreateParameters1.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of CommentCreateParameters1' do
19
+ it 'should create an instance of CommentCreateParameters1' do
20
+ expect(@instance).to be_instance_of(Phrase::CommentCreateParameters1)
21
+ end
22
+ end
23
+ describe 'test attribute "message"' 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 "branch"' 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
@@ -20,13 +20,19 @@ describe 'CommentCreateParameters' do
20
20
  expect(@instance).to be_instance_of(Phrase::CommentCreateParameters)
21
21
  end
22
22
  end
23
+ describe 'test attribute "message"' 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
+
23
29
  describe 'test attribute "branch"' do
24
30
  it 'should work' do
25
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
32
  end
27
33
  end
28
34
 
29
- describe 'test attribute "message"' do
35
+ describe 'test attribute "locale_ids"' do
30
36
  it 'should work' do
31
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
38
  end
@@ -92,6 +92,12 @@ describe 'KeyCreateParameters' do
92
92
  end
93
93
  end
94
94
 
95
+ describe 'test attribute "autotranslate"' 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
+
95
101
  describe 'test attribute "xml_space_preserve"' do
96
102
  it 'should work' do
97
103
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers