phrase 2.6.0 → 2.7.2

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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -22
  3. data/docs/BlacklistedKeyCreateParameters.md +1 -1
  4. data/docs/BlacklistedKeyUpdateParameters.md +1 -1
  5. data/docs/BlacklistedKeysApi.md +20 -20
  6. data/docs/DistributionCreateParameters.md +2 -0
  7. data/docs/DistributionUpdateParameters.md +2 -0
  8. data/docs/GlossariesApi.md +20 -20
  9. data/docs/GlossaryTermTranslationsApi.md +12 -12
  10. data/docs/GlossaryTermsApi.md +20 -20
  11. data/docs/Invitation.md +3 -3
  12. data/docs/JobComment.md +29 -0
  13. data/docs/JobCommentCreateParameters.md +17 -0
  14. data/docs/JobCommentUpdateParameters.md +17 -0
  15. data/docs/JobCommentsApi.md +343 -0
  16. data/docs/JobCreateParameters.md +3 -1
  17. data/docs/JobsApi.md +130 -0
  18. data/docs/KeyCreateParameters.md +2 -0
  19. data/docs/Locale.md +2 -0
  20. data/docs/LocaleCreateParameters.md +2 -0
  21. data/docs/LocaleDetails.md +2 -0
  22. data/docs/LocaleUpdateParameters.md +2 -0
  23. data/docs/Member.md +1 -1
  24. data/docs/ScreenshotsApi.md +12 -6
  25. data/docs/StyleguideCreateParameters.md +1 -1
  26. data/docs/StyleguideUpdateParameters.md +1 -1
  27. data/docs/{Team1.md → TeamShort.md} +2 -2
  28. data/docs/VersionsHistoryApi.md +1 -1
  29. data/lib/phrase/api/blacklisted_keys_api.rb +20 -20
  30. data/lib/phrase/api/glossaries_api.rb +20 -20
  31. data/lib/phrase/api/glossary_term_translations_api.rb +12 -12
  32. data/lib/phrase/api/glossary_terms_api.rb +20 -20
  33. data/lib/phrase/api/job_comments_api.rb +411 -0
  34. data/lib/phrase/api/jobs_api.rb +146 -0
  35. data/lib/phrase/api/screenshots_api.rb +17 -11
  36. data/lib/phrase/api/versions_history_api.rb +2 -2
  37. data/lib/phrase/models/blacklisted_key_create_parameters.rb +1 -1
  38. data/lib/phrase/models/blacklisted_key_update_parameters.rb +1 -1
  39. data/lib/phrase/models/distribution_create_parameters.rb +11 -1
  40. data/lib/phrase/models/distribution_update_parameters.rb +11 -1
  41. data/lib/phrase/models/invitation.rb +13 -13
  42. data/lib/phrase/models/job_comment.rb +250 -0
  43. data/lib/phrase/models/job_comment_create_parameters.rb +195 -0
  44. data/lib/phrase/models/job_comment_update_parameters.rb +195 -0
  45. data/lib/phrase/models/job_create_parameters.rb +14 -4
  46. data/lib/phrase/models/key_create_parameters.rb +11 -1
  47. data/lib/phrase/models/locale.rb +10 -1
  48. data/lib/phrase/models/locale_create_parameters.rb +11 -1
  49. data/lib/phrase/models/locale_details.rb +10 -1
  50. data/lib/phrase/models/locale_update_parameters.rb +11 -1
  51. data/lib/phrase/models/member.rb +1 -1
  52. data/lib/phrase/models/{team1.rb → team_short.rb} +3 -3
  53. data/lib/phrase/version.rb +1 -1
  54. data/lib/phrase.rb +5 -1
  55. data/spec/api/blacklisted_keys_api_spec.rb +10 -10
  56. data/spec/api/glossaries_api_spec.rb +10 -10
  57. data/spec/api/glossary_term_translations_api_spec.rb +6 -6
  58. data/spec/api/glossary_terms_api_spec.rb +10 -10
  59. data/spec/api/job_comments_api_spec.rb +101 -0
  60. data/spec/api/jobs_api_spec.rb +30 -0
  61. data/spec/api/screenshots_api_spec.rb +4 -1
  62. data/spec/api/versions_history_api_spec.rb +1 -1
  63. data/spec/models/distribution_create_parameters_spec.rb +6 -0
  64. data/spec/models/distribution_update_parameters_spec.rb +6 -0
  65. data/spec/models/invitation_spec.rb +6 -6
  66. data/spec/models/job_comment_create_parameters_spec.rb +29 -0
  67. data/spec/models/job_comment_spec.rb +65 -0
  68. data/spec/models/job_comment_update_parameters_spec.rb +29 -0
  69. data/spec/models/job_create_parameters_spec.rb +6 -0
  70. data/spec/models/key_create_parameters_spec.rb +6 -0
  71. data/spec/models/locale_create_parameters_spec.rb +6 -0
  72. data/spec/models/locale_details_spec.rb +6 -0
  73. data/spec/models/locale_spec.rb +6 -0
  74. data/spec/models/locale_update_parameters_spec.rb +6 -0
  75. data/spec/models/{team1_spec.rb → team_short_spec.rb} +6 -6
  76. metadata +218 -202
@@ -0,0 +1,195 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class JobCommentUpdateParameters
5
+ # Comment message
6
+ attr_accessor :message
7
+
8
+ # Attribute mapping from ruby-style variable name to JSON key.
9
+ def self.attribute_map
10
+ {
11
+ :'message' => :'message'
12
+ }
13
+ end
14
+
15
+ # Attribute type mapping.
16
+ def self.openapi_types
17
+ {
18
+ :'message' => :'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::JobCommentUpdateParameters` 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::JobCommentUpdateParameters`. 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?(:'message')
44
+ self.message = attributes[:'message']
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
+ message == o.message
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
+ [message].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 :String
119
+ value.to_s
120
+ when :Integer
121
+ value.to_i
122
+ when :Float
123
+ value.to_f
124
+ when :Boolean
125
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
+ true
127
+ else
128
+ false
129
+ end
130
+ when :Object
131
+ # generic object (usually a Hash), return directly
132
+ value
133
+ when /\AArray<(?<inner_type>.+)>\z/
134
+ inner_type = Regexp.last_match[:inner_type]
135
+ value.map { |v| _deserialize(inner_type, v) }
136
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
137
+ k_type = Regexp.last_match[:k_type]
138
+ v_type = Regexp.last_match[:v_type]
139
+ {}.tap do |hash|
140
+ value.each do |k, v|
141
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
142
+ end
143
+ end
144
+ else # model
145
+ Phrase.const_get(type).build_from_hash(value)
146
+ end
147
+ end
148
+
149
+ # Returns the string representation of the object
150
+ # @return [String] String presentation of the object
151
+ def to_s
152
+ to_hash.to_s
153
+ end
154
+
155
+ # to_body is an alias to to_hash (backward compatibility)
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_body
158
+ to_hash
159
+ end
160
+
161
+ # Returns the object in the form of hash
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_hash
164
+ hash = {}
165
+ self.class.attribute_map.each_pair do |attr, param|
166
+ value = self.send(attr)
167
+ if value.nil?
168
+ is_nullable = self.class.openapi_nullable.include?(attr)
169
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
170
+ end
171
+
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+ end
195
+ end
@@ -26,6 +26,9 @@ module Phrase
26
26
  # ids of keys that should be included within the job
27
27
  attr_accessor :translation_key_ids
28
28
 
29
+ # id of a job template you would like to model the created job after. Any manually added parameters will take preference over template attributes.
30
+ attr_accessor :job_template_id
31
+
29
32
  # Attribute mapping from ruby-style variable name to JSON key.
30
33
  def self.attribute_map
31
34
  {
@@ -36,7 +39,8 @@ module Phrase
36
39
  :'due_date' => :'due_date',
37
40
  :'ticket_url' => :'ticket_url',
38
41
  :'tags' => :'tags',
39
- :'translation_key_ids' => :'translation_key_ids'
42
+ :'translation_key_ids' => :'translation_key_ids',
43
+ :'job_template_id' => :'job_template_id'
40
44
  }
41
45
  end
42
46
 
@@ -50,7 +54,8 @@ module Phrase
50
54
  :'due_date' => :'DateTime',
51
55
  :'ticket_url' => :'String',
52
56
  :'tags' => :'Array<String>',
53
- :'translation_key_ids' => :'Array<String>'
57
+ :'translation_key_ids' => :'Array<String>',
58
+ :'job_template_id' => :'String'
54
59
  }
55
60
  end
56
61
 
@@ -110,6 +115,10 @@ module Phrase
110
115
  self.translation_key_ids = value
111
116
  end
112
117
  end
118
+
119
+ if attributes.key?(:'job_template_id')
120
+ self.job_template_id = attributes[:'job_template_id']
121
+ end
113
122
  end
114
123
 
115
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -137,7 +146,8 @@ module Phrase
137
146
  due_date == o.due_date &&
138
147
  ticket_url == o.ticket_url &&
139
148
  tags == o.tags &&
140
- translation_key_ids == o.translation_key_ids
149
+ translation_key_ids == o.translation_key_ids &&
150
+ job_template_id == o.job_template_id
141
151
  end
142
152
 
143
153
  # @see the `==` method
@@ -149,7 +159,7 @@ module Phrase
149
159
  # Calculates hash code according to all attributes.
150
160
  # @return [Integer] Hash code
151
161
  def hash
152
- [branch, name, source_locale_id, briefing, due_date, ticket_url, tags, translation_key_ids].hash
162
+ [branch, name, source_locale_id, briefing, due_date, ticket_url, tags, translation_key_ids, job_template_id].hash
153
163
  end
154
164
 
155
165
  # Builds the object from hash
@@ -35,6 +35,9 @@ module Phrase
35
35
  # Indicates whether the key should be exported as \"unformatted\". Supported by Android XML and other formats.
36
36
  attr_accessor :unformatted
37
37
 
38
+ # Creates a translation in the default locale with the specified content
39
+ attr_accessor :default_translation_content
40
+
38
41
  # Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats.
39
42
  attr_accessor :xml_space_preserve
40
43
 
@@ -61,6 +64,7 @@ module Phrase
61
64
  :'screenshot' => :'screenshot',
62
65
  :'remove_screenshot' => :'remove_screenshot',
63
66
  :'unformatted' => :'unformatted',
67
+ :'default_translation_content' => :'default_translation_content',
64
68
  :'xml_space_preserve' => :'xml_space_preserve',
65
69
  :'original_file' => :'original_file',
66
70
  :'localized_format_string' => :'localized_format_string',
@@ -82,6 +86,7 @@ module Phrase
82
86
  :'screenshot' => :'File',
83
87
  :'remove_screenshot' => :'Boolean',
84
88
  :'unformatted' => :'Boolean',
89
+ :'default_translation_content' => :'String',
85
90
  :'xml_space_preserve' => :'Boolean',
86
91
  :'original_file' => :'String',
87
92
  :'localized_format_string' => :'String',
@@ -154,6 +159,10 @@ module Phrase
154
159
  self.unformatted = attributes[:'unformatted']
155
160
  end
156
161
 
162
+ if attributes.key?(:'default_translation_content')
163
+ self.default_translation_content = attributes[:'default_translation_content']
164
+ end
165
+
157
166
  if attributes.key?(:'xml_space_preserve')
158
167
  self.xml_space_preserve = attributes[:'xml_space_preserve']
159
168
  end
@@ -200,6 +209,7 @@ module Phrase
200
209
  screenshot == o.screenshot &&
201
210
  remove_screenshot == o.remove_screenshot &&
202
211
  unformatted == o.unformatted &&
212
+ default_translation_content == o.default_translation_content &&
203
213
  xml_space_preserve == o.xml_space_preserve &&
204
214
  original_file == o.original_file &&
205
215
  localized_format_string == o.localized_format_string &&
@@ -215,7 +225,7 @@ module Phrase
215
225
  # Calculates hash code according to all attributes.
216
226
  # @return [Integer] Hash code
217
227
  def hash
218
- [branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, xml_space_preserve, original_file, localized_format_string, localized_format_key].hash
228
+ [branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, xml_space_preserve, original_file, localized_format_string, localized_format_key].hash
219
229
  end
220
230
 
221
231
  # Builds the object from hash
@@ -18,6 +18,8 @@ module Phrase
18
18
 
19
19
  attr_accessor :source_locale
20
20
 
21
+ attr_accessor :fallback_locale
22
+
21
23
  attr_accessor :created_at
22
24
 
23
25
  attr_accessor :updated_at
@@ -33,6 +35,7 @@ module Phrase
33
35
  :'rtl' => :'rtl',
34
36
  :'plural_forms' => :'plural_forms',
35
37
  :'source_locale' => :'source_locale',
38
+ :'fallback_locale' => :'fallback_locale',
36
39
  :'created_at' => :'created_at',
37
40
  :'updated_at' => :'updated_at'
38
41
  }
@@ -49,6 +52,7 @@ module Phrase
49
52
  :'rtl' => :'Boolean',
50
53
  :'plural_forms' => :'Array<String>',
51
54
  :'source_locale' => :'LocalePreview',
55
+ :'fallback_locale' => :'LocalePreview',
52
56
  :'created_at' => :'DateTime',
53
57
  :'updated_at' => :'DateTime'
54
58
  }
@@ -109,6 +113,10 @@ module Phrase
109
113
  self.source_locale = attributes[:'source_locale']
110
114
  end
111
115
 
116
+ if attributes.key?(:'fallback_locale')
117
+ self.fallback_locale = attributes[:'fallback_locale']
118
+ end
119
+
112
120
  if attributes.key?(:'created_at')
113
121
  self.created_at = attributes[:'created_at']
114
122
  end
@@ -144,6 +152,7 @@ module Phrase
144
152
  rtl == o.rtl &&
145
153
  plural_forms == o.plural_forms &&
146
154
  source_locale == o.source_locale &&
155
+ fallback_locale == o.fallback_locale &&
147
156
  created_at == o.created_at &&
148
157
  updated_at == o.updated_at
149
158
  end
@@ -157,7 +166,7 @@ module Phrase
157
166
  # Calculates hash code according to all attributes.
158
167
  # @return [Integer] Hash code
159
168
  def hash
160
- [id, name, code, default, main, rtl, plural_forms, source_locale, created_at, updated_at].hash
169
+ [id, name, code, default, main, rtl, plural_forms, source_locale, fallback_locale, created_at, updated_at].hash
161
170
  end
162
171
 
163
172
  # Builds the object from hash
@@ -23,6 +23,9 @@ module Phrase
23
23
  # Source locale. Can be the name or public id of the locale. Preferred is the public id.
24
24
  attr_accessor :source_locale_id
25
25
 
26
+ # Fallback locale for empty translations. Can be a locale name or id.
27
+ attr_accessor :fallback_locale_id
28
+
26
29
  # Indicates that new translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
27
30
  attr_accessor :unverify_new_translations
28
31
 
@@ -42,6 +45,7 @@ module Phrase
42
45
  :'main' => :'main',
43
46
  :'rtl' => :'rtl',
44
47
  :'source_locale_id' => :'source_locale_id',
48
+ :'fallback_locale_id' => :'fallback_locale_id',
45
49
  :'unverify_new_translations' => :'unverify_new_translations',
46
50
  :'unverify_updated_translations' => :'unverify_updated_translations',
47
51
  :'autotranslate' => :'autotranslate'
@@ -58,6 +62,7 @@ module Phrase
58
62
  :'main' => :'Boolean',
59
63
  :'rtl' => :'Boolean',
60
64
  :'source_locale_id' => :'String',
65
+ :'fallback_locale_id' => :'String',
61
66
  :'unverify_new_translations' => :'Boolean',
62
67
  :'unverify_updated_translations' => :'Boolean',
63
68
  :'autotranslate' => :'Boolean'
@@ -113,6 +118,10 @@ module Phrase
113
118
  self.source_locale_id = attributes[:'source_locale_id']
114
119
  end
115
120
 
121
+ if attributes.key?(:'fallback_locale_id')
122
+ self.fallback_locale_id = attributes[:'fallback_locale_id']
123
+ end
124
+
116
125
  if attributes.key?(:'unverify_new_translations')
117
126
  self.unverify_new_translations = attributes[:'unverify_new_translations']
118
127
  end
@@ -151,6 +160,7 @@ module Phrase
151
160
  main == o.main &&
152
161
  rtl == o.rtl &&
153
162
  source_locale_id == o.source_locale_id &&
163
+ fallback_locale_id == o.fallback_locale_id &&
154
164
  unverify_new_translations == o.unverify_new_translations &&
155
165
  unverify_updated_translations == o.unverify_updated_translations &&
156
166
  autotranslate == o.autotranslate
@@ -165,7 +175,7 @@ module Phrase
165
175
  # Calculates hash code according to all attributes.
166
176
  # @return [Integer] Hash code
167
177
  def hash
168
- [branch, name, code, default, main, rtl, source_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
178
+ [branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
169
179
  end
170
180
 
171
181
  # Builds the object from hash
@@ -18,6 +18,8 @@ module Phrase
18
18
 
19
19
  attr_accessor :source_locale
20
20
 
21
+ attr_accessor :fallback_locale
22
+
21
23
  attr_accessor :created_at
22
24
 
23
25
  attr_accessor :updated_at
@@ -35,6 +37,7 @@ module Phrase
35
37
  :'rtl' => :'rtl',
36
38
  :'plural_forms' => :'plural_forms',
37
39
  :'source_locale' => :'source_locale',
40
+ :'fallback_locale' => :'fallback_locale',
38
41
  :'created_at' => :'created_at',
39
42
  :'updated_at' => :'updated_at',
40
43
  :'statistics' => :'statistics'
@@ -52,6 +55,7 @@ module Phrase
52
55
  :'rtl' => :'Boolean',
53
56
  :'plural_forms' => :'Array<String>',
54
57
  :'source_locale' => :'LocalePreview',
58
+ :'fallback_locale' => :'LocalePreview',
55
59
  :'created_at' => :'DateTime',
56
60
  :'updated_at' => :'DateTime',
57
61
  :'statistics' => :'LocaleStatistics'
@@ -121,6 +125,10 @@ module Phrase
121
125
  self.source_locale = attributes[:'source_locale']
122
126
  end
123
127
 
128
+ if attributes.key?(:'fallback_locale')
129
+ self.fallback_locale = attributes[:'fallback_locale']
130
+ end
131
+
124
132
  if attributes.key?(:'created_at')
125
133
  self.created_at = attributes[:'created_at']
126
134
  end
@@ -160,6 +168,7 @@ module Phrase
160
168
  rtl == o.rtl &&
161
169
  plural_forms == o.plural_forms &&
162
170
  source_locale == o.source_locale &&
171
+ fallback_locale == o.fallback_locale &&
163
172
  created_at == o.created_at &&
164
173
  updated_at == o.updated_at &&
165
174
  statistics == o.statistics
@@ -174,7 +183,7 @@ module Phrase
174
183
  # Calculates hash code according to all attributes.
175
184
  # @return [Integer] Hash code
176
185
  def hash
177
- [id, name, code, default, main, rtl, plural_forms, source_locale, created_at, updated_at, statistics].hash
186
+ [id, name, code, default, main, rtl, plural_forms, source_locale, fallback_locale, created_at, updated_at, statistics].hash
178
187
  end
179
188
 
180
189
  # Builds the object from hash
@@ -23,6 +23,9 @@ module Phrase
23
23
  # Source locale. Can be the name or public id of the locale. Preferred is the public id.
24
24
  attr_accessor :source_locale_id
25
25
 
26
+ # Fallback locale for empty translations. Can be a locale name or id.
27
+ attr_accessor :fallback_locale_id
28
+
26
29
  # Indicates that new translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
27
30
  attr_accessor :unverify_new_translations
28
31
 
@@ -42,6 +45,7 @@ module Phrase
42
45
  :'main' => :'main',
43
46
  :'rtl' => :'rtl',
44
47
  :'source_locale_id' => :'source_locale_id',
48
+ :'fallback_locale_id' => :'fallback_locale_id',
45
49
  :'unverify_new_translations' => :'unverify_new_translations',
46
50
  :'unverify_updated_translations' => :'unverify_updated_translations',
47
51
  :'autotranslate' => :'autotranslate'
@@ -58,6 +62,7 @@ module Phrase
58
62
  :'main' => :'Boolean',
59
63
  :'rtl' => :'Boolean',
60
64
  :'source_locale_id' => :'String',
65
+ :'fallback_locale_id' => :'String',
61
66
  :'unverify_new_translations' => :'Boolean',
62
67
  :'unverify_updated_translations' => :'Boolean',
63
68
  :'autotranslate' => :'Boolean'
@@ -113,6 +118,10 @@ module Phrase
113
118
  self.source_locale_id = attributes[:'source_locale_id']
114
119
  end
115
120
 
121
+ if attributes.key?(:'fallback_locale_id')
122
+ self.fallback_locale_id = attributes[:'fallback_locale_id']
123
+ end
124
+
116
125
  if attributes.key?(:'unverify_new_translations')
117
126
  self.unverify_new_translations = attributes[:'unverify_new_translations']
118
127
  end
@@ -151,6 +160,7 @@ module Phrase
151
160
  main == o.main &&
152
161
  rtl == o.rtl &&
153
162
  source_locale_id == o.source_locale_id &&
163
+ fallback_locale_id == o.fallback_locale_id &&
154
164
  unverify_new_translations == o.unverify_new_translations &&
155
165
  unverify_updated_translations == o.unverify_updated_translations &&
156
166
  autotranslate == o.autotranslate
@@ -165,7 +175,7 @@ module Phrase
165
175
  # Calculates hash code according to all attributes.
166
176
  # @return [Integer] Hash code
167
177
  def hash
168
- [branch, name, code, default, main, rtl, source_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
178
+ [branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
169
179
  end
170
180
 
171
181
  # Builds the object from hash
@@ -53,7 +53,7 @@ module Phrase
53
53
  :'projects' => :'Array<ProjectLocales>',
54
54
  :'permissions' => :'Object',
55
55
  :'default_locale_codes' => :'Array<String>',
56
- :'teams' => :'Array<Team1>',
56
+ :'teams' => :'Array<TeamShort>',
57
57
  :'spaces' => :'Array<MemberSpaces>'
58
58
  }
59
59
  end
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class Team1
4
+ class TeamShort
5
5
  attr_accessor :id
6
6
 
7
7
  attr_accessor :name
@@ -40,13 +40,13 @@ module Phrase
40
40
  # @param [Hash] attributes Model attributes in the form of hash
41
41
  def initialize(attributes = {})
42
42
  if (!attributes.is_a?(Hash))
43
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::Team1` initialize method"
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::TeamShort` initialize method"
44
44
  end
45
45
 
46
46
  # check to see if the attribute exists and convert string to symbol for hash key
47
47
  attributes = attributes.each_with_object({}) { |(k, v), h|
48
48
  if (!self.class.attribute_map.key?(k.to_sym))
49
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::Team1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::TeamShort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
50
  end
51
51
  h[k.to_sym] = v
52
52
  }
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '2.6.0'
2
+ VERSION = '2.7.2'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -67,6 +67,9 @@ require 'phrase/models/invitation_create_parameters'
67
67
  require 'phrase/models/invitation_update_parameters'
68
68
  require 'phrase/models/invitation_update_settings_parameters'
69
69
  require 'phrase/models/job'
70
+ require 'phrase/models/job_comment'
71
+ require 'phrase/models/job_comment_create_parameters'
72
+ require 'phrase/models/job_comment_update_parameters'
70
73
  require 'phrase/models/job_complete_parameters'
71
74
  require 'phrase/models/job_create_parameters'
72
75
  require 'phrase/models/job_details'
@@ -156,9 +159,9 @@ require 'phrase/models/tag_with_stats1'
156
159
  require 'phrase/models/tag_with_stats1_statistics'
157
160
  require 'phrase/models/tag_with_stats1_statistics1'
158
161
  require 'phrase/models/team'
159
- require 'phrase/models/team1'
160
162
  require 'phrase/models/team_create_parameters'
161
163
  require 'phrase/models/team_detail'
164
+ require 'phrase/models/team_short'
162
165
  require 'phrase/models/team_update_parameters'
163
166
  require 'phrase/models/teams_projects_create_parameters'
164
167
  require 'phrase/models/teams_spaces_create_parameters'
@@ -215,6 +218,7 @@ require 'phrase/api/glossary_term_translations_api'
215
218
  require 'phrase/api/glossary_terms_api'
216
219
  require 'phrase/api/icu_api'
217
220
  require 'phrase/api/invitations_api'
221
+ require 'phrase/api/job_comments_api'
218
222
  require 'phrase/api/job_locales_api'
219
223
  require 'phrase/api/job_template_locales_api'
220
224
  require 'phrase/api/job_templates_api'
@@ -21,8 +21,8 @@ describe 'BlacklistedKeysApi' do
21
21
  end
22
22
 
23
23
  # unit tests for blacklisted_key_create
24
- # Create a blacklisted key
25
- # Create a new rule for blacklisting keys.
24
+ # Create a blocked key
25
+ # Create a new rule for blocking keys.
26
26
  # @param project_id Project ID
27
27
  # @param blacklisted_key_create_parameters
28
28
  # @param [Hash] opts the optional parameters
@@ -35,8 +35,8 @@ describe 'BlacklistedKeysApi' do
35
35
  end
36
36
 
37
37
  # unit tests for blacklisted_key_delete
38
- # Delete a blacklisted key
39
- # Delete an existing rule for blacklisting keys.
38
+ # Delete a blocked key
39
+ # Delete an existing rule for blocking keys.
40
40
  # @param project_id Project ID
41
41
  # @param id ID
42
42
  # @param [Hash] opts the optional parameters
@@ -49,8 +49,8 @@ describe 'BlacklistedKeysApi' do
49
49
  end
50
50
 
51
51
  # unit tests for blacklisted_key_show
52
- # Get a single blacklisted key
53
- # Get details on a single rule for blacklisting keys for a given project.
52
+ # Get a single blocked key
53
+ # Get details on a single rule for blocking keys for a given project.
54
54
  # @param project_id Project ID
55
55
  # @param id ID
56
56
  # @param [Hash] opts the optional parameters
@@ -63,8 +63,8 @@ describe 'BlacklistedKeysApi' do
63
63
  end
64
64
 
65
65
  # unit tests for blacklisted_key_update
66
- # Update a blacklisted key
67
- # Update an existing rule for blacklisting keys.
66
+ # Update a blocked key
67
+ # Update an existing rule for blocking keys.
68
68
  # @param project_id Project ID
69
69
  # @param id ID
70
70
  # @param blacklisted_key_update_parameters
@@ -78,8 +78,8 @@ describe 'BlacklistedKeysApi' do
78
78
  end
79
79
 
80
80
  # unit tests for blacklisted_keys_list
81
- # List blacklisted keys
82
- # List all rules for blacklisting keys for the given project.
81
+ # List blocked keys
82
+ # List all rules for blocking keys for the given project.
83
83
  # @param project_id Project ID
84
84
  # @param [Hash] opts the optional parameters
85
85
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)